Final project
You have read, you have run things, you have solved exercises. What is missing is the one test that really proves you understand it: building something that was not already built.
Pick one. There is deliberately no official solution.
How to know you have done it
Every project shares the same criterion, and it is the criterion of the whole project:
A claim with a number, measured against a baseline.
"It works better" does not count. "It goes from 52% to 89% on this 200-case test, where chance gives 50%" does.
Level 1 · One weekend
1.1 · Your own corpus
Take text you actually care about — your notes, a book, documentation from your job — and train a model on it.
What you are going to discover: that the synthetic corpus was lying to you. You will see perplexity 3-5 instead of 1.27, and much worse text.
That is not a failure: it is reality, and it is the most valuable lesson in the project.
cp mi_libro.txt datos/crudo/
python datos/generar_corpus.py --incluir-crudo
python etapas/06_transformer/01_entrenar.py
Deliverable: the loss curve, 300 generated characters, and your explanation of why it is worse.
1.2 · A new tool for the agent
Add a different tool to etapas/12_rag_y_herramientas/03_herramientas.py: power, square root, modulo, or several at once.
The hard part is not the tool: it is generating the training data and keeping the masking correct.
Deliverable: accuracy of the complete system against the model on its own, over 200 cases the model never saw.
1.3 · Measure a capability yourself
Design a test like etapas/13_evaluacion/prueba_concordancia.py for something else: number (singular/plural), verb tense, or closing brackets.
Requirements: a known chance baseline, cases from the validation set, and a result per model.
Deliverable: the comparison table. This is, literally, the daily work of an AI engineer.
Level 2 · One week
2.1 · Implement RoPE
Replace the learned positions (wpe) with rotary positions.
It is ~15 lines in AtencionCausal.forward: you rotate q and k by an angle proportional to the position, before the dot product.
The interesting part: you will be able to generate with contexts LONGER than the ones you trained on. With wpe that is impossible.
Deliverable: loss at context 64 (same as before) and at context 128 without retraining. Compare against the wpe model doing the same thing.
2.2 · Grouped-query attention (GQA)
Make several query heads share keys and values.
Deliverable: KV cache size before and after, and validation loss. How much quality does it cost to shrink the cache by 4×?
2.3 · Speculative decoding
Train a small model (2 layers) and a large one (6 layers). The small one proposes 4 tokens, the large one verifies them in a single pass.
The hard part: making the output distribution EXACTLY that of the large model. You need rejection sampling; accepting when they match is not enough.
Deliverable: tokens per second with and without speculation, and proof that the distribution does not change.
2.4 · Mixture of experts
Replace the MLP with 4 experts and a router that activates the best 2.
The hard part: load balancing. Without an auxiliary loss, the router gets attached to two experts and the others never learn anything.
Deliverable: usage of each expert (is it balanced?), total parameters against active ones, and loss.
Level 3 · One month
3.1 · An assistant that is actually good for something
End to end, in your own domain: your notes, your documentation, your hobby.
- Your own corpus (10 MB minimum)
- A BPE tokenizer fitted to that text
- Pre-training
- 200-500 instruction pairs written by you
- SFT with masking
- RAG over your documents
- Server and your own evaluation
Deliverable: the system working, and an honest evaluation of what it does well and what it does badly.
3.2 · Reproduce a paper
Pick one from docs/09-historia.md and implement its central idea on top of this code. Suggestions by difficulty:
| Paper | What to implement | Difficulty |
|---|---|---|
| Dropout (2014) | it is already there, measure its effect for real | easy |
| Label smoothing | softening the cross-entropy targets | easy |
| Layer scaling / DeepNet | stability in very deep networks | medium |
| FlashAttention | blockwise attention, without materializing T×T | hard |
| Chinchilla | your own scaling law with 5 model sizes | medium, lots of compute |
Deliverable: your result against the paper's, and an honest explanation of the differences. They almost never come out the same, and understanding why is the real exercise.
How to present it
If you are going to show it to somebody — or to yourself a year from now:
my-project/
├── README.md what you did, what it measured, what you learned
├── code/ what you wrote
├── results/ curves, tables, generated samples
└── notes.md what went wrong (this is the most valuable part)
The "what went wrong" section is the one that says most about you. In an interview, describing a bug you diagnosed is worth more than showing a pretty curve.
One last warning
No project on this list produces a useful model. With the data and the compute of a laptop, that does not happen.
What they produce is something else, and it is the thing you are after: knowing exactly why not. And in a field full of people repeating what they have read, that is a real advantage.