Skip to main content
Editorial illustration for Andrej Karpathy Releases nanochat: Open-Source ChatGPT Clone

Editorial illustration for Andrej Karpathy Launches nanochat, an Open-Source ChatGPT Alternative

Karpathy Launches nanochat: Open-Source AI Chatbot Clone

Andrej Karpathy Releases nanochat: Open-Source ChatGPT Clone

Updated: 3 min read

Andrej Karpathy simplifies the complex. That's his signature move. With his new release, nanochat, he does it again.

You want your own ChatGPT-style bot? Here's the complete manual. Rent some cloud GPUs.

Run one script. Wait. In roughly four hours and for about a hundred dollars, you get a model you can converse with.

The astonishing part is the total lack of mystery.

OpenAI co-founder and Eureka Labs founder, Andrej Karpathy, has released nanochat, an open-source project that provides a full-stack training and inference pipeline for a simple ChatGPT-style model. The repository follows his earlier project, nanoGPT, which focused only on pretraining. Link to the GitHub repository.

In a post on X, Karpathy said, “You boot up a cloud GPU box, run a single script and in as little as 4 hours later you can talk to your own LLM in a ChatGPT-like web UI.” The repo consists of about 8,000 lines of code and covers the entire pipeline. It includes tokeniser training in Rust and pretraining a Transformer LLM on FineWeb. The pipeline also handles mid-training on user-assistant conversations and multiple-choice questions, supervised fine-tuning (SFT), and optional reinforcement learning (RL) with GRPO.

Finally, it supports efficient inference with KV caching. Users can interact with the model through a command-line interface or a web UI, and the system generates a markdown report summarising performance. Karpathy explained that the models can be trained at different scales depending on time and cost.

A small ChatGPT clone can be trained for around $100 in roughly 4 hours on an 8×H100 GPU node, allowing basic interaction. Training for about 12 hours enables the model to surpass the GPT-2 CORE benchmark.

Don't mistake this for a toy. Those 8,000 lines of code are a full-stack factory. It builds a tokenizer from scratch.

It pre-trains a transformer. It shapes the model with conversation and multiple-choice questions. You can apply fine-tuning.

You can even run reinforcement learning. The final output is a chat interface and a performance report. Train it a bit longer and it beats GPT-2.

Karpathy hasn't just built a clone. He's built a replicable, auditable production line for them. The real value of nanochat isn't the chatbot it creates.

It's the demystification. The entire opaque, multi-stage ritual of modern AI training collapses into one terminal command and a clear invoice. For anyone curious, it turns an abstract concept into something tangible.

Something you can break. You can modify it. The output is a functional model.

The real product is pure, actionable understanding.

Common Questions Answered

How does Andrej Karpathy's nanochat differ from commercial AI chatbots?

Nanochat is an open-source project that provides a transparent, buildable ChatGPT-style model that developers can understand and modify. Unlike closed commercial AI chatbots, nanochat offers a full-stack training and inference pipeline that allows users to create their own language model with relative ease.

What is the estimated time to create a custom AI chatbot using nanochat?

According to Karpathy, users can boot up a cloud GPU and potentially create their own ChatGPT-like language model in as little as 4 hours. The project builds on his previous nanoGPT work and simplifies the complex machine learning workflow for developers.

What makes nanochat significant for AI development?

Nanochat represents a step towards democratizing AI model development by providing an accessible, open-source alternative to proprietary AI chatbots. The project allows developers to train and modify their own language models, potentially increasing transparency and understanding of generative AI technologies.

LIVE03:21OpenAI's Miles Wang in Talks for USD 2B AI Drug Discovery Startup