Coding Modelswhere the world grades homework

Topic 66 of 90Module 8: Model Types3 min read

Why did code become the field's favorite domain — the place where models improved fastest and products (Copilot, Claude Code, Cursor) matured first? Four reasons, three of which you can already recite:

  1. Verification asymmetry, maximal (Topics 58, 27): code has free, instant, objective verifiers — compilers, type-checkers, test suites, execution. That makes it RLVR heaven (reward = tests pass, unhackable) and agent heaven (every step checkable, converting compounding failure into retry-until-verified).
  2. Training data abundance: decades of public code with commits, issues, and reviews — process data, not just artifacts.
  3. Economic pull: developers pay, measure productivity, and tolerate iteration.
  4. The bonus: code in the pretraining mixture improves general reasoning (Topic 18's note) — structured, causal, consequence-laden text turns out to be excellent brain food.

What makes a model a "coding model" — a recipe you fully possess: heavy code in the data mixture, often via continued pretraining at Topic 20 scale (Code Llama = Llama 2 + ~500B code tokens — the sandwich, deployed); long context for repositories; and one genuinely new training format: FIM — fill-in-the-middle. Standard training predicts left-to-right, but real coding means inserting code between existing lines. FIM restructures training examples with special tokens — here's the prefix, here's the suffix, now produce the middle — teaching bidirectional-ish completion within the causal architecture. FIM is what powers every Tab-completion you've ever accepted.

Which surfaces the key product split — two different animals sharing the word "coding model":

Completion modelsAgentic/chat coding models
JobTab-complete as you type"Fix this issue across the repo"
TrainingFIM-heavyInstruction + tool-use + RL on real tasks
Latency budget<500 ms — SLM territory (Topic 63)Minutes acceptable — frontier territory
ShapeOne fast infillTopic 58's loop: read, edit, run tests, iterate

The agentic side is trained increasingly on execution feedback — RL over real repository tasks where reward is the test suite going green — which is why the benchmark that matters shifted from HumanEval (small function puzzles, now saturated and contamination-riddled) to SWE-bench (resolve actual GitHub issues in real repos, end-to-end) and contamination-resistant designs like LiveCodeBench that only use problems published after model cutoffs — Topic 18's decontamination principle, weaponized into benchmark design. Names on the open side: Qwen-Coder, DeepSeek-Coder, Codestral.

Summary

Code leads because verification is free — enabling RLVR training and reliable agents — atop abundant process-rich data. Coding models = code-heavy mixtures + FIM for completion, or tool-use + execution-feedback RL for agents; two products, two training recipes, two latency worlds.

Mental model

Code is the one subject where the universe is a tireless, incorruptible teaching assistant — grading every attempt instantly, for free, with no partiality to confident nonsense. Of course the students improved fastest there.

Mistakes to avoid

  • Judging "coding ability" by autocomplete when you need an agent, or vice versa. A brilliant FIM model may be a poor agent and the reverse — match the animal to the job before comparing.
  • Trusting HumanEval-style scores in 2026. Saturated, contaminated, and unlike real work — look at SWE-bench-class, contamination-resistant numbers (a Topic 18 reflex by now).

Exercise

Feel FIM directly: in any completion-capable setup (an editor's tab model, or a coder model via Ollama), write a function's signature and its final return line, leave the body empty, and let it fill the middle. Then delete the return line and try again — watch quality change with suffix context. You've just observed the difference between left-to-right prediction and FIM, empirically.