Model reference · open weights

DeepSeek-Coder-Lite

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

DeepSeek-Coder-Lite is an open-weight language model from DeepSeek. DeepSeek-Coder-V2-Lite-Instruct (BF16) weighs 31.4 GB; the smallest configuration that runs it is L40S 48 GB.

  • DeepSeek-Coder-Lite is a 15.7B parameter Mixture-of-Experts code language model developed by DeepSeek for text generation tasks.
  • It supports 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-Lite-Instruct model card, 2026-10-01

What it is

Released byDeepSeek
Released2024-06-14
Parameters15.7B
VRAM31.4 GB for the weights

What it runs on

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

31.4 GBweights, file size
31 MBcache per 1K tokens
1.2 GBruntime overhead, at least
163,840 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB … RTX 5090 32 GB
5 smaller cards
———
L40S 48 GB4411all 160K44.0 GB
A100 80 GB17944all 160K78.2 GB
H100 80 GB15839all 160K78.1 GB
RTX PRO 6000 Blackwell 96 GB22055all 160K93.8 GB
DGX Spark (GB10) 128 GB unified27368all 160K107 GB
H200 141 GB39398all 160K138 GB
B200 180 GB533133all 160K176 GB
2× RTX 4090 24 GB
tensor parallel
256all 160K23.4 GB a card
2× RTX 3090 24 GB
tensor parallel
256all 160K23.4 GB a card
2× RTX 5090 32 GB
tensor parallel
5513all 160K31.0 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
132.8 GB33.6 GB
533.8 GB37.7 GB
834.6 GB40.7 GB
1636.6 GB48.9 GB
3240.7 GB65.2 GB
6448.9 GB97.8 GB

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

From the model card

What DeepSeek says about DeepSeek-Coder-Lite

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

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:


User: {user_message_1}

Assistant: {assistant_message_1}User: {user_message_2}

Assistant:

Inference with vLLM (recommended)

To utilize [vLLM](https://github.com/vllm-p

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