DeepSeek Coder V2: The Open-Source MoE Code Model Explained

DeepSeek Coder V2 hit 90.2% on HumanEval as an open MoE coder. See specs, benchmarks, pricing and how to access it today.

Models·April 25, 2026·By DS Guide Editorial
DeepSeek Coder V2 model card showing the headline specs of DeepSeek's June 2024 open-source MoE code-language release: a 236 billion-parameter full model with 21 billion active per token alongside a 16 billion Lite tier, continued-pre-trained on 6 trillion additional code-focused tokens with a 128,000-token context window and 90.2 percent on HumanEval.

If you’re picking an open-weight code model, where does DeepSeek Coder V2 fit now that DeepSeek’s API runs much newer models? This guide covers the architecture, the benchmark numbers from DeepSeek’s June 2024 technical report, licensing, and the realistic ways to use the model today: download the open weights from Hugging Face and run them yourself. DeepSeek’s API no longer lists Coder V2; its pricing page (checked 26 October 2026) lists only deepseek-flash and deepseek-v4-pro. DeepSeek Coder V2 was the company’s mid-2024 attempt to close the gap with GPT-4-Turbo on code, and its report’s headline numbers (90.2% HumanEval, 76.2% MBPP+, 128K context) remain a common reference point for 2024-era open coding models.

What is DeepSeek Coder V2?

Simplified schematic of Mixture-of-Experts routing: a code prompt passes through a router to eight drawn experts, two of them highlighted, and comes out as a generated Python function. Not to scale: DeepSeek Coder V2 actually activates 6 of 160 routed experts (64 in Lite) plus 2 shared experts per token.

DeepSeek Coder V2 is an open-source Mixture-of-Experts (MoE) code language model. According to its model card, it is further pre-trained from an intermediate checkpoint of DeepSeek-V2 with an additional 6 trillion tokens, which substantially enhances coding and mathematical reasoning while keeping general-language performance comparable. DeepSeek’s stated aim was performance comparable to GPT-4-Turbo on code-specific tasks with open weights. The technical report was posted to arXiv on 17 June 2024.

The release covers two sizes, a Lite 16B model and a full 236B model, each with Base and Instruct variants. Compared with the first DeepSeek Coder, it expanded programming-language support from 86 to 338 and extended context length from 16K to 128K. If you want a wider picture of where this model sits in the lineage, the DeepSeek models hub is the index.

Architecture and lineage

DeepSeek Coder V2 is built on the DeepSeekMoE framework: the 16B and 236B models activate only 2.4B and 21B parameters per token respectively. The published configs show the expert layout: the 236B model has 160 routed experts plus 2 shared experts, the Lite model 64 routed plus 2 shared, and both activate 6 routed experts per token. That sparsity is the point of the architecture: inference compute scales with the active parameters, although all weights still have to be held in memory.

It is a continuation of the original DeepSeek V2, not a from-scratch model. The earlier DeepSeek Coder family (1.3B–33B dense) was trained from scratch on 2T tokens with a 16K window; Coder V2 inherits V2’s MoE design and adds the 6T-token continued pre-training.

Spec DeepSeek Coder V2-Lite DeepSeek Coder V2 (full)
Total parameters 16B 236B
Active parameters 2.4B 21B
Architecture MoE (64 routed + 2 shared experts, 6 routed active) MoE (160 routed + 2 shared experts, 6 routed active)
Context length 128K 128K
Languages supported 338 338
Technical report arXiv, 17 June 2024 arXiv, 17 June 2024
Variants Base, Instruct Base, Instruct (plus Instruct-0724)

Training recipe in one paragraph

Per the technical report, the continued pre-training corpus was 60% source code, 10% maths and 30% natural language, with 1,170B code-related tokens from GitHub and CommonCrawl. Counting the 4.2T tokens the intermediate DeepSeek-V2 checkpoint had already seen, the model was exposed to 10.2T tokens in total. Only the 16B Lite model was trained with a Fill-In-the-Middle (FIM) objective (at a 0.5 rate); the 236B model used next-token prediction only. That matters if you plan to use it as an editor backend. Alignment used supervised fine-tuning followed by reinforcement learning with GRPO.

Benchmarks (from the V2 report)

Illustrative graphic headed Language coverage listing ten programming languages (Python, JavaScript, TypeScript, Rust, Go, C++, Java, SQL, Bash, Solidity) with decorative bars; DeepSeek Coder V2 supports 338 languages, and the bar lengths are not measured data.

All numbers below are DeepSeek-reported, from the Coder V2 technical report and GitHub README, and compare the 236B Instruct with the closed-source models of mid-2024 (GPT-4-Turbo, GPT-4o-0513, Claude-3-Opus, Gemini-1.5-Pro). Treat them as 2024 numbers; newer models have moved on.

Benchmark Coder V2-Instruct (236B) Coder V2-Lite-Instruct (16B) Best closed-source in the table (mid-2024)
HumanEval 90.2 81.1 GPT-4o-0513: 91.0
MBPP+ 76.2 68.8 Gemini-1.5-Pro: 74.6
LiveCodeBench (Dec 23–Jun 24) 43.4 24.3 GPT-4-Turbo-0409: 45.7
USACO 12.1 6.5 GPT-4o-0513: 18.8
SWE-Bench 12.7 0.0 GPT-4o-0513: 26.7
Aider 73.7 44.4 GPT-4o-0513: 72.9

DeepSeek’s report records 90.2% on HumanEval, 76.2% on MBPP+ (which it describes as a new state-of-the-art result with the EvalPlus pipeline at the time) and 43.4% on LiveCodeBench (questions from December 2023 to June 2024). It also describes Coder V2 as the first open-source model to score above 10% on SWE-Bench. See the DeepSeek-Coder-V2 technical report for the full tables.

Strengths — where Coder V2 specifically wins

  • Open weights with commercial use. The code repository is MIT-licensed; use of the Base and Instruct models is subject to the DeepSeek Model License, and DeepSeek states that the Coder V2 series supports commercial use.
  • Two right-sized tiers. The 16B Lite (2.4B active) is realistic to self-host; the full 236B is for serious infrastructure or batch jobs.
  • 338-language coverage with strong multilingual HumanEval results: the report gives the 236B Instruct the second-highest average (75.3%, behind GPT-4o’s 76.4%) and the top scores in Java and PHP.
  • 128K context for repository-level prompts. DeepSeek’s Needle-In-A-Haystack results show the model performing well across context lengths up to 128K, which matters for large codebases or documentation.
  • FIM on the Lite model. DeepSeek-Coder-V2-Lite-Base scores 86.4 on HumanEval FIM in the README, and the README includes a code-insertion example, which is useful for editor integrations.

Weaknesses — where it falls short

  • SWE-Bench trails the 2024 closed models. In the report’s repair table Coder V2 scored 12.7 on SWE-Bench, behind GPT-4o-0513 (26.7), GPT-4-1106 (22.7), Gemini-1.5-Pro (19.3) and GPT-4-Turbo-0409 (18.3); it was ahead of Claude-3-Opus (11.7) and Codestral (2.7). Llama3-70B-Instruct was not evaluated on SWE-Bench because of its 8K context.
  • It’s superseded for chat use. DeepSeek’s Change Log (5 September 2024) says the DeepSeek V2 Chat and DeepSeek Coder V2 models were merged and upgraded into DeepSeek V2.5, and the V2.5 model card describes it as combining DeepSeek-V2-Chat and DeepSeek-Coder-V2-Instruct. DeepSeek has since moved to much newer models; its API today serves deepseek-flash (DeepSeek-V4.1-Flash-1017; see the Flash model guide) and deepseek-v4-pro (DeepSeek-V4-Pro-0813).
  • Hardware floor is high for the full model. DeepSeek’s README says running DeepSeek-Coder-V2 in BF16 for inference requires 8 × 80GB GPUs. The Lite 16B is the realistic local option.
  • No reasoning mode. Unlike DeepSeek R1 or today’s API models, where thinking mode is on by default, Coder V2 has no step-by-step reasoning mode.

How to access DeepSeek Coder V2

Local / Hugging Face

The four main Hugging Face repos are deepseek-ai/DeepSeek-Coder-V2-Base, DeepSeek-Coder-V2-Instruct, DeepSeek-Coder-V2-Lite-Base and DeepSeek-Coder-V2-Lite-Instruct; a later DeepSeek-Coder-V2-Instruct-0724 checkpoint is also published. On 26 October 2026 the current files add up to about 31.4 GB for each Lite repo and about 471.5 GB for each 236B repo (BF16 safetensors). Minimal Python loading pattern (Transformers), following the model card:

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

tok = AutoTokenizer.from_pretrained(
    "deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct",
    trust_remote_code=True,
)
model = AutoModelForCausalLM.from_pretrained(
    "deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct",
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
).cuda()

The model card also recommends vLLM for inference. For quantised local use, Ollama’s library lists deepseek-coder-v2:16b (8.9 GB) and deepseek-coder-v2:236b (133 GB) on 26 October 2026; these are third-party builds, not DeepSeek releases. The Ollama setup walkthrough covers that path.

Hosted API (no current Coder V2 endpoint)

DeepSeek’s Change Log records the hosted history. The deepseek-coder API model was upgraded to DeepSeek-Coder-V2-0614 on 14 June 2024 and to DeepSeek-Coder-V2-0724 on 24 July 2024. On 5 September 2024 the V2 Chat and Coder V2 models were merged into DeepSeek V2.5, which API users could then reach through either deepseek-coder or deepseek-chat. Today’s pricing page (checked 26 October 2026) lists two models, deepseek-flash (DeepSeek-V4.1-Flash-1017) and deepseek-v4-pro (DeepSeek-V4-Pro-0813). Neither is Coder V2, and deepseek-coder is not a listed model name.

Both current models support FIM completion (Beta) in non-thinking mode only, which is the hosted option closest to Coder V2’s editor use. For model names, endpoints and parameters, see the DeepSeek API documentation.

Pricing (as of October 2026)

Coder V2 itself has no API price today: the open weights are free to download, and self-hosting costs are your own hardware. If you move coding work to DeepSeek’s hosted API, the October 2026 rates per 1M tokens are: deepseek-flash $0.30 cache-miss input and $1.20 output at peak, $0.15 and $0.60 off-peak (cache hits $0.006 / $0.003); deepseek-v4-pro $1.32 cache-miss input and $3.96 output at peak, $0.66 and $1.98 off-peak (cache hits $0.044 / $0.022). Peak hours are 01:00–04:00 and 06:00–10:00 UTC, Monday to Friday, excluding Chinese public holidays; off-peak is half price. Check the official pricing page before committing; see also the DeepSeek API pricing breakdown.

Best use cases

  • IDE autocomplete and FIM completion with the Lite model: pair with the DeepSeek with VS Code setup.
  • Bulk code refactors over 128K-token repository contexts.
  • Multi-language code generation across the 338 supported languages: see DeepSeek for coding for end-to-end workflows.
  • On-prem or air-gapped deployments where weights matter; the Lite 16B is the realistic target.
  • Workflows for individual contributors covered in DeepSeek for developers.

Comparable alternatives

Illustration: Developer using DeepSeek Coder V2 to review a pull-request diff on a modern external monitor

If you’re weighing Coder V2 against closed-source coders, the natural comparisons are DeepSeek Coder versus GitHub Copilot for the IDE workflow, and broader chat-coder evaluations such as DeepSeek versus ChatGPT. For other open-weight options, the coding-focused DeepSeek alternatives roundup covers newer coding models, including Qwen’s.

Verdict

DeepSeek Coder V2 still makes sense when you need open weights with strong 2024-era HumanEval/MBPP+ numbers, a 128K context and a licence that permits commercial use, particularly the Lite 16B for self-hosting and FIM. For new hosted-API work, DeepSeek’s current models are deepseek-flash and deepseek-v4-pro; Coder V2 is not served on the API, and deepseek-coder is not a listed model name.

Is DeepSeek Coder V2 free to use commercially?

Yes, with a caveat about the licence document. The code repository is MIT-licensed, but use of the DeepSeek-Coder-V2 Base/Instruct models is subject to the separate DeepSeek Model License, and DeepSeek states that the Coder V2 series (Base and Instruct) supports commercial use. Read the model licence, which includes use restrictions, before shipping. For a wider summary of permissions across the family see is DeepSeek open source.

What context length does DeepSeek Coder V2 support?

128K tokens, up from 16K in the first DeepSeek Coder, with programming-language support expanded from 86 to 338. That is enough for many repository-level prompts; for comparison, DeepSeek’s current API models offer a 1M-token context. If you need to estimate whether a particular codebase will fit, the DeepSeek token counter is a quick way to check before sending the request.

How does DeepSeek Coder V2 compare to GPT-4-Turbo on HumanEval?

Slightly ahead on the headline number. DeepSeek’s report gives Coder V2-Instruct 90.2% on HumanEval, against 88.2 for GPT-4-Turbo-0409 and 87.8 for GPT-4-Turbo-1106 in the same table (GPT-4o-0513 led with 91.0). It also records 76.2% on MBPP+ and 43.4% on LiveCodeBench (questions from December 2023 to June 2024). For more detail across coding tasks see the DeepSeek Coder review.

Can you run DeepSeek Coder V2 locally?

The 16B Lite model is realistic on a single high-memory GPU or, quantised, on consumer hardware; the 236B model needs serious GPUs, since DeepSeek’s README specifies 8 × 80GB GPUs for BF16 inference. Ollama’s library lists a 16B build at 8.9 GB (26 October 2026). The install DeepSeek locally guide walks through the steps end to end.

Is DeepSeek Coder V2 still the latest coding model from DeepSeek?

No. DeepSeek merged V2 Chat and Coder V2 into DeepSeek V2.5 in September 2024, and later released V3, R1, V3.1, V3.2 and the V4 generation. Its API now serves deepseek-flash (DeepSeek-V4.1-Flash-1017) and deepseek-v4-pro (DeepSeek-V4-Pro-0813); see the DeepSeek V4 overview. Coder V2 remains an option if you specifically want an open-weight, code-specialist model that you host yourself.

Sources & Methodology

Last source check: October 26, 2026

Primary sources

Technical references

Methodology

Architecture, parameter counts, context window, and license were checked against the official DeepSeek model card and the corresponding technical report. Benchmark figures are reproduced as they appear in vendor materials and are treated as directional indicators rather than guarantees of real-world performance.

Data confidence

High for official architecture and license; medium for vendor-reported benchmarks; low for projected future capabilities.

Editorial note

Vendor-reported figures are not always independently replicated. Benchmarks at the frontier change quickly; expect this article to need a refresh whenever DeepSeek, OpenAI, Anthropic, or Google ship a new model.

Leave a Reply

Your email address will not be published. Required fields are marked *