{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "karpathy-nanochat--try-nanochat-on-a-laptop",
 "repo": "karpathy/nanochat",
 "repo_url": "https://github.com/karpathy/nanochat",
 "repo_slug": "karpathy-nanochat",
 "title": "Run a tiny Nanochat training on CPU or Apple Silicon",
 "page_title": "How to run a tiny Nanochat training on CPU or Apple Silicon with Nanochat",
 "summary": "Use the CPU or MPS setup and the runcpu example to learn the pipeline without GPUs.",
 "who": "A student who wants to read and run the code before renting GPUs.",
 "problem": "GPU clusters are expensive just to learn how the pipeline fits together.",
 "outcome": "A shrunken model trained in tens of minutes on CPU or MPS, for learning only.",
 "steps": [
  "Run `uv sync --extra cpu`",
  "Run `source .venv/bin/activate`",
  "Read and run the runs/runcpu.sh script",
  "Optionally set `NANOCHAT_DTYPE=bfloat16` on recent macOS MPS to save memory"
 ],
 "agent_prompt": "Set up nanochat for CPU with `uv sync --extra cpu`, run runs/runcpu.sh, and explain each stage it runs as it goes.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "The README says you will not get strong results this way.",
 "category": "Research",
 "tags": [
  "Research"
 ],
 "lang": "python",
 "requirements": [
  "uv",
  "An 8XH100 or 8XA100 node for the speedrun (a single GPU works, 8 times slower)",
  "CPU or Apple Silicon only for the tiny runcpu example"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/karpathy-nanochat/try-nanochat-on-a-laptop/",
 "md": "https://dedupedai.com/use-cases/karpathy-nanochat/try-nanochat-on-a-laptop/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/karpathy-nanochat--try-nanochat-on-a-laptop.json",
 "api_version": "v1"
}
