deepseek-ai_DeepSeek-Coder-V2-Lite-Instruct
deepseek-ai · View on Hugging Face ↗
Model card
The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.
license: other license_name: deepseek-license license_link: LICENSE
API Platform | How to Use | License |
Paper Link👁️
DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligence
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 Params | Context Length | Download |
|---|---|---|---|---|
| DeepSeek-Coder-V2-Lite-Base | 16B | 2.4B | 128k | 🤗 HuggingFace |
| DeepSeek-Coder-V2-Lite-Instruct | 16B | 2.4B | 128k | 🤗 HuggingFace |
| DeepSeek-Coder-V2-Base | 236B | 21B | 128k | 🤗 HuggingFace |
| DeepSeek-Coder-V2-Instruct | 236B | 21B | 128k | 🤗 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 = """<|fim▁begin|>def quick_sort(arr):
if len(arr) <= 1:
return arr
pivot = arr[0]
left = []
right = []
<|fim▁hole|>
if arr[i] < pivot:
left.append(arr[i])
else:
right.append(arr[i])
return quick_sort(left) + [pivot] + quick_sort(right)<|fim▁end|>"""
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 <|end▁of▁sentence|> 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:
<|begin▁of▁sentence|>User: {user_message_1}
Assistant: {assistant_message_1}<|end▁of▁sentence|>User: {user_message_2}
Assistant:
You can also add an optional system message:
<|begin▁of▁sentence|>{system_message}
User: {user_message_1}
Assistant: {assistant_message_1}<|end▁of▁sentence|>User: {user_message_2}
Assistant:
Inference with vLLM (recommended)
To utilize vLLM for model inference, please merge this Pull Request into your vLLM codebase: https://github.com/vllm-project/vllm/pull/4650.
from transformers import AutoTokenizer
from vllm import LLM, SamplingParams
max_model_len, tp_size = 8192, 1
model_name = "deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_name)
llm = LLM(model=model_name, tensor_parallel_size=tp_size, max_model_len=max_model_len, trust_remote_code=True, enforce_eager=True)
sampling_params = SamplingParams(temperature=0.3, max_tokens=256, stop_token_ids=[tokenizer.eos_token_id])
messages_list = [
[{"role": "user", "content": "Who are you?"}],
[{"role": "user", "content": "write a quick sort algorithm in python."}],
[{"role": "user", "content": "Write a piece of quicksort code in C++."}],
]
prompt_token_ids = [tokenizer.apply_chat_template(messages, add_generation_prompt=True) for messages in messages_list]
outputs = llm.generate(prompt_token_ids=prompt_token_ids, sampling_params=sampling_params)
generated_text = [output.outputs[0].text for output in outputs]
print(generated_text)
6. License
This code repository is licensed under the MIT License. The use of DeepSeek-Coder-V2 Base/Instruct models is subject to the Model License. DeepSeek-Coder-V2 series (including Base and Instruct) supports commercial use.
7. Contact
If you have any questions, please raise an issue or contact us at [email protected].
Magnet link
Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:
magnet:?xt=urn:btih:c1d1ae0ab677f6ceb55055bfff3f6d966957cb6f&dn=deepseek-ai_DeepSeek-Coder-V2-Lite-InstructOpen magnet in torrent client · infohash c1d1ae0ab677f6ceb55055bfff3f6d966957cb6f
Files & hashes
| Path | Size | sha1 | sha256 |
|---|---|---|---|
| README.md | 11.1 KB (11,320 B) | f091caecb72b3d10dd8199136d2202c163f7c8d5 | 4ebcf2e32bb7d1343d49d2b25b6910bfee18e02998e33d1fcf68ed206255b8fd |
| config.json | 1.5 KB (1,522 B) | 3b1ccb3ddc847f2475a8e1b86e18ab1505fd87da | 5f2f880516f5cb5d17bbb0b0b78623dee45d84855de9c5a0e637eaf828267d2b |
| configuration_deepseek.py | 10.1 KB (10,338 B) | 82e0f5d9d33620a66e328fdeae0b8dc12e2cff7c | 6de5e7445ab490a16482027b131d5bd6a003da9b58a182a11432115fac84ce59 |
| generation_config.json | 181 B (181 B) | 458e1d985ba3fbaaf62a4d1a9dd6ff795a451f7e | 63ec07f6cb36bd8359b44f671123518dd6fbf55007e0c74aa96c296a75def8b5 |
| model-00001-of-000004.safetensors | 8.00 GB (8,594,887,410 B) | 1ee3a34a71ee647a1bcdc799d3f830f5b427519f | 75d08ddaf92b68f751c95e1b4a51dbf5c011d5692f97cc0d71bd32587a3ea8d9 |
| model-00002-of-000004.safetensors | 8.00 GB (8,591,757,456 B) | 222f079ed34c788edc0a3bcd88c4b3a079856e12 | 7bf22dfa271527f7a0b8dbd56592722cd8fdcfeb6aad32ebb1110d21882eb1d8 |
| model-00003-of-000004.safetensors | 8.00 GB (8,590,718,535 B) | 2f49ccd386f6f3515763539cb014f490e2a4b5c5 | 18f5a20f4d737b496e03ff8761834dfa9754ceedd56f54a336d0eab5e0e20968 |
| model-00004-of-000004.safetensors | 5.25 GB (5,636,263,208 B) | 690ec2c86388d5561ce7e9b0ba03a939698aae7c | 1365ca25494e6592b6cb11f62f4a63cbdcdd9853e01d67f274d0b282732cc5cd |
| model.safetensors.index.json | 468.7 KB (479,924 B) | 5a821356160292c668d01f8e7fdf9abba4a7b72d | d2cdb2f325f6682cf3ad1ad2526a9f979d857390b579380c0331d975136e0acf |
| modeling_deepseek.py | 76.8 KB (78,672 B) | 847a458bedcc8df352b1a89315b8e400b9bc6030 | 7d8e5221095286eea991137760893fd7ba52727c0b4ebf48ec09e8bc56b45b9c |
| tokenization_deepseek_fast.py | 1.3 KB (1,368 B) | d24377191dd00e80c44f22e31dc15272258a22de | 702fc7dbadc450f2fecfbc59e248ecca5845b49101e8f58f805261c920a3effa |
| tokenizer.json | 4.4 MB (4,610,628 B) | ae8c6f0b4e0cdb2102a045267678e8f3d3d54ceb | 091b9dadb9845f0e8386c38bdb87e98db8adc7b0aacf36cb9257c00d0a668714 |
| tokenizer_config.json | 1.2 KB (1,279 B) | 685b4b63ad1aedad8f98824ab21d2ff422d9e1b1 | 31181eaf79394ea26728d95ecb54fe7c8413e6f56085dbabc8b0818134380ec8 |
Cite this release
- Canonical URL
- https://aiseedbank.org/models/deepseek-ai_DeepSeek-Coder-V2-Lite-Instruct/
- Slug
- deepseek-ai_DeepSeek-Coder-V2-Lite-Instruct
- Infohash
- c1d1ae0ab677f6ceb55055bfff3f6d966957cb6f
- License
- custom/other license
- Signing key fingerprint
- 85a3b32c3712427b
Every file carries a locally computed sha256 — verify a download against the signed sums: deepseek-ai_DeepSeek-Coder-V2-Lite-Instruct.SHA256SUMS (+ minisign signature).
Provenance
| Upstream repository | deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct |
|---|---|
| Revision (pinned) | e434a23f91ba5b4923cf6c9d9a238eb4a08e3a11 |
| Fetched at | 2026-09-03T21:28:39Z |
| License at fetch | other |
| Snapshot tool | huggingface · seedbank 0.1.0 |
Trackers
- udp://announce.aitorrent.org:6969/announce
- http://announce.aitorrent.org:7070/announce
- udp://announce2.aitorrent.org:6970/announce
- http://announce2.aitorrent.org:7071/announce
- udp://tracker.opentrackr.org:1337/announce
- udp://open.demonii.com:1337/announce
- udp://open.stealth.si:80/announce
- udp://exodus.desync.com:6969/announce
- udp://tracker.torrent.eu.org:451/announce
✓ verified · rehash-vs-hf-metadata at 2026-09-03T21:34:23Z
custom/other license29.26 GB (31,418,821,841 bytes)transformerssafetensorsdeepseek_v2text-generationconversationalcustom_codeeval-resultstext-generation-inferenceendpoints_compatiblepaper: 2401.06066