nanochat is an open-source, full-stack implementation of a ChatGPT-like language model that can be trained for just $100 in 4 hours on an 8XH100 GPU node, providing a clean, minimal, and hackable codebase with complete pipeline from tokenization to deployment.
https://github.com/karpathy/nanochat?ref=producthunt
nanochat

Product Information

Updated:Oct 17, 2025

What is nanochat

Created by Andrej Karpathy, former Tesla AI director and OpenAI co-founder, nanochat is a comprehensive project that builds upon his earlier nanoGPT work. It's designed as a complete end-to-end training and inference pipeline for creating ChatGPT-style language models, packaged in approximately 8,000 lines of clean code. The project serves as the capstone for Karpathy's LLM101n course at Eureka Labs and aims to make large language model development more accessible and educational for researchers, students, and developers.

Key Features of nanochat

Nanochat is a full-stack, open-source implementation of a ChatGPT-like model created by Andrej Karpathy that can be trained for just $100 in 4 hours on an 8XH100 GPU node. It provides a complete pipeline including tokenization, pretraining, fine-tuning, evaluation, inference, and web serving in a clean, minimal codebase of about 8,000 lines. The project aims to democratize LLM development by making it accessible and understandable while maintaining efficiency and functionality.
End-to-End Training Pipeline: Complete implementation from tokenization to web serving, with all components integrated into a single codebase that can be run via simple scripts
Cost-Effective Training: Achieves basic ChatGPT-like functionality with just $100 worth of compute time (4 hours on 8XH100 GPUs), making it accessible to individual researchers and small teams
Minimal Dependencies: Clean, hackable codebase with minimal external dependencies, making it easy to understand and modify
Scalable Architecture: Supports training larger models with different computational budgets, from $100 basic models to $1000 more capable versions

Use Cases of nanochat

Educational Tool: Serves as a practical learning resource for students and researchers studying LLM development through LLM101n course
Research Platform: Provides a foundation for AI researchers to experiment with and improve upon LLM architectures and training methods
Prototype Development: Enables quick development and testing of custom chatbots for specific applications with minimal investment

Pros

Highly accessible and cost-effective for entry-level LLM development
Clean, readable codebase that's easy to understand and modify
Complete end-to-end implementation with minimal dependencies

Cons

Limited capabilities compared to large commercial models
Requires specific hardware setup (H100 GPUs) for optimal performance
Not yet fully optimized or tuned for maximum performance

How to Use nanochat

Set up computing environment: Boot up a new 8XH100 GPU node from a cloud provider (e.g. Lambda GPU Cloud). This will cost approximately $24/hour.
Clone the repository: Run 'git clone [email protected]:karpathy/nanochat.git' and 'cd nanochat' to get the code and enter the project directory
Run the speedrun script: Execute 'screen -L -Logfile speedrun.log -S speedrun bash speedrun.sh' to start training. This will run for about 4 hours and log output to speedrun.log
Monitor training progress: You can watch progress inside the screen session or detach with 'Ctrl-a d' and use 'tail speedrun.log' to view progress
Activate virtual environment: Once training is complete, activate the local uv virtual environment with 'source .venv/bin/activate'
Launch web interface: Run 'python -m scripts.chat_web' to start the ChatGPT-like web interface
Access the interface: Visit the URL shown, using the public IP of your node followed by the port (e.g. http://209.20.xxx.xxx:8000/)
View model performance: Check the generated 'report.md' file in the project directory to see evaluations and metrics of your trained model
Interact with model: Use the web interface to interact with your trained LLM - ask questions, request stories/poems, or test its capabilities

nanochat FAQs

Nanochat is a full-stack implementation of an LLM like ChatGPT in a single, clean, minimal, hackable, dependency-lite codebase. It's designed to create a ChatGPT-like model for around $100 worth of compute costs.

Latest AI Tools Similar to nanochat

Folderr
Folderr
Folderr is a comprehensive AI platform that enables users to create custom AI assistants by uploading unlimited files, integrating with multiple language models, and automating workflows through a user-friendly interface.
Peache.ai
Peache.ai
Peache.ai is an AI character chat playground that enables users to engage in flirty, witty, and daring conversations with diverse AI personalities through real-time interactions.
TalkPersona
TalkPersona
TalkPersona is an AI-powered video chatbot that provides real-time human-like conversation through a virtual talking face with natural voice and lip-sync capabilities.
Thaly AI
Thaly AI
Thaly AI is an AI-powered sales assistant that automates customer conversations and lead qualification to help businesses scale their sales operations while saving time.