What this project does NOT cover
A document almost no teaching material includes, and which ought to be compulsory: where what you learn here runs out.
Knowing the limits of your knowledge is part of the knowledge. If you finish this project believing you know how to build GPT-4, I have done you a disservice.
1. Scale: the biggest gap
What you have built:
| your model | GPT-4 (estimated) | factor | |
|---|---|---|---|
| Parameters | 4.2 million | ~1.8 trillion | ×430,000 |
| Training tokens | 86 million | ~13 trillion | ×150,000 |
| Compute | 2 × 10¹⁵ FLOPs | ~2 × 10²⁵ FLOPs | ×10,000,000,000 |
| Cost | €0 | ~€60 million | — |
| Time | 22 minutes | ~3 months × 25,000 GPUs | — |
What you do know: the architecture is the same, the training recipe is the same, and the code you have written is correct (stage 06.4 proves it: difference 1.0e-06 against PyTorch).
What you do NOT know: how to manage a three-month run on 25,000 GPUs. That is an entire discipline — see 12-entrenamiento-distribuido.md — and it is not learned without the hardware in front of you.
2. Other modalities
The project is about language. It does not touch:
- Computer vision (classification, detection, segmentation)
- Image generation (diffusion models)
- Audio (speech recognition, synthesis, music)
- Video
- Genuinely multimodal models
The good news: the distance is shorter than it looks, because almost everything ended up being transformers. I have summarized it in 11-otras-modalidades.md.
3. Reinforcement learning proper
We touch RLHF and DPO in stage 10, but that is preference learning, not classical RL. There is no:
- Markov decision processes, value functions, Q-learning
- Policy gradients (REINFORCE, A2C, PPO actually implemented)
- Exploration versus exploitation
- Environments, agents acting in a world with state
It matters because the 2025 reasoning models are trained with RL over verifiable rewards. There, classical RL comes back, hard.
4. Other architectures and families
Not implemented (some are explained in docs/08-mas-alla.md):
| Family | What it is | Where it is mentioned |
|---|---|---|
| Convolutional (CNN) | vision, signals | history, docs/09 |
| Recurrent / LSTM | the standard before 2017 | history, docs/09 |
| Encoders (BERT) | understanding, not generating | history, docs/09 |
| Encoder-decoder (T5) | translation, summarization | — |
| Diffusion | image generation | docs/11 |
| State space (Mamba) | an alternative to attention | docs/08 |
| Graphs (GNN) | molecules, social networks | — |
| Mixture of experts (MoE) | more parameters, same compute | docs/08 |
5. Production engineering
Building the model is the easy part. What surrounds it, and is not here:
- Serving at scale: vLLM, TensorRT-LLM, continuous batching, PagedAttention, load balancing, autoscaling
- MLOps: data and model versioning, reproducibility, lineage, experimentation
- Production monitoring: data drift, quality drift, abuse detection, costs
- A/B testing with models
- Regulatory compliance: GDPR, the EU AI Act, audits, copyright over training data
- Security: input and output guardrails, internal red teams, incident management
Stage 11 gives you a toy server that teaches the mechanism. A production server has three orders of magnitude more code, and almost none of that code is AI.
6. Deep theory
The project is deliberately practical. It does not go into:
- Why deep learning generalizes (still an open problem: the models have the capacity to memorize the entire dataset and generalize anyway)
- Non-convex optimization theory
- Neural tangent kernel, mean field theory
- Information theory beyond "cross-entropy = average surprise"
- Statistical learning theory (VC, PAC, generalization bounds)
- Serious mechanistic interpretability (sparse autoencoders, circuits)
7. Data at real scale
Explained in docs/02, not implemented:
- Web crawling and text extraction from HTML
- Approximate deduplication (MinHash + LSH) over terabytes
- Trained quality classifiers
- Decontamination against the evaluation benchmarks
- Distributed pipelines (Spark, Ray) over 100 TB
- Synthetic data generation at scale
And this is probably the most important gap of all, because the data determines the result more than anything else. You measure it yourself in etapas/07_entrenamiento/03_sobreajuste.py: more data beats any trick.
8. Concrete limitations of this project's code
So you do not get any surprises when you touch it:
| Limitation | Detail | Where |
|---|---|---|
mininn memory | keeps the whole graph, unoptimized. One step at batch 16 and context 192 can run to around 7 GB | etapas/09/README |
| CPU only | mininn does not use the GPU. For that, stage 06.4 with PyTorch | mininn/ |
| No mixed precision | everything in float32 | mininn/tensor.py |
| No gradient checkpointing | activations are not recomputed | — |
| Learned positions | no RoPE, so it does not extrapolate the context | gpt.py |
| Full attention | no FlashAttention, no GQA | gpt.py |
| Synthetic corpus | template-generated, very predictable | datos/ |
| Character tokenizer | in stages 02-13, for clarity | — |
| One language only | Spanish | datos/ |
None of these is a mistake: they are all decisions made so the code fits in your head. But it is worth keeping them in mind before reusing it for anything serious.
9. What nobody covers, because nobody knows
Genuinely open problems. If somebody tells you they have them solved, be sceptical:
- Prompt injection. There is no structural separation between data and instructions. Unsolved.
- Hallucinations. Mitigable, not eliminated.
- Continual learning. Updating a model without it forgetting.
- Calibration. Getting the model to know what it does not know.
- Interpretability. Understanding why it does what it does.
- Reliable evaluation. Endemic contamination of the public benchmarks.
- Data efficiency. A child learns a language from a billion words; an LLM needs trillions. Nobody explains that difference.
They are developed in 05-fallos-y-limites.md.
What to do with this list
It is not a list of deficiencies: it is a map of where to go next.
If you are interested in... | start with ---|--- Vision and diffusion | 11-otras-modalidades.md Really training at scale | 12-entrenamiento-distribuido.md Modern techniques | 08-mas-alla.md How we got here | 09-historia.md Using AI well, without building it | 05-fallos-y-limites.md
And one thing you do take away, and it is not a small one: you can tell the difference between what you understand and what you do not. With AI, where the marketing runs well ahead of reality in both directions, that ability is worth more than any specific technique.
Next: 11-otras-modalidades.md