{"full_name":"rasbt/LLMs-from-scratch","owner":"rasbt","name":"LLMs-from-scratch","url":"https://github.com/rasbt/LLMs-from-scratch","description":"Implement a ChatGPT-like LLM in PyTorch from scratch, step by step","homepage":"https://amzn.to/4fqvn0D","topics":[],"language":"Jupyter Notebook","license":"NOASSERTION","avatar":"https://avatars.githubusercontent.com/u/5618407?u=fb6135afa4c7095d0f94c4c0e0eee37d1979a764&v=4","created_at":"2023-07-23T18:15:57Z","pushed_at":"2026-11-09T14:59:09Z","metrics":{"stars":108148,"forks":16723,"watchers":869,"issues":252,"prs":622,"releases":0,"issues_open":null,"issues_closed":null,"prs_open":null,"prs_closed":null,"prs_merged":null,"discussions":216},"growth":{"day":{"stars":84,"forks":22,"base_day":"2026-11-09"},"week":{"stars":447,"forks":90,"base_day":"2026-11-03"},"month":{"stars":1817,"forks":362,"base_day":"2026-10-11"}},"history":{"dates":["2026-09-06","2026-09-07","2026-09-08","2026-09-09","2026-09-10","2026-09-11","2026-09-12","2026-09-13","2026-09-14","2026-09-15","2026-09-16","2026-09-17","2026-09-18","2026-09-19","2026-09-20","2026-09-21","2026-09-22","2026-09-23","2026-09-24","2026-09-25","2026-09-26","2026-09-27","2026-09-28","2026-09-29","2026-09-30","2026-10-01","2026-10-02","2026-10-03","2026-10-04","2026-10-05","2026-10-06","2026-10-07","2026-10-08","2026-10-09","2026-10-10","2026-10-11","2026-10-12","2026-10-13","2026-10-14","2026-10-15","2026-10-16","2026-10-17","2026-10-18","2026-10-19","2026-10-20","2026-10-21","2026-10-22","2026-10-23","2026-10-24","2026-10-25","2026-10-26","2026-10-27","2026-10-28","2026-10-29","2026-10-30","2026-10-31","2026-11-01","2026-11-02","2026-11-03","2026-11-04","2026-11-09","2026-11-10"],"stars":[104379,104468,104531,104589,104651,104706,104776,104836,104887,104967,105023,105086,105152,105197,105237,105297,105351,105401,105463,105506,105572,105615,105659,105721,105758,105815,105855,105889,105952,106009,106072,106133,106178,106227,106267,106331,106366,106429,106483,106530,106612,106671,106735,106797,106876,106954,107036,107104,107159,107217,107274,107350,107406,107452,107505,107563,107608,107642,107701,107760,108064,108148],"forks":[15974,15997,16014,16024,16032,16044,16058,16068,16070,16083,16096,16108,16111,16132,16139,16153,16155,16170,16183,16188,16194,16205,16211,16220,16230,16239,16271,16284,16298,16307,16318,16326,16335,16342,16348,16361,16370,16379,16383,16391,16408,16422,16432,16446,16458,16465,16479,16487,16499,16510,16523,16537,16550,16563,16575,16593,16605,16616,16633,16646,16701,16723],"watchers":[847,849,849,850,850,852,852,852,852,852,855,854,855,856,856,857,857,857,857,857,857,857,858,860,860,860,860,860,860,861,860,861,863,864,864,864,865,866,866,868,870,870,871,871,870,870,871,871,872,867,867,868,870,871,870,871,870,871,871,871,869,869],"issues_open":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"prs_open":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]},"boards":{"total":125},"same_owner":[{"full_name":"rasbt/deeplearning-models","name":"deeplearning-models","boards":{}},{"full_name":"rasbt/reasoning-from-scratch","name":"reasoning-from-scratch","boards":{}}],"issues":[{"number":977,"title":"Add Apple M-series (MPS) device support to Python scripts","comments":6,"created_at":"2026-03-09T21:53:35Z"}],"discussions":[{"number":1081,"title":"Nanbeige 4.2 3b \"from scratch\" implementation","comments":1,"category":"Ideas","created_at":"2026-09-14T21:09:32Z"},{"number":1067,"title":"Data transfer in collate v.s. during training loop","comments":1,"category":"Q&A","created_at":"2026-08-15T02:15:16Z"},{"number":1066,"title":"Questions on variable length input data construction","comments":1,"category":"Q&A","created_at":"2026-08-11T20:50:30Z"},{"number":1065,"title":"Question on output dim in Figure 4.4","comments":1,"category":"Q&A","created_at":"2026-08-10T21:04:36Z"},{"number":1059,"title":"100k stars!","comments":0,"category":"Announcements","created_at":"2026-08-07T14:10:42Z"},{"number":1051,"title":"[chapter3] Buffer usage in PyTorch","comments":1,"category":"Q&A","created_at":"2026-07-31T09:24:37Z"},{"number":1037,"title":"Chapter 5: running train_model_simple() on CPU is really slow, why?","comments":1,"category":"Q&A","created_at":"2026-07-03T08:58:29Z"},{"number":1043,"title":"ask about project","comments":4,"category":"General","created_at":"2026-06-12T23:44:02Z"}],"latest_release":null,"readme":true,"readme_zh":false,"news":[{"title":"Implementing a ChatGPT-like LLM from scratch, step by step","url":"https://github.com/rasbt/LLMs-from-scratch","hn":"https://news.ycombinator.com/item?id=39156778","source":"Hacker News","lang":"en","date":"2024-01-27","points":739,"comments":98},{"title":"Gemma 3 270M re-implemented in pure PyTorch for local tinkering","url":"https://github.com/rasbt/LLMs-from-scratch/tree/main/ch05/12_gemma3","hn":"https://news.ycombinator.com/item?id=44962059","source":"Hacker News","lang":"en","date":"2025-08-20","points":417,"comments":57},{"title":"Finetuning an LLM-Based Spam Classifier with LoRA from Scratch","url":"https://github.com/rasbt/LLMs-from-scratch/blob/main/appendix-E/01_main-chapter-code/appendix-E.ipynb","hn":"https://news.ycombinator.com/item?id=40328436","source":"Hacker News","lang":"en","date":"2024-05-11","points":14,"comments":0},{"title":"Implementing the Llama 3.2 1B and 3B Architectures from Scratch","url":"https://github.com/rasbt/LLMs-from-scratch/blob/main/ch05/07_gpt_to_llama/standalone-llama32.ipynb","hn":"https://news.ycombinator.com/item?id=41749613","source":"Hacker News","lang":"en","date":"2024-10-05","points":5,"comments":0},{"title":"Explanation of Gated DeltaNet (Qwen3-Next and Kimi Linear)","url":"https://github.com/rasbt/LLMs-from-scratch/blob/main/ch04/08_deltanet/README.md","hn":"https://news.ycombinator.com/item?id=45801296","source":"Hacker News","lang":"en","date":"2025-11-03","points":3,"comments":0},{"title":"Qwen3 from Scratch","url":"https://github.com/rasbt/LLMs-from-scratch/tree/main/ch05/11_qwen3","hn":"https://news.ycombinator.com/item?id=44767032","source":"Hacker News","lang":"en","date":"2025-08-02","points":3,"comments":0},{"title":"Qwen3 Implemented from Scratch","url":"https://github.com/rasbt/LLMs-from-scratch/tree/main/ch05/11_qwen3","hn":"https://news.ycombinator.com/item?id=44327054","source":"Hacker News","lang":"en","date":"2025-06-20","points":3,"comments":0},{"title":"Day 1 of trying to fit a Chatbot into a QR Code","url":"https://news.ycombinator.com/item?id=43742639","hn":"https://news.ycombinator.com/item?id=43742639","source":"Hacker News","lang":"en","date":"2025-04-20","points":1,"comments":2},{"title":"LLMs-from-scratch: Build an LLM in PyTorch","url":"https://opentools.ai/resources/llms-from-scratch","source":"opentools.ai","lang":"en","date":"2026-05-13"},{"title":"【GitHub项目推荐--LLMs-from-scratch：从零实现大语言模型完全指南】","url":"https://blog.csdn.net/j8267643/article/details/151872935","source":"blog.csdn","lang":"zh","date":"2025-09-19"},{"title":"大模型项目推荐 | LLMs-from-scratch中文项目 - 从零构建大模型（附教程）","url":"https://blog.csdn.net/2301_81888214/article/details/146609162","source":"blog.csdn","lang":"zh","date":"2025-03-28"},{"title":"「LLMs-from-scratch」で学ぶLLMの基礎から応用まで","url":"https://note.com/panda_lab/n/n52d23c882aa3","source":"note","lang":"zh","date":"2024-08-01"},{"title":"「LLMs-from-scratch」로 배우는 LLM의 기초부터 응용까지","url":"https://note.com/panda_lab/n/n52d23c882aa3?hl=ko","source":"note","lang":"en","date":"2024-07-31"},{"title":"6.7 秒训练大模型：不靠硬背权重，靠检索兜底|Herman Brunborg|NanoGPT|n-gram 检索_新浪新闻","url":"https://news.google.com/rss/articles/CBMiY0FVX3lxTE1ta1RlVkVTbVhYbUxGTktOcWNENFBrSDBBSGFzWTJUY2djVkFoeGpYbnlEcUtxczRJN2lBanRrR3lzRktlT0c0U1BiV1NSY0J4X0Vadmw4RjFoc3dsVE1hWkhNcw?oc=5","source":"新浪网","lang":"zh","date":"2026-10-29"},{"title":"6 Things I Learned Building LLMs From Scratch That No Tutorial Teaches You","url":"https://news.google.com/rss/articles/CBMiqgFBVV95cUxQOXc3dDhVekcxcElEc29NODBYeDVwbWJtTEZMS1Y4WlZxN0Q3SHhmS2J0WkUwd3ZXaDcxZHBBMGVlTkNPUmJpblZQbEYzSDlCbWNubnRfRVdhNnhHRFRtc2NDbWxEQkVUNUNnUGkxOU9hazQxQWlaNDgzalpqMnZCXzM3MnFhRTFMdzVodU5Yb3REdTBzSDlna3k5VG9uSWpSeS1DZHo2RldKdw?oc=5","source":"Towards Data Science","lang":"en","date":"2026-04-17"},{"title":"10 Most Popular GitHub Repositories for Learning AI","url":"https://news.google.com/rss/articles/CBMigwFBVV95cUxNSWdwTTkyZDhDd20tckhuQWktc09DSGNfNnlSWFU5TnZtR2J3Q0hGVkctdVZxZnBYRldzRFBrSVJmODV4Sk44dVJUbzYtdU1sZWFuMTlnSE5mS3V6RW5QVm9wRzEzeUt4QVZfdWN5eVlFck96QmdQV3FNUWFHc0o1WmZGWQ?oc=5","source":"KDnuggets","lang":"en","date":"2026-01-08"},{"title":"ASU study: CoT in LLMs a brittle mirage","url":"https://news.google.com/rss/articles/CBMiqwFBVV95cUxNM2hZRk9QVVlRWl9ZUzFMci1KZGtkdk1OQzI5aUhxTnpocXdlNEpVR09hT1paSHBOQ0dqakllVnNYY1pXLVZEV1FvaDFpNEI0Tlo1Z3p4U3p1MXpjbnZ1VkVVTFFJMnlVZnkzeDk1TTdGUXhyQjFFeVpmR1dLNm43c2NNYk5sSXBWVXBtRXFTNXp6ZU5HX0pqNnk1UjFrY2p1UHhYclpOYWYzMUk?oc=5","source":"VentureBeat","lang":"en","date":"2025-08-19"},{"title":"10 GitHub Repositories to Master Large Language Models","url":"https://news.google.com/rss/articles/CBMihwFBVV95cUxNOUowY25qVENENGM2aVUxcTNrVWstcEttbEZxbWRfQkJZczlsUEZMWmZQZlJab0VTMXdKY050SW9MZENiY2hiSV80c1hjU09zWXZuVldaRjh3WEN1QldTc1NaYWpISTlRRHBXbEpYQVBsWUd2akhROFJYc2RmRlNfS2tMcVBnajA?oc=5","source":"KDnuggets","lang":"en","date":"2025-05-12"},{"title":"Building a Seq2Seq Transformer Model for Language Translation: A Comprehensive Guide","url":"https://news.google.com/rss/articles/CBMivgFBVV95cUxPaW1mUWdOMFI4Q1d3Q3F3cnF0OTFsWnhfeDA3b1NOZ0Y2RGRWcWM3UnRELTNTT05xc3RaVnROb29NelBjQmFQdS1ZajJ6WXVvLUxDaXp4RzVqQzJETTNIdnpPZXNTTVlyaGJDRHRZWHRoampZTlNWd1AzY2RfcC1hNTJKekFfWVZNVXdHQlFQcVVEV21UdlhiZVFZOTJTZXhMZVMxQ2hGQW5fYXBiYkF3SEF1WXFhRm5oanpMQnV3?oc=5","source":"Becoming Human: Artificial Intelligence Magazine","lang":"en","date":"2025-01-15"},{"title":"大神带你从零开始构建大语言模型，然来不过如此，清晰易懂但也确实牛皮","url":"https://news.google.com/rss/articles/CBMiakFVX3lxTE42aU5jbDRWWkVuNURFRlpOTDFsSTNwSHlSZHV0bDV2VkpXU1RPUHZfeFRzd1VLS0ZYQzkzUlZtNDFqRks3UUNYbi1ISjJzLTBhcktaSUxGU3RhYWFORjRiSl9JLWpTWjg2Y1E?oc=5","source":"53AI","lang":"zh","date":"2024-09-01"},{"title":"《Python 机器学习》作者新作：从头开始构建大型语言模型，代码已开源","url":"https://news.google.com/rss/articles/CBMiU0FVX3lxTE9nTEdQYlRxeURrVWhQeVU2TGE3ZHAxVXlPYlpLaVNkb0JoRWlDU1RmRGpMdzE0dGs5R3JwQTFqbGwzNTBma01BUVYwRjZmOURlbWI4?oc=5","source":"51CTO","lang":"zh","date":"2024-06-24"}],"stale":false,"snapshot_at":"2026-11-10T09:35:25Z","history_start":"2026-09-06"}