For the last few days, Iโve been experimenting with TorchTitan, and Iโm honestly blown away by how accessible it has made LLM training. What once felt impossible or reserved for big research labs is now something you can do on your own laptop or a Colab GPU.
Hereโs literally all you need:
1๏ธโฃ Download the tokenizer
python scripts/download_hf_assets.py \
--repo_id meta-llama/Llama-4-Scout-17B-16E \
--hf_token $HF_TOKEN \
--local_dir ./assets/hf/Llama-4-Scout-17B-16E \
--assets tokenizer
2๏ธโฃ Run the training command
torchrun --nproc_per_node=1 --rdzv_backend=c10d --rdzv_endpoint=localhost:0 \
torchtitan/train.py --job.config-file \
torchtitan/models/llama4/train_configs/colab_a100.toml
๐ฅ And thatโs it.
Using just these steps, I trained my first Meta Llama model and Iโm incredibly excited to share that itโs now live on Hugging Face:
๐ Model: https://huggingface.co/lakhera2023/llama4-debugmodel-10k
This is just the beginning. The tools are here, the ecosystem is ready, and all you need is curiosity and the willingness to start.
If I can build it, you can too. Letโs push the boundaries together.
๐ Full blog with step-by-step breakdown: https://prashantlakhera.substack.com/p/building-your-own-language-models
๐กNote: I know I oversimplified a lot here because the truth is, thereโs a lot you need to understand before confidently running these commands. Concepts like tokenization, model configs, architectures, distributed training, optimizers, data pipelines... they all play a crucial role.
If you want to go deeper and really understand whatโs happening under the hood, Iโve written a book that explains every concept step by step, from fundamentals to fully training a Small Language Model.
๐ Building A Small Language Model from Scratch: A Practical Guide
โ Gumroad: https://plakhera.gumroad.com/l/BuildingASmallLanguageModelfromScratch
โ Amazon: https://www.amazon.com/dp/B0G64SQ4F8/
โ Leanpub: https://leanpub.com/buildingasmalllanguagemodelfromscratch/
If you're serious about understanding LLM, not just running commands, but mastering the craft, this book will guide you through it.

Top comments (0)