Model reference · open weights

DeepSeek-Coder-0724

LLMs deepseek-ai Text gen 1 build Its own licence terms 598 dl/mo

DeepSeek-Coder-0724 is an open-weight language model from DeepSeek. DeepSeek-Coder-V2-Instruct-0724 (BF16) weighs 471 GB; the smallest configuration that runs it is 4× H200 141 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • DeepSeek-Coder-0724 is a 235.7B parameter Mixture-of-Experts code language model developed by DeepSeek for text generation tasks.
  • It features a context length of 163,840 tokens and is released under a custom license that permits commercial use.

Summary of the deepseek-ai/DeepSeek-Coder-V2-Instruct-0724 model card, 2026-10-01

What it is

Released byDeepSeek
Released2024-09-05
Parameters235.7B
VRAM471 GB for the weights

What it runs on

Memory and cards for DeepSeek-Coder-V2-Instruct-0724 (BF16)

471 GBweights, file size
69 MBcache per 1K tokens
1.5 GBruntime overhead, at least
163,840 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB … B200 180 GB
12 smaller cards
4× H200 141 GB
tensor parallel
215all 160K138 GB a card
8× H100 80 GB
tensor parallel
205all 160K78.1 GB a card
8× A100 80 GB
tensor parallel
317all 160K78.2 GB a card
4× B200 180 GB
tensor parallel
8220all 160K176 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
1474 GB475 GB
5476 GB484 GB
8478 GB491 GB
16482 GB509 GB
32491 GB545 GB
64509 GB618 GB

One card, with vLLM's small-card settings.

From the model card

What DeepSeek says about DeepSeek-Coder-0724

Read the model card

1. Introduction

We present DeepSeek-Coder-V2, an open-source Mixture-of-Experts (MoE) code language model that achieves performance comparable to GPT4-Turbo in code-specific tasks. Specifically, DeepSeek-Coder-V2 is further pre-trained from an intermediate checkpoint of DeepSeek-V2 with additional 6 trillion tokens. Through this continued pre-training, DeepSeek-Coder-V2 substantially enhances the coding and mathematical reasoning capabilities of DeepSeek-V2, while maintaining comparable performance in general language tasks. Compared to DeepSeek-Coder-33B, DeepSeek-Coder-V2 demonstrates significant advancements in various aspects of code-related tasks, as well as reasoning and general capabilities. Additionally, DeepSeek-Coder-V2 expands its support for programming languages from 86 to 338, while extending the context length from 16K to 128K.

In standard benchmark evaluations, DeepSeek-Coder-V2 achieves superior performance compared to closed-source models such as GPT4-Turbo, Claude 3 Opus, and Gemini 1.5 Pro in coding and math benchmarks. The list of supported programming languages can be found here.

2. Model Downloads

We release the DeepSeek-Coder-V2 with 16B and 236B parameters based on the DeepSeekMoE framework, which has actived parameters of only 2.4B and 21B , including base and instruct models, to the public.

Model#Total Params#Active ParamsContext LengthDownload
DeepSeek-Coder-V2-Lite-Base16B2.4B128k🤗 HuggingFace
DeepSeek-Coder-V2-Lite-Instruct16B2.4B128k🤗 HuggingFace
DeepSeek-Coder-V2-Base236B21B128k🤗 HuggingFace
DeepSeek-Coder-V2-Instruct236B21B128k🤗 HuggingFace
DeepSeek-Coder-V2-Instruct-0724236B21B128k🤗 HuggingFace

3. Chat Website

You can chat with the DeepSeek-Coder-V2 on DeepSeek's official website: coder.deepseek.com

4. API Platform

We also provide OpenAI-Compatible API at DeepSeek Platform: platform.deepseek.com, and you can also pay-as-you-go at an unbeatable price.

5. How to run locally

Here, we provide some examples of how to use DeepSeek-Coder-V2-Lite model. If you want to utilize DeepSeek-Coder-V2 in BF16 format for inference, 80GB*8 GPUs are required.

Inference with Huggingface's Transformers

You can directly employ Huggingface's Transformers for model inference.

Code Completion
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-Coder-V2-Lite-Base", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-Coder-V2-Lite-Base", trust_remote_code=True, torch_dtype=torch.bfloat16).cuda()
input_text = "#write a quick sort algorithm"
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_length=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Code Insertion
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-Coder-V2-Lite-Base", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-Coder-V2-Lite-Base", trust_remote_code=True, torch_dtype=torch.bfloat16).cuda()
input_text = """def quick_sort(arr):
    if len(arr) <= 1:
        return arr
    pivot = arr[0]
    left = []
    right = []
        if arr[i] < pivot:
            left.append(arr[i])
        else:
            right.append(arr[i])
    return quick_sort(left) + [pivot] + quick_sort(right)"""
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_length=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True)[len(input_text):])
Chat Completion
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = 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()
messages=[
    { 'role': 'user', 'content': "write a quick sort algorithm in python."}
]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
# tokenizer.eos_token_id is the id of   token
outputs = model.generate(inputs, max_new_tokens=512, do_sample=False, top_k=50, top_p=0.95, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id)
print(tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True))

The complete chat template can be found within tokenizer_config.json located in the huggingface model repository.

An example of chat template is as belows:


Assistant: {assistant_message_1}User: {user_message_2}

Assistant:

You can also add an optional system message

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms