# karpathy/nanochat

> The best ChatGPT that $100 can buy.

- GitHub: https://github.com/karpathy/nanochat
- Category: LLM & Inference (https://ideas.asveas.com/c/llm)
- Tags: openai, python
- Language: Python · License: MIT
- Stars: 60,458 · Forks: 8,477 · Open issues: 137
- Last push: 2026-09-07 (2 months ago)
- Vibe score: 75/100

## What it is
nanochat is the simplest experimental harness for training LLMs. It is designed to run on a single GPU node, the code is minimal/hackable, and it covers all major LLM stages including tokenization, pretraining, finetuning, evaluation, and inference. For example, you can train your own GPT-2 capability LLM (which cost $43,000 to train in 2019) for only $48 (2 hours of 8XH100 GPU node) and then talk to it over a simple CLI. On a spot instance, the total cost can be closer to ~$15. More generally, nanochat is configured out of the box to train an entire miniseries of compute-optimal models by setting one single complexity dial: --depth, the number of layers in the GPT transformer model (GPT-2…

## When to use it
Reach for nanochat when you need to call, serve, run locally, fine-tune or chat with a language model — it's written in Python and fits stacks tagged openai.

## Maintenance
karpathy/nanochat looks actively maintained: the last push was 2 months ago (2026-09-07), with 60,458 stars and 137 open issues.

## Quick start
```bash
git clone https://github.com/karpathy/nanochat.git
```

## Alternatives in LLM & Inference
- [ollama/ollama](https://github.com/ollama/ollama) — Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models. (★187k, Go, vibe 99/100) · details: https://ideas.asveas.com/r/ollama/ollama
- [huggingface/transformers](https://github.com/huggingface/transformers) — 🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. (★169k, Python, vibe 98/100) · details: https://ideas.asveas.com/r/huggingface/transformers
- [open-webui/open-webui](https://github.com/open-webui/open-webui) — User-friendly AI Interface (Supports Ollama, OpenAI API, ...) (★158k, Svelte, vibe 98/100) · details: https://ideas.asveas.com/r/open-webui/open-webui
- [langflow-ai/langflow](https://github.com/langflow-ai/langflow) — Langflow is a powerful tool for building and deploying AI-powered agents and workflows. (★157k, Python, vibe 98/100) · details: https://ideas.asveas.com/r/langflow-ai/langflow
- [vllm-project/vllm](https://github.com/vllm-project/vllm) — A high-throughput and memory-efficient inference and serving engine for LLMs (★96.8k, Python, vibe 96/100) · details: https://ideas.asveas.com/r/vllm-project/vllm
- [lobehub/lobehub](https://github.com/lobehub/lobehub) — 🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week. (★85k, TypeScript, vibe 95/100) · details: https://ideas.asveas.com/r/lobehub/lobehub

---
Source: https://ideas.asveas.com/r/karpathy/nanochat · Catalog: https://ideas.asveas.com/llms.txt
