Views
No views yet

TL;DR: This is an original AI architecture developed from scratch by a self-taught developer, achieving results competitive with published research while using minimal resources.
| What This Demonstrates |
|---|
| ✅ Independent Research — Novel architecture designed without academic supervision |
| ✅ Full-Stack ML — Data processing, model design, training infrastructure, evaluation |
| ✅ Resource Optimization — 14M params trained on 4GB VRAM consumer GPU |
| ✅ Documentation — Technical papers, diagrams, reproducible code |
| ✅ Software Engineering — Clean Python, modular design, tests, CI-ready |
⚠️ Experimental Research: This is a work-in-progress exploring brain-inspired architectures. Results are preliminary and require further validation.
| 14M Parameters | ~45 Perplexity* | 250M+ Tokens trained | 4GB VRAM (GTX 1650) |
Experimental architecture that shows promising results compared to LSTM and Transformer-XL (24M params) with 42% fewer parameters.
Trained entirely on consumer hardware — no cloud, no A100s.
🏗️ ArchitectureTerritorial architecture with LLAVES routing
|
📊 Benchmarks14M params vs LSTM, Transformer-XL, GPT-2
|
📝 Research PaperBrain-Inspired Territorial Architecture for Language Modeling
|
"PampaR is an artificial brain where the thalamus orchestrates tokens toward specialized territories (Expressive, Contextual, Formal, Structural) that collaborate via bidirectional frontiers, combining explicit rules (LLAVES 70%) with learned attention (30%) to generate language."
Input → Embedding → [BloqueTerrritorial ×N] → LM Head → Output
↓
Tálamo (LLAVES 70% + Atención 30%)
↓
┌─────────────────────┴─────────────────────┐
│ │
▼ ▼
┌───────────────┐ ┌───────────────┐
│ EXPRESIVO │◄────── Frontera ──────►│ CONTEXTUAL │
│ Lang + Creat │ │ Contexto │
└───────┬───────┘ └───────┬───────┘
│ │
│◄─────── Fronteras Bidirec ────────────►│
│ │
┌───────▼───────┐ ┌───────▼───────┐
│ FORMAL │◄────── Frontera ──────►│ ESTRUCTURAL │
│ Lógica │ │ Patrón + Mat │
└───────────────┘ └───────────────┘
↓
Axiomas (reasoning)| Territory | Modules | Function |
|---|---|---|
| Expresivo | Lenguaje + Creatividad | Fluent text generation, novel ideas |
| Contextual | Contexto | Working memory, coherence |
| Formal | Lógica | Logical reasoning, rules |
| Estructural | Patrones + Matemáticas | Sequences, numbers, patterns |
| Metric | Value |
|---|---|
| Parameters | 14,069,410 |
| Best Loss | 3.81 |
| Perplexity | ~45.3 |
| Training Tokens | 250M+ |
| Training Time | ~70 hours |
| Hardware | GTX 1650 4GB VRAM |
| Model | Parameters | Perplexity | Notes |
|---|---|---|---|
| LSTM (Merity et al.) | 24M | 69.1 | AWD-LSTM, 2018 |
| Transformer-XL (Small) | 24M | 54.5 | Recurrent memory, 2019 |
| PAMPAr-o1 v9 | 14M | ~45* | Territorial arch., 2026 |
| GPT-2 Small | 125M | 35.1 | Standard Transformer, 2019 |
1# Clone the repo
2git clone https://github.com/lucasmella-stack/PAMPAr-o1.git
3cd PAMPAr-o1
4
5# Install dependencies
6pip install -r requirements.txt
7
8# Download training data (WikiText-103)
9python scripts/download_corpus.py1# Basic training
2python scripts/train.py --tokens 10M --epochs 5
3
4# Full training (50M tokens, ~70 hours on GTX 1650)
5python scripts/train.py --tokens 50M --epochs 10 --batch-size 4 --accum 8
6
7# Resume from checkpoint
8python scripts/train.py --resume1import torch
2from pampar.cerebro import PampaR
3from pampar.config import LOCAL_4GB
4import sentencepiece as sp
5
6# Load tokenizer and model
7tok = sp.SentencePieceProcessor()
8tok.Load('data/tokenizer/llarri_bpe.model')
9
10model = PampaR(LOCAL_4GB).cuda()
11ckpt = torch.load('checkpoints/pampar_best.pt', weights_only=False)
12model.load_state_dict(ckpt['model'])
13model.eval()
14
15# Generate
16prompt = "The history of"
17ids = tok.Encode(prompt)
18x = torch.tensor([ids]).cuda()
19
20with torch.no_grad():
21 for _ in range(50):
22 out = model(x)
23 logits = out['logits']
24 next_id = logits[0, -1].argmax().item()
25 x = torch.cat([x, torch.tensor([[next_id]]).cuda()], dim=1)
26
27print(tok.Decode(x[0].tolist()))| Config | VRAM | Params | Dim | Layers | Heads |
|---|---|---|---|---|---|
| LOCAL_4GB | 4GB | ~7M | 128 | 3 | 4 |
| LOCAL_4GB_MAX | 4GB | ~14M | 160 | 4 | 4 |
| SERVER_8GB | 8GB | ~25M | 256 | 4 | 8 |
| SERVER_24GB | 24GB | ~100M | 512 | 6 | 8 |
| SERVER_80GB | 80GB | ~300M | 768 | 8 | 12 |
Input → Embedding → [BloqueTerrritorial ×N] → Axiomas → LM Head → Output
↓
TálamoTerritorial
(LLAVES 70% + Atención 30%)
↓
┌──────────────────┴──────────────────┐
▼ ▼
┌─────────────┐ ┌─────────────┐
│ EXPRESIVO │◄──── Frontera ──────►│ CONTEXTUAL │
│ Lang+Creat │ │ Contexto │
└──────┬──────┘ └──────┬──────┘
│◄────── Fronteras Bidirec ─────────►│
┌──────▼──────┐ ┌──────▼──────┐
│ FORMAL │◄──── Frontera ──────►│ESTRUCTURAL │
│ Lógica │ │ Patrón+Mat │
└─────────────┘ └─────────────┘pampar/
├── __init__.py # Main exports
├── config.py # ConfigPampaR + presets
└── cerebro/
├── model.py # Re-exports from model_v9.py
├── model_v9.py # PampaR main class, BloqueTerrritorial
├── talamo.py # TalamoTerritorial with LLAVES
├── territorio.py # 4 Territories + GestorTerritorios
├── frontera.py # 6 Bidirectional Frontiers
├── neurona.py # Base neuron class
├── modulos/ # 6 specialized neurons
│ └── especializados.py
├── razonamiento/ # Axiomas engine
│ └── axiomas.py
└── memoria/ # Experience memory
scripts/
├── train.py # Training script
├── chat.py # Interactive inference
├── test_v9.py # Test v9 architecture
├── server.py # API server
└── download_corpus.py # Download WikiText-103
diagrams/
└── v9-territorial/
├── arquitectura_v9.txt
├── PampaR_v9_Arquitectura_Territorial.pdf
└── PampaR_v9_Benchmarks_Comparacion.pdf1@software{pampar_v9,
2 author = {Mella Chillemi, Lucas Ricardo},
3 title = {PampaR: Cerebral Language Model with Territorial Architecture},
4 year = {2026},
5 version = {9.0.0},
6 organization = {Independent Researcher},
7 url = {https://github.com/lucasmella-stack/PAMPAr-o1},
8 note = {14M parameters, PPL ~45 on WikiText-103, trained on GTX 1650 4GB}
9}