Karpathy Builds Nanochat By Hand, Challenges AI "Vibe Coding" Culture

Andrej Karpathy's nanochat, a hand-coded LLM pipeline, challenges "vibe coding" and champions deep human understanding in AI development.

October 17, 2025

Karpathy Builds Nanochat By Hand, Challenges AI "Vibe Coding" Culture
In a pointed counter-narrative to the prevailing winds of AI-driven software development, esteemed AI researcher Andrej Karpathy has unveiled "nanochat," a complete, from-scratch pipeline for training a ChatGPT-style model. The project, contained within approximately 8,000 lines of code, is significant not only for its technical scope but for Karpathy's declaration that it was "basically entirely hand-written."[1][2] This statement serves as a direct rebuttal to "vibe coding," a term Karpathy himself coined to describe a growing reliance on large language models (LLMs) to generate code from natural language prompts, often without deep human comprehension of the output.[3][4][5][6] Karpathy’s emphasis on manual craftsmanship in nanochat champions a return to first principles, advocating for deep understanding in an era where the inner workings of AI are increasingly abstracted away.
The concept of "vibe coding" has rapidly entered the developer lexicon, referring to a workflow where a programmer guides an AI assistant with high-level prompts, iteratively refining the AI-generated code until the desired functionality is achieved.[3][4][6][7][8] Proponents argue this method accelerates development, lowers the barrier to entry for new creators, and allows experienced developers to focus more on creative problem-solving than on the minutiae of syntax.[4][7][8] However, this approach carries risks, including a potential lack of accountability, reduced code maintainability, and the introduction of subtle bugs or security flaws when developers accept code they do not fully understand.[5] Karpathy’s experience in building nanochat brings this trade-off into sharp relief. He noted that he attempted to use AI coding agents like Claude and Codex but found them "net unhelpful," speculating that the bespoke nature of the repository was too far from their training data distribution to yield useful results.[1][2] By handwriting the code with only basic tab-autocomplete, Karpathy positions nanochat as an artifact of deliberate, human-led engineering, a stark contrast to a process where one might "forget that the code even exists."[6][9][10]
The nanochat repository is designed as a powerful educational tool, intended to demystify the complex process of building a modern large language model.[11][12][13] It provides a full-stack, end-to-end implementation that covers every stage of the pipeline: training a tokenizer in Rust, pretraining a Transformer model, supervised fine-tuning (SFT) on conversational data, and optional reinforcement learning, culminating in an interactive web interface for chatting with the newly created model.[11][14][15] Karpathy's stated goal is to create a "cohesive, minimal, readable, hackable, maximally forkable repo" that can serve as the capstone project for his forthcoming undergraduate-level course, LLM101n.[11] The project is engineered for accessibility, with a "speedrun" script that allows a user to train a small but functional ChatGPT clone on a cloud GPU node in about four hours for approximately $100.[11][12][14][15] Scaling options are also detailed, with more capable models achievable with larger budgets and longer training times, providing a clear, practical roadmap for learners and experimenters.[11][14]
The release of nanochat and Karpathy's commentary on its creation carry significant implications for the AI industry. As AI models and the tools to build them become more powerful and opaque, there is a growing concern about the deskilling of the next generation of engineers and a loss of foundational knowledge. Projects like nanochat, and Karpathy’s broader educational efforts like his "Zero to Hero" series, directly counter this trend by providing radically open and understandable resources.[12][16][17][18] By building a complex system from the ground up in a clean, dependency-light codebase, Karpathy demonstrates that true understanding is not only possible but essential for meaningful innovation. In a field increasingly dominated by massive, closed-off models, nanochat stands as a testament to the value of transparency and hands-on learning, proving that deep comprehension of AI systems doesn't have to be prohibitively expensive or complex. It makes a compelling case that to truly master the future of AI, one must first be willing to write the code by hand.

Sources
Share this article