rasbt/LLMs-from-scratch
Implement a ChatGPT-like LLM in PyTorch from scratch, step by step
3,213 repositories
Implement a ChatGPT-like LLM in PyTorch from scratch, step by step
Learn AI Engineering! Learn it. Build it. Ship it for others.
A 2.78-trillion-parameter Kimi K3 running inference on a single CPU in 8.24 GB of RAM. Portable C99: no BLAS, no framework, no GPU.
Build a modern LLM from scratch. Every line commented. Explained like we are five.
A shader-based software renderer written from scratch in C89
LeetCode for PyTorch — 65 ML/AI interview problems from real interviews at Google, Meta, Anthropic. Jupyter notebooks, an auto-grader, and an MCP AI tutor.
Agent工程师最全学习路径 · 从零精通 AI 工程 · 20 阶段 503 课 · 中文全量翻译 + 配套站点 + 动画讲解视频 · 如何成为 AI Agent 工程师的修成指南
Multiplayer FPS game - Counter-Strike: Football 🏉
Pure Rust implementation of a minimal Generative Pretrained Transformer
DSOD: Learning Deeply Supervised Object Detectors from Scratch. In ICCV 2017.
A x86_64 C99 compiler written in Rust from scratch
From-scratch PyTorch replications of classic and SOTA AI/ML papers: transformers, attention, GANs, diffusion, CLIP, LoRA, MoE and more, with reproducible training code.
C++ Path Tracer from scratch with zero third-party libraries.
Don't memorize ML. Understand it from first principles including Inference, Cuda, Deep Learning, Data Science and Reinforcement Learning
A simple in memory cache written using go
An OS which is all about learning!
ncurses 3d object viewer
Readable single-file PyTorch implementations of deep RL algorithms: DQN, PPO, SAC, TD3, DDPG and A2C, with Gymnasium and Atari support plus W&B tracking.
Build a Large Language Model (From Scratch) book and Finetuned Models
从 MiniMind 源码读起,再延伸到现代大模型技术体系的中文学习笔记。主线逐行精读预训练 / SFT / DPO / PPO / GRPO 与训练机制;附录 17 篇进阶卷覆盖量化、投机解码、RLHF 全景、模型代际史等 MiniMind 没涉及、但进阶绕不开的主题。
Escape is a UNIX-like microkernel operating system that runs on x86, x86_64, ECO32 and MMIX.
Build a Claude Code–like CLI coding agent from scratch.
A complete neural network built entirely in x86 assembly language that learns to recognize handwritten digits from the MNIST dataset. No frameworks, no high-level languages - just pure assembly - ~5.3× faster than NumPy
The Super Programmer
Experimental demoscene project using C99 and Direct3D 12. Fully standalone with custom windows, and d3d12 headers. No Windows SDK, libc or Visual Studio dependency. C and HLSL compilers included.
Open source, clean room implementation of Minecraft Client
Documented and Unit Tested educational Deep Learning framework with Autograd from scratch.
A web browser written from scratch — a platform-agnostic Rust engine (networking, HTML/CSS parsing, DOM, style, layout, paint) with a thin native app shell per OS.
动手学大模型全栈:CS336 中文精讲 · PyTorch 手搓 Transformer · 单卡复现 Pretrain/SFT/LoRA/DPO/GRPO/RLVR · PEFT/Agent/RAG 落地(含真实实验、曲线与复现脚本)
从零搭建Agent框架(Build LLM ReAct Agent from scratch)