# nanochat — AI Coding Tool Review & Pricing

> nanochat is Andrej Karpathy's minimal, hackable harness for training a ChatGPT-style LLM from scratch on a single GPU node. It covers the full pipeline (tokenization, pretraining, supervised finetuning, reinforcement learning, evaluation and inference) in a small PyTorch codebase, and you can talk to the resulting model over a CLI or web UI.

Source: https://ai.dosa.dev/tools/nanochat · Updated Nov 1, 2026 · Category: Hardware & Edge AI · Published by dosa.dev

## At a glance

- **Tool**: nanochat
- **Company**: Andrej Karpathy
- **Category**: [Hardware & Edge AI](https://ai.dosa.dev/category/hardware-edge)
- **Pricing model**: Open Source
- **Official website**: https://github.com/karpathy/nanochat

## Key features

- End-to-end pipeline: tokenizer, pretraining, SFT, RL, evaluation and KV-cache inference in one small codebase
- Single --depth dial that derives width, heads, learning rates, training horizon and weight decay for compute-optimal models
- runs/speedrun.sh trains a GPT-2-grade model in about 2 hours on an 8xH100 node
- Public time-to-GPT-2 leaderboard measured by the DCLM CORE score
- Built-in evals (CORE, ARC, GSM8K, HumanEval, MMLU), a Python tool-use sandbox and CPU/MPS support for small runs

## Pricing

**Model**: Open Source

nanochat is free and open-source under the MIT license. The only cost is GPU compute: the reference GPT-2-grade speedrun takes about 2 hours on an 8xH100 node (roughly $48 at ~$3 per GPU-hour, or closer to $15 on spot instances), while small experiments can run on a single GPU, CPU or Apple Silicon.

## Who it is for

- **Best for**: Developers, researchers and students who want to understand or experiment with every stage of LLM training using a readable codebase and a modest GPU budget.
- **Not ideal for**: Anyone wanting a production-quality assistant or coding model: the resulting models are small and hallucinate freely, and serious runs need multi-GPU H100 or A100 hardware.

## Verdict

The clearest hands-on reference for how a modern chat LLM is built end to end, best used as a learning and research harness rather than a model to deploy.

## Recent updates

The 2026 work focused on pretraining speed: the time-to-GPT-2 record fell from about 3.04 hours (January) to 1.65 hours (March) through fp8, larger batches, the NVIDIA ClimbMix dataset and agent-driven autoresearch rounds. July 2026 commits added inference benchmarking (scripts/infer_bench.py), tests, a unified optimizer implementation and a hardened execution sandbox.

## Frequently asked questions

### Is nanochat free?

Yes - nanochat is Open Source. nanochat is free and open-source under the MIT license. The only cost is GPU compute: the reference GPT-2-grade speedrun takes about 2 hours on an 8xH100 node (roughly $48 at ~$3 per GPU-hour, or closer to $15 on spot instances), while small experiments can run on a single GPU, CPU or Apple Silicon.

### Is nanochat open source?

Yes - nanochat is open source. nanochat is free and open-source under the MIT license. The only cost is GPU compute: the reference GPT-2-grade speedrun takes about 2 hours on an 8xH100 node (roughly $48 at ~$3 per GPU-hour, or closer to $15 on spot instances), while small experiments can run on a single GPU, CPU or Apple Silicon.

### Who is nanochat best for?

Developers, researchers and students who want to understand or experiment with every stage of LLM training using a readable codebase and a modest GPU budget.

### Who is nanochat not ideal for?

Anyone wanting a production-quality assistant or coding model: the resulting models are small and hallucinate freely, and serious runs need multi-GPU H100 or A100 hardware.

### What are the best nanochat alternatives?

The closest nanochat alternatives on ai.dosa.dev are Copperhead, NVIDIA Personal AI Router (PAIR), WebLLM - all listed under Hardware & Edge AI.

### Who makes nanochat?

nanochat is developed by Andrej Karpathy. It is listed in the Hardware & Edge AI category on ai.dosa.dev.

## Top alternatives

- [Copperhead](https://ai.dosa.dev/tools/copperhead) (Freemium) — Hardware engineers who want to automate design tasks, sync documentation with schematic changes, and maintain consistency in KiCad repositories.
- [NVIDIA Personal AI Router (PAIR)](https://ai.dosa.dev/tools/personal-ai-router) (Open Source) — Multi-agent AI workflows and concurrent inference tasks that benefit from distributing parallel requests across multiple local machines.
- [WebLLM](https://ai.dosa.dev/tools/webllm) (Open Source) — Developers building privacy-first web applications, in-browser AI assistants, or Chrome extensions that require local LLM execution without server-side infrastructure.
- [Magnitude](https://ai.dosa.dev/tools/magnitude) (Free) — Developers and power users running local coding agents on Apple Silicon or NVIDIA hardware who require high-performance, low-latency inference.
- [text-to-cad](https://ai.dosa.dev/tools/text-to-cad) (Open Source) — Rapid prototyping, creating custom brackets or fixtures, robotics development using URDF, and preparing manufacturable files from AI prompts.
- [colibri](https://ai.dosa.dev/tools/colibri) (Free) — Developers who want to run frontier-scale open MoE models such as GLM, DeepSeek, Kimi or Qwen locally for private coding-agent work without buying datacenter GPUs.
- Full alternatives guide: https://ai.dosa.dev/tools/nanochat/alternatives
