#144 · Primary category: Education & Research
train-llm-from-scratch
A straightforward method for training your LLM, from downloading data to generating text.
Project last updated:08/17/26
GitHub Stars
9.5K
Forks
1.3K
Contributors
13
License
MIT
Why we included this project
This is one of those repositories that actually shows you what happens inside an LLM rather than leaving the model as a black box. Everything is hand-written in plain PyTorch, from tokenizing raw text through building a transformer from the Attention Is All You Need paper, all the way to post-training with SFT, reward modeling, PPO, DPO, and GRPO, with no transformers, TRL, or PEFT libraries hiding the details. For engineers and students who want to see each mechanism as real code instead of a wrapper, that transparency is the main draw. The same scripts scale from a few million parameters to billion-parameter training on a single GPU, so you can run the pipeline yourself and watch how changing the data and the loss reshapes what the model produces. If you plan to fine-tune or align models later, working through this end-to-end journey builds intuition that documentation alone rarely gives you.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
prompts.chat
f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.
JavaGuide
Java Interview & Backend General Interview Guide, covering computer fundamentals, databases, distributed systems, high concurrency, system design, and AI application development.
system-prompts-and-models-of-ai-tools
A curated collection of system prompts, internal tools, and AI models from popular AI assistants and coding agents.
30-seconds-of-code
Coding articles to level up your development skills
generative-ai-for-beginners
21 Lessons, Get Started Building with Generative AI