# DeepSeek-Coder-V2

> Open Mixture-of-Experts code model (236B/21B and 16B/2.4B) that reached GPT-4-Turbo-class coding across 338 languages.

- Maker: DeepSeek
- Line: DeepSeek Coder
- Canonical page: https://ai-tldr.dev/models/deepseek-coder-v2/
- Updated: 2026-06-18

## In short

DeepSeek-Coder-V2 is an open-weight, code-specialized Mixture-of-Experts model from DeepSeek, released on June 17, 2024. It comes in two sizes: a flagship with 236B total parameters and 21B active, and a smaller DeepSeek-Coder-V2-Lite with 16B total and 2.4B active. It has a 128K-token context window. You can use it through Hugging Face (download weights) and DeepSeek Platform (merged into DeepSeek-V2.5).

## Facts

| Fact | Value | Source |
| --- | --- | --- |
| Context window | 128K (max output Undisclosed) | [1] |
| Input price | Free (open weights) | [2] |
| Output price | Free (open weights) | [2] |
| Licence | MIT (code) + DeepSeek Model License — commercial use permitted · open weights | [1] |
| Released | 17 June 2024 | [3] |
| Parameters | 236B total · 21B active (Lite: 16B total · 2.4B active) | [1] |
| Knowledge cutoff | November 2023 | [1] |

## Sources

1. [DeepSeek-Coder-V2-Instruct — Hugging Face model card](https://huggingface.co/deepseek-ai/DeepSeek-Coder-V2-Instruct)
2. [DeepSeek-Coder-V2 — Artificial Analysis](https://artificialanalysis.ai/models/deepseek-coder-v2)
3. [DeepSeek-V2.5 announcement (merged Chat + Coder)](https://api-docs.deepseek.com/news/news0905)

## Overview

DeepSeek-Coder-V2 is an open-weight, code-specialized Mixture-of-Experts model from DeepSeek, released on June 17, 2024. It comes in two sizes: a flagship with 236B total parameters and 21B active, and a smaller DeepSeek-Coder-V2-Lite with 16B total and 2.4B active. Both ship as base and instruction-tuned checkpoints, and were further pre-trained from an intermediate DeepSeek-V2 checkpoint on an additional 6 trillion tokens of code and math data.

Compared with the original DeepSeek Coder, DeepSeek-Coder-V2 expands programming-language coverage from 86 to 338 languages and extends the context window from 16K to 128K tokens. DeepSeek positions it as the first open-source model to break the barrier of closed-source code intelligence: on coding and math benchmarks it reaches performance comparable to GPT-4-Turbo and reportedly edges out Claude 3 Opus and Gemini 1.5 Pro of that era.

On reported benchmarks the 236B Instruct model scores 90.2% on HumanEval, 76.2% on MBPP+, 43.4% on LiveCodeBench, 75.7% on MATH, and 94.9% on GSM8K, while keeping solid general-language ability at 79.2% MMLU. The weights are downloadable from Hugging Face under an MIT code license plus a DeepSeek Model License that permits commercial use; the hosted API endpoint was later merged into DeepSeek-V2.5 in September 2024.

## Benchmarks

- HumanEval (DeepSeek-Coder-V2-Instruct): 90.2% ([source](https://arxiv.org/abs/2406.11931))
- MBPP+ (EvalPlus): 76.2% ([source](https://arxiv.org/abs/2406.11931))
- LiveCodeBench: 43.4% ([source](https://arxiv.org/abs/2406.11931))
- SWE-Bench: 12.7% ([source](https://arxiv.org/abs/2406.11931))
- Aider (code editing): 73.7% ([source](https://github.com/deepseek-ai/DeepSeek-Coder-V2))
- MATH: 75.7% ([source](https://arxiv.org/abs/2406.11931))
- GSM8K: 94.9% ([source](https://arxiv.org/abs/2406.11931))
- MMLU: 79.2% ([source](https://arxiv.org/abs/2406.11931))
- Arena-Hard: 65% ([source](https://arxiv.org/abs/2406.11931))

## Pricing

- Input: Free (open weights) self-hosted
- Output: Free (open weights) self-hosted

Weights are downloadable from Hugging Face for self-hosting; the original hosted deepseek-coder API endpoint was merged into DeepSeek-V2.5 in September 2024.

Source: https://artificialanalysis.ai/models/deepseek-coder-v2

## Strengths

- GPT-4-Turbo-class coding performance from a fully open-weight model (90.2% HumanEval)
- Broad language coverage — 338 programming languages, up from 86 in DeepSeek Coder v1
- 128K-token context for whole-repository and long-file reasoning
- Strong mathematical reasoning: 75.7% MATH and 94.9% GSM8K
- Two sizes — a 236B/21B-active flagship and a lightweight 16B/2.4B-active Lite — plus base and instruct checkpoints
- Permissive licensing (MIT code + commercial-use model license) for self-hosting

## Best for

- Code generation and autocompletion across many languages
- Code repair and bug fixing
- Mathematical and algorithmic reasoning
- Repository-scale code understanding using the 128K context
- Self-hosted, on-prem coding assistants where open weights are required
- Cost-efficient open-weight alternative to closed coding APIs

## How to access

- [Hugging Face (download weights)](https://huggingface.co/deepseek-ai/DeepSeek-Coder-V2-Instruct) — model id `deepseek-ai/DeepSeek-Coder-V2-Instruct`
- [DeepSeek Platform (merged into DeepSeek-V2.5)](https://platform.deepseek.com) — model id `deepseek-coder`

## DeepSeek Coder versions

- DeepSeek-Coder-V2 (17 June 2024) — this page
- [DeepSeek Coder](https://ai-tldr.dev/models/deepseek-coder/) (2 November 2023)

## FAQ

### What is DeepSeek-Coder-V2?

DeepSeek-Coder-V2 is an open-weight, code-specialized Mixture-of-Experts model released by DeepSeek on June 17, 2024. It comes as a 236B-total / 21B-active flagship and a 16B-total / 2.4B-active Lite version, each with base and instruction-tuned checkpoints, and was further pre-trained from a DeepSeek-V2 checkpoint on an extra 6 trillion tokens.

### How well does DeepSeek-Coder-V2 perform on coding benchmarks?

The 236B Instruct model scores 90.2% on HumanEval, 76.2% on MBPP+, 43.4% on LiveCodeBench, and 73.7% on Aider, with 75.7% MATH and 94.9% GSM8K for math. DeepSeek reports performance comparable to GPT-4-Turbo and ahead of Claude 3 Opus and Gemini 1.5 Pro of that period.

### How many languages and how much context does it support?

It supports 338 programming languages (up from 86 in DeepSeek Coder v1) and a 128K-token context window (extended from 16K).

### Is DeepSeek-Coder-V2 free and open source?

Yes. The weights are downloadable from Hugging Face under an MIT license for code plus a DeepSeek Model License that permits commercial use. The original hosted deepseek-coder API endpoint was later merged into DeepSeek-V2.5 in September 2024.

## Links

- [DeepSeek-Coder-V2 — GitHub (official)](https://github.com/deepseek-ai/DeepSeek-Coder-V2)
- [DeepSeek-Coder-V2-Instruct — Hugging Face model card](https://huggingface.co/deepseek-ai/DeepSeek-Coder-V2-Instruct)
- [DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligence (paper)](https://arxiv.org/abs/2406.11931)
- [DeepSeek-V2.5 announcement (merged Chat + Coder)](https://api-docs.deepseek.com/news/news0905)
- [DeepSeek-Coder-V2 — Artificial Analysis](https://artificialanalysis.ai/models/deepseek-coder-v2)
- [DeepSeek API docs](https://api-docs.deepseek.com)
- [DeepSeek — official site](https://www.deepseek.com)

Source: AI/TLDR LLM registry, https://ai-tldr.dev/models/deepseek-coder-v2/
