Home Projects LLMs-from-scratch
LLMs-from-scratch

LLMs-from-scratch

by rasbt · GitHub

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step

# ai# artificial-intelligence# attention-mechanism# deep-learning
View on GitHub
⭐ Stars
99.5k
🍴 Forks
15.3k
🔥 Trending
+432 this week
📜 License
License not specified
📅 Created
2023
🔄 Last commit
10 days ago
🏷️ Category
ai
💻 Language
You maintain this project?

Claim its page: indexed whatever its rank, translated into six languages, and enriched with what you write yourself.

Claim this page →
LLMs-from-scratch — GitHub preview card
📈 Star history
100k98k
2026-06-272026-07-22
📄 About

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step

Read the full guide
Frequently asked questions

What is LLMs-from-scratch?

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step

Is LLMs-from-scratch open source?

LLMs-from-scratch is an open-source project.

Is LLMs-from-scratch free?

Yes. LLMs-from-scratch is free and open source — you can use, modify and self-host it.

🏅 Maintainer of this project?
olud.ai badge — LLMs-from-scratch

Add this live badge to your README — your GitHub stars and directory rank, refreshed daily.

[![olud.ai](https://olud.ai/badge.php?tool=rasbt-llms-from-scratch)](https://olud.ai/project/rasbt-llms-from-scratch.html)
More badge options →
🧬 Related projects🧬 View the DNA map →