Reading

Karpathy's Software 2.0: when the program is neural network weights

TL;DR

Karpathy calls neural networks Software 2.0: the program is weights optimised from data, so data and evals are the source code. Use it for fuzzy problems that resist rules, and keep explicit code for what must be exactly right.

In November 2017, Andrej Karpathy, then leading AI at Tesla, wrote "Software 2.0". Its claim sounded bold at the time: neural networks aren't "just another classifier" but a new way of writing software, where most of the logic isn't written by people. Years later, with LLMs and coding agents, it reads like a prophecy and remains a useful mental model.

Software 1.0 vs 2.0

Software 1.0Software 2.0
The program isExplicit instructions (Python, C++)Neural network weights
Who "writes" itProgrammers, line by lineOptimisation, from data and a goal
The human's jobWrite and debug codeCollect, label and clean data; choose architecture and objective

Karpathy describes how at Tesla, 2.0 code (neural networks) gradually "ate" the hand-written 1.0 code of the autopilot system.

Benefits named in the essay

  • Computationally homogeneous: mostly matrix multiplication, easy to optimise in hardware.
  • Constant running time and memory: no surprise loops.
  • Agile: want it twice as fast? Shrink the network and retrain, trading a little accuracy.
  • Modules meld: the whole system can be optimised jointly.
  • Better than you: in many domains (images, speech), networks learn better solutions than hand-written code.

Limitations, also stated plainly

  • It's hard to understand why a network made a decision.
  • It fails in unintuitive ways, including being fooled by adversarial inputs.
  • It inherits biases from its data.

Rereading it in the LLM era

  • "Data is code": AI product quality depends on data and evals more than on the surrounding code. As predicted, tooling for data management, labelling and evaluation became critical infrastructure.
  • The next step: Karpathy later extended the idea to "Software 3.0", where natural-language prompts become the programs that steer LLMs. All three layers coexist: code, weights and prompts.
  • The limitations remain: hard to explain, unpredictable failures, data bias; exactly why we need evals, guardrails and human review.

Caveats when applying it

  • Not everything should be 2.0: business logic that must be exactly right (billing, permissions) should stay explicit code.
  • Debugging is different: fixing Software 2.0 usually means fixing data or prompts and measuring with evals, not setting breakpoints.

How to apply it

  • Dev: When a function is an ever-growing if-else chain handling natural language, consider replacing it with an LLM plus evals; keep explicit code for what must be exact.
  • Tech Lead: Manage eval data, prompts and model config like code: versioned, reviewed, in CI.
  • PM: Plan resources for data and evaluation, not only for "building features".

Sources & references

  1. Software 2.0 — Andrej Karpathy