---
title: "What the whole pipeline costs now"
lesson_id: "06"
---

# What the whole pipeline costs now

- **Lesson ID:** 06
- **Goal:** Explain the nanochat pipeline and give sourced, careful readings of the $48 and $43,000 figures, plus the current 1.65 hour record.
- **Human lesson:** [06-what-the-pipeline-costs.html](06-what-the-pipeline-costs.html)

## Prerequisites

- Lessons 03 to 05 help, because the pipeline includes a tokenizer and a training loop.

## Inputs, outputs, and artifacts

- **Inputs:** The question of what a full chat pipeline costs now.
- **Outputs:** Sourced cost figures, the CORE target, and a laptop-safe install path.
- **Artifacts:** Progressive mermaid diagrams of the pipeline. Official `uv sync` commands.

## Agent build steps

1. Point at [nanochat](https://github.com/karpathy/nanochat). List the stages: tokenization, pretraining, finetuning, evaluation, inference.
2. Explain $48 as the README's illustrative 2 hours on 8×H100 at about $3/GPU/hour ($24 per node-hour).
3. Explain $43,000 as Karpathy's estimate 32 × 168 × $8, written in [Discussion 481](https://github.com/karpathy/nanochat/discussions/481) and [LEADERBOARD.md](https://github.com/karpathy/nanochat/blob/master/dev/LEADERBOARD.md). Do not call it an OpenAI invoice. The 2019 Reddit thread and HuggingFace model card he cites were not re-opened for this course.
4. Define the comparison target: DCLM CORE 0.256525 from [arXiv:2406.11794](https://arxiv.org/abs/2406.11794).
5. State the 14 March 2026 record of 1.65 hours on 8×H100.
6. Explain `--depth` and `runs/speedrun.sh`. Note that one GPU works but takes about eight times longer.
7. Give `uv sync --extra cpu` for CPU or MPS, and `uv sync --extra gpu` for CUDA. Do not tell the reader they must rent 8×H100.

## Constraints

Keep the language simple, friendly, and literal. No quizzes, no em dashes. Brand Edge FDE only. Keep cost claims sourced. Mention that CPU and MPS paths may have sharp edges, as the README does.

## Key concepts

- nanochat is a small, end-to-end chat LLM pipeline: tokenizer, pretrain, finetune, evaluate, and infer.
- The README's illustrative cost is $48 for about 2 hours on 8×H100, at about $3 per GPU per hour.
- The $43,000 GPT-2 figure is Karpathy's estimate: 32 TPU v3 × 168 hours × $8, written up in Discussion 481 and the leaderboard docs.
- The comparison target is GPT-2's DCLM CORE score of 0.256525, not a replay of the 2019 job.
- As of 14 March 2026, the speedrun record is 1.65 hours on 8×H100.
- uv is the official installer. Use --extra cpu for CPU or MPS, and --extra gpu for CUDA.

## Takeaways

- Quote the $48 and $43,000 figures with their sources, and mention the 1.65 hour record when you talk about current cost.
- Read the pipeline and the --depth dial even if you never rent an 8×H100 node.
- If you install the repo on a laptop, start with uv sync --extra cpu and the CPU or MPS example, not the speedrun.

## Acceptance checks

- $48 and $43,000 are sourced, and $43,000 is labelled an estimate.
- The 1.65 hour record and the CORE target are present.
- Agent brief link is present.
- [ ] Proceed to [lesson 07 brief](07-when-an-agent-runs-the-loop.llms.md).
