#6 · Primary category: Education & Research
LLMs-from-scratch
Implement a ChatGPT-like LLM in PyTorch from scratch, step by step
Project last updated:08/29/26
GitHub Stars
104.0K
Forks
15.9K
Contributors
70
License
Other
Why we included this project
This repository pairs with Sebastian Raschka's book on building a large language model from scratch, and it reads like a guided course rather than a tool you drop into a project. Each chapter works through one concrete stage, from tokenizing text and coding attention mechanisms to implementing a GPT-style model, pretraining on unlabeled data, and finetuning for classification and instruction following, with runnable notebooks and consolidated scripts. The step-by-step progression is genuinely useful for developers who want to see inside a transformer before reaching for a framework, and the included exercise solutions make it practical for self-study or a classroom. It also shows how to load weights from larger pretrained models and apply parameter-efficient finetuning with LoRA, so you can move from toy-scale training to real checkpoints. If you teach, onboard someone into LLM internals, or just want to understand what powers ChatGPT, this is a solid reference to work through.
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