ai-engineering-from-scratch vs llms-from-scratch

Two of the top projects in Learning and cookbooks, side by side: who leads on each score part and who each one suits, then setup, license, activity and what each review found.

22nd of 8 in Learning and cookbooks

ai-engineering-from-scratch

Hands-on curriculum for building AI systems from math to agents

75 out of 100
33rd of 8 in Learning and cookbooks

llms-from-scratch

Code for the book on building a GPT-style LLM in PyTorch

74 out of 100

Verdict

ai-engineering-from-scratch ranks higher, 75 to 74. Of the 4 score parts we measure for both, ai-engineering-from-scratch leads on 2, llms-from-scratch on 1 and 1 is even.

  • Adoptionllms-from-scratch leads by 49 points, 88 to 39: a wide gap.
  • FreshnessEven at 100.
  • Maintenanceai-engineering-from-scratch leads by 37 points, 95 to 58: a wide gap.
  • Agent-readyai-engineering-from-scratch leads by 45 points, 45 to 0: a wide gap.

Pick ai-engineering-from-scratch if you are

Developers learning to build LLM, RAG and agent systems from first principles

  • Lessons ship runnable code; the first ones need only python3 and no extra dependencies
  • Three staged projects with local graders (project_test.py --strict) and reference solutions

Pick llms-from-scratch if you are

Python developers learning how LLMs work by coding one in PyTorch

  • Main chapter code runs on a conventional laptop and uses a GPU automatically if present
  • Plain PyTorch with no external LLM libraries, so every component is readable
ai-engineering-from-scratch vs llms-from-scratch: score parts and facts
What we compareai-engineering-from-scratchllms-from-scratch
Score parts, out of 100
Adoption39, known88, widely used
Freshness100, active100, active
Maintenance95, healthy58, fair
Easy to runNot scored for this kindNot scored for this kind
Agent-ready45, minimal0, none
Facts from GitHub and the README
Stars68.4k106.5k
LicenseMIT (permissive)custom license (read the license)
Last commitOct 2026Oct 2026
Last releaseOct 2026None published
LanguagePythonJupyter Notebook
DockerNoNo
GPUNot statedOptional
arm64 or Apple SiliconNot statedNot stated

ai-engineering-from-scratch

A course of 528 lessons across 20 phases, covering math foundations, ML fundamentals, LLM engineering, agents, tools and protocols, and production infrastructure. Lessons are runnable code in Python, TypeScript, Rust and Julia, with three graded projects: retrieval evaluation, agent trace debugging and a tool-call firewall. It can be followed on the website, from a local clone, or through tutor skills installed into a coding agent.

Who it is for: Developers learning to build LLM, RAG and agent systems from first principles

Strengths

  • Lessons ship runnable code; the first ones need only python3 and no extra dependencies
  • Three staged projects with local graders (project_test.py --strict) and reference solutions
  • Tutor skills install via npx skills and save progress to LEARNING.md
  • Code in Python, TypeScript, Rust and Julia; README translated into 30+ languages

Weaknesses

  • 528 lessons is a large scope; total study time is not stated in the visible README
  • Project starters fail by design until you implement the stages
  • Tutor skills need Node.js, npx and a skill-capable coding agent host
  • GPU and RAM needs for later phases are not stated in the visible README
  • Needs Python 3.10+, Node.js 22.18+ (TypeScript project), Rust (Tool Call Firewall project), npx (optional, tutor skills)

llms-from-scratch

Official code for the Manning book "Build a Large Language Model (From Scratch)". Notebooks and scripts implement tokenization, attention, a GPT model, pretraining, classification finetuning, instruction finetuning and LoRA in plain PyTorch, without external LLM libraries. Bonus folders add from-scratch Llama 3.2, Qwen3, Gemma 3, Olmo 3, KV cache, MoE and DPO.

Who it is for: Python developers learning how LLMs work by coding one in PyTorch

Strengths

  • Main chapter code runs on a conventional laptop and uses a GPU automatically if present
  • Plain PyTorch with no external LLM libraries, so every component is readable
  • Bonus material covers KV cache, GQA, MoE, DPO and several model architectures
  • Exercise solutions, a companion video course and CI tests on Linux, Windows and macOS

Weaknesses

  • Tied to a print book; contributions extending main chapter code are not accepted
  • Produces a small educational model, not a production-grade LLM
  • License is reported as NOASSERTION; the README states no license terms
  • Video course and quiz PDF are hosted by the publisher, not in the repo
  • GPU optional
  • Needs PyTorch, Jupyter, Ollama (optional, ch07 evaluation)
  • Models: GPT-2, Llama 3.2, Qwen3, Gemma 3, Olmo 3

More in Learning and cookbooks

Building with these?

We help teams pick an open-source AI stack and run it in production. Client work never changes a rank.