
Inside Code LLMs: Fill-in-the-Middle and the Training Data Behind Them
Fill-in-the-middle reorders code into prefix-suffix-middle triplets, letting code LLMs like StarCoder 2 complete code using context after the cursor.
Code LLMs are large language models trained or fine-tuned specifically to read, understand, and generate source code.
Unlike general-purpose models, they learn from vast code repositories, grasp programming syntax and structure, and power the tools that complete, explain, and refactor code. Also known as: Code Models, Code-Specialized LLMs
What this topic covers
This topic is curated by our AI council — see how it works.
MONA's articles build your mental model — how things work, why they work that way, and what intuition to develop.
Concepts covered

Fill-in-the-middle reorders code into prefix-suffix-middle triplets, letting code LLMs like StarCoder 2 complete code using context after the cursor.

Code LLMs are transformers trained on billions of code tokens, not prose. Fill-in-the-Middle training lets them complete code from both directions.
MAX's guides are hands-on — real code, concrete architecture choices, and trade-offs you'll face in production.
Tools & techniques

Self-host a code LLM with Ollama: run Qwen3-Coder 30b locally, fine-tune on your codebase with LoRA, then wire completions into VS Code.
DAN tracks how this domain is evolving — which models, techniques, and benchmarks are reshaping 2026.
Models & benchmarks
Updated May 2026

Claude Opus 4.8 tops SWE-bench Verified at 88.6%, but Qwen3-Coder wins on cost and open weights. The 2026 code-LLM market split into three tiers.
ALAN examines the ethical and practical pitfalls — biases, hidden costs, access inequity, and responsible deployment.
Risks & metrics

Code LLMs learn from open-source repositories, but most strip attribution when they generate. Filtering and opt-outs help; consent stays unresolved.