rasbt/LLMs-from-scratch

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

66
/ 100
Established

This project provides the practical code and guidance to build your own custom GPT-like large language model (LLM) from the ground up. You'll learn how to take raw text data, process it, and train a functional LLM that can generate text or follow instructions. This is designed for AI practitioners, machine learning engineers, and researchers who want to deeply understand and implement LLMs.

87,892 stars. Actively maintained with 8 commits in the last 30 days.

Use this if you are a machine learning engineer or researcher who wants to learn the inner workings of large language models by implementing one yourself, rather than just using existing frameworks.

Not ideal if you are looking for a pre-built, production-ready LLM solution or a high-level API to integrate into an existing application without diving into the underlying code.

AI development natural language processing machine learning engineering deep learning research custom model training
No Package No Dependents
Maintenance 17 / 25
Adoption 10 / 25
Maturity 16 / 25
Community 23 / 25

How are scores calculated?

Stars

87,892

Forks

13,408

Language

Jupyter Notebook

License

Last pushed

Mar 07, 2026

Commits (30d)

8

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/transformers/rasbt/LLMs-from-scratch"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.