How We Built Zeta2: Training an Edit Prediction Model in Production — Ben Kunkle, Zed

How We Built Zeta2: Training an Edit Prediction Model in Production — Ben Kunkle, Zed

More

Descriptions:

Ben Kunkle, edit predictions lead at Zed, delivers a detailed technical walkthrough of how the team trained Zeta2 — Zed’s small, specialized model that predicts the next code edit a developer is about to make on every keystroke. The talk covers the full production training pipeline: collecting opt-in editor snapshots from real users, using knowledge distillation from a frontier model to generate training labels, and running a “repair step” where a second frontier model corrects low-quality predictions flagged by heuristic filters.

Kunkle goes deep on one of the harder engineering problems: generating high-quality training data from “settled” edits — waiting until a user finishes editing a region to capture the ground-truth outcome. This approach is noisy by nature (users change their minds, agents rewrite code entirely), so Zed validates candidate examples by sampling 50 outputs from its own student checkpoint and checking proximity to the settled state via Levenshtein distance. This replaced an approach that required 1 million frontier model API calls per 100k training examples — prohibitively expensive in practice.

The pipeline stores everything as JSONL so each stage simply appends fields, keeping experimentation flexible and cacheable across runs. Offline evaluation uses delta CaRF, an n-gram Levenshtein metric, against a held-out test set. Kunkle also explains the philosophy behind targeting “interesting” training examples — those in the middle difficulty band where the model almost gets it right — as the highest-signal data for improving edit prediction quality.


📺 Source: AI Engineer · Published May 30, 2026
🏷️ Format: Deep Dive

1 Item

Channels