Skip to main content

Build a Custom ChatGPT for $100 with Open-Source nanochat

Build Your Own ChatGPT Clone for Under $100

Artificial intelligence development has taken a significant leap toward accessibility with the launch of nanochat, an open-source project that allows developers to build a fully functional chat AI system at minimal cost. Created by renowned AI expert Andrej Karpathy, this tool represents what he calls "the best ChatGPT implementation under $100."

Breaking Down Barriers in AI Development

The project serves dual purposes: as both a practical tool and an educational resource. Unlike previous implementations that focused solely on pre-training, nanochat provides an end-to-end pipeline covering:

  • Model training
  • Fine-tuning
  • Performance evaluation
  • Interactive deployment

The entire system comprises approximately 8,000 lines of code with minimal dependencies, making it exceptionally readable and modifiable.

Image

Technical Specifications and Process Flow

The workflow requires:

  1. Starting a cloud node with 8 H100 GPUs (~$24/hour)
  2. Running the smoothrun.sh script
  3. Completing the process in about 4 hours

The technical process includes:

  • Data preprocessing: Using high-quality corpora like FineWeb-Edu
  • Tokenization: Fast Rust-based tokenizer supporting 65,536 vocabulary size
  • Pre-training: PyTorch-based Transformer model training
  • Fine-tuning: Integration of SmolTalk dialogue dataset and reinforcement learning optimization

The final product supports both command-line and web interfaces, capable of generating stories, answering questions, and even handling basic tool calls.

Performance Metrics and Scaling Options

The project demonstrates remarkable scalability: | Training Duration | Cost | Capabilities Achieved | |-------------------|--------|-----------------------| | 4 hours | ~$100 | Basic conversational ability | | 12 hours | ~$300 | Surpasses GPT-2 metrics | | 41.6 hours | ~$1,000| Solves math/code problems (40% MMLU accuracy) |

The model achieves particularly strong results in multiple-choice testing scenarios.

Educational Value and Community Impact

As the capstone project for Karpathy's LLM101n course, nanochat aims to provide:

  • A unified baseline stack
  • Readable/modifiable code
  • Complete workflow transparency

The GitHub repository has already generated significant community engagement (Project URL).

Key Points:

  1. Creates functional chatbot clones for under $100
  2. Complete training-to-deployment pipeline in ~4 hours
  3. Educational focus with transparent code structure
  4. Scales effectively with additional compute resources
  5. Potential benchmark for AI education/research

Enjoyed this article?

Subscribe to our newsletter for the latest AI news, product reviews, and project recommendations delivered to your inbox weekly.

Weekly digestFree foreverUnsubscribe anytime

Related Articles

LTX-2 Opens New Era for AI Video Creation
News

LTX-2 Opens New Era for AI Video Creation

The Lightricks team has unleashed LTX-2, a groundbreaking open-source model that generates synchronized 4K video and audio in one shot. Running smoothly on consumer GPUs, this technology brings professional-grade video creation to your desktop. Developers are already celebrating its arrival with ready-to-use workflows and optimized performance.

January 7, 2026
AI-videoopen-sourcecreative-tools
News

Microsoft's AI Breakthrough Could Revolutionize Code Migration

Microsoft is quietly developing an AI-powered solution to tackle one of computing's toughest challenges: migrating software between different chip architectures. Dubbed 'Project Strong ARMed,' this initiative uses generative AI to automatically translate x64 code for ARM processors, potentially saving developers countless hours of manual work. While initially focused on Microsoft's own Cobalt 100 server chips, the technology promises to bridge compatibility gaps across Windows and even Linux platforms.

December 30, 2025
AI-developmentMicrosoftprocessor-architecture
PromptFill Turns AI Art Prompts Into Simple Fill-in-the-Blank Exercises
News

PromptFill Turns AI Art Prompts Into Simple Fill-in-the-Blank Exercises

A new open-source tool called PromptFill is revolutionizing AI art creation by simplifying complex prompts into intuitive fill-in-the-blank templates. With drag-and-drop functionality and a smart keyword library, it eliminates the need to memorize technical syntax while preserving creative control. The tool has already gained traction in the open-source community for making AI art more accessible to beginners and professionals alike.

December 22, 2025
AI-artcreative-toolsopen-source
News

Nvidia boosts open-source AI with SchedMD buy and new model releases

Nvidia is making waves in the open-source AI community with two major moves. The tech giant acquired SchedMD, the company behind the popular Slurm workload manager, while promising to maintain its open-source status. Simultaneously, Nvidia unveiled its Nemotron 3 AI model series and a new vision-language model for autonomous driving research, signaling its growing commitment to physical AI applications.

December 16, 2025
Nvidiaopen-sourceAI-models
News

Google Cloud's AlphaEvolve: Your New AI Coding Partner

Google Cloud has unveiled AlphaEvolve, an innovative AI coding assistant powered by its Gemini architecture. This tool promises to revolutionize algorithm design by helping developers create complex code faster while offering deep learning capabilities. Currently in private preview, AlphaEvolve could become an indispensable asset across fields from finance to scientific computing.

December 10, 2025
AI-developmentGoogleCloudcoding-tools
Google's Antigravity IDE: A New Era for AI-Assisted Coding
News

Google's Antigravity IDE: A New Era for AI-Assisted Coding

Google has unveiled Antigravity, a groundbreaking AI-powered development tool that's changing how programmers work. This innovative IDE integrates Gemini3Pro with other AI models, offering automatic process documentation and multi-agent management. What sets it apart? The ability to track every step through detailed 'artifacts' while letting developers oversee multiple AI assistants simultaneously. Currently in free public preview, Antigravity supports major operating systems and promises to reshape our coding workflows.

November 19, 2025
AI-developmentGoogle-ToolsProgramming-Future