Text Generation
Transformers
Safetensors
deepseek_v3
conversational
custom_code
Eval Results
text-generation-inference
fp8
Instructions to use deepseek-ai/DeepSeek-V3.1-Terminus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepseek-ai/DeepSeek-V3.1-Terminus with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-V3.1-Terminus", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-V3.1-Terminus", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-V3.1-Terminus", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use deepseek-ai/DeepSeek-V3.1-Terminus with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deepseek-ai/DeepSeek-V3.1-Terminus" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepseek-ai/DeepSeek-V3.1-Terminus", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/deepseek-ai/DeepSeek-V3.1-Terminus
- SGLang
How to use deepseek-ai/DeepSeek-V3.1-Terminus with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "deepseek-ai/DeepSeek-V3.1-Terminus" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepseek-ai/DeepSeek-V3.1-Terminus", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "deepseek-ai/DeepSeek-V3.1-Terminus" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepseek-ai/DeepSeek-V3.1-Terminus", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use deepseek-ai/DeepSeek-V3.1-Terminus with Docker Model Runner:
docker model run hf.co/deepseek-ai/DeepSeek-V3.1-Terminus
Release DeepSeek-V3.1-Terminus
Browse files- README.md +103 -0
- assets/search_tool_trajectory.html +0 -0
README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: transformers
|
| 4 |
+
base_model:
|
| 5 |
+
- deepseek-ai/DeepSeek-V3.1-Base
|
| 6 |
+
---
|
| 7 |
+
# DeepSeek-V3.1-Terminus
|
| 8 |
+
|
| 9 |
+
<!-- markdownlint-disable first-line-h1 -->
|
| 10 |
+
<!-- markdownlint-disable html -->
|
| 11 |
+
<!-- markdownlint-disable no-duplicate-header -->
|
| 12 |
+
|
| 13 |
+
<div align="center">
|
| 14 |
+
<img src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/logo.svg?raw=true" width="60%" alt="DeepSeek-V3" />
|
| 15 |
+
</div>
|
| 16 |
+
<hr>
|
| 17 |
+
<div align="center" style="line-height: 1;">
|
| 18 |
+
<a href="https://www.deepseek.com/" target="_blank" style="margin: 2px;">
|
| 19 |
+
<img alt="Homepage" src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/badge.svg?raw=true" style="display: inline-block; vertical-align: middle;"/>
|
| 20 |
+
</a>
|
| 21 |
+
<a href="https://chat.deepseek.com/" target="_blank" style="margin: 2px;">
|
| 22 |
+
<img alt="Chat" src="https://img.shields.io/badge/🤖%20Chat-DeepSeek%20V3-536af5?color=536af5&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
| 23 |
+
</a>
|
| 24 |
+
<a href="https://huggingface.co/deepseek-ai" target="_blank" style="margin: 2px;">
|
| 25 |
+
<img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-DeepSeek%20AI-ffc107?color=ffc107&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
| 26 |
+
</a>
|
| 27 |
+
</div>
|
| 28 |
+
|
| 29 |
+
<div align="center" style="line-height: 1;">
|
| 30 |
+
<a href="https://discord.gg/Tc7c45Zzu5" target="_blank" style="margin: 2px;">
|
| 31 |
+
<img alt="Discord" src="https://img.shields.io/badge/Discord-DeepSeek%20AI-7289da?logo=discord&logoColor=white&color=7289da" style="display: inline-block; vertical-align: middle;"/>
|
| 32 |
+
</a>
|
| 33 |
+
<a href="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/qr.jpeg?raw=true" target="_blank" style="margin: 2px;">
|
| 34 |
+
<img alt="Wechat" src="https://img.shields.io/badge/WeChat-DeepSeek%20AI-brightgreen?logo=wechat&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
| 35 |
+
</a>
|
| 36 |
+
<a href="https://twitter.com/deepseek_ai" target="_blank" style="margin: 2px;">
|
| 37 |
+
<img alt="Twitter Follow" src="https://img.shields.io/badge/Twitter-deepseek_ai-white?logo=x&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
| 38 |
+
</a>
|
| 39 |
+
</div>
|
| 40 |
+
|
| 41 |
+
<div align="center" style="line-height: 1;">
|
| 42 |
+
<a href="LICENSE" style="margin: 2px;">
|
| 43 |
+
<img alt="License" src="https://img.shields.io/badge/License-MIT-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>
|
| 44 |
+
</a>
|
| 45 |
+
</div>
|
| 46 |
+
|
| 47 |
+
## Introduction
|
| 48 |
+
|
| 49 |
+
This update maintains the model's original capabilities while addressing issues reported by users, including:
|
| 50 |
+
|
| 51 |
+
- Language consistency: Reducing instances of mixed Chinese-English text and occasional abnormal characters;
|
| 52 |
+
- Agent capabilities: Further optimizing the performance of the Code Agent and Search Agent.
|
| 53 |
+
|
| 54 |
+
| Benchmark | DeepSeek-V3.1 | DeepSeek-V3.1-Terminus |
|
| 55 |
+
| :--- | :---: | :---: |
|
| 56 |
+
| **Reasoning Mode w/o Tool Use** | | |
|
| 57 |
+
| MMLU-Pro | 84.8 | 85.0 |
|
| 58 |
+
| GPQA-Diamond | 80.1 | 80.7 |
|
| 59 |
+
| Humanity's Last Exam | 15.9 | 21.7 |
|
| 60 |
+
| LiveCodeBench | 74.8 | 74.9 |
|
| 61 |
+
| Codeforces | 2091 | 2046 |
|
| 62 |
+
| Aider-Polyglot | 76.3 | 76.1 |
|
| 63 |
+
| **Agentic Tool Use** | | |
|
| 64 |
+
| BrowseComp | 30.0 | 38.5 |
|
| 65 |
+
| BrowseComp-zh | 49.2 | 45.0 |
|
| 66 |
+
| SimpleQA | 93.4 | 96.8 |
|
| 67 |
+
| SWE Verified | 66.0 | 68.4 |
|
| 68 |
+
| SWE-bench Multilingual | 54.5 | 57.8 |
|
| 69 |
+
| Terminal-bench | 31.3 | 36.7 |
|
| 70 |
+
|
| 71 |
+
**The template and tool-set of search agent have been updated, which is shown in `assets/search_tool_trajectory.html`.**
|
| 72 |
+
|
| 73 |
+
## How to Run Locally
|
| 74 |
+
|
| 75 |
+
The model structure of DeepSeek-V3.1-Terminus is the same as DeepSeek-V3. Please visit [DeepSeek-V3](https://github.com/deepseek-ai/DeepSeek-V3) repo for more information about running this model locally.
|
| 76 |
+
|
| 77 |
+
For the model's chat template other than search agent, please refer to the [DeepSeek-V3.1](https://huggingface.co/deepseek-ai/DeepSeek-V3.1) repo.
|
| 78 |
+
|
| 79 |
+
Here we also provide an updated inference demo code in the `inference` folder to help the community get started with running our model and understand the details of model architecture.
|
| 80 |
+
|
| 81 |
+
**NOTE: In the current model checkpoint, the parameters of `self_attn.o_proj` do not conform to the UE8M0 FP8 scale data format. This is a known issue and will be corrected in future model releases.**
|
| 82 |
+
|
| 83 |
+
## License
|
| 84 |
+
|
| 85 |
+
This repository and the model weights are licensed under the [MIT License](LICENSE).
|
| 86 |
+
|
| 87 |
+
## Citation
|
| 88 |
+
|
| 89 |
+
```
|
| 90 |
+
@misc{deepseekai2024deepseekv3technicalreport,
|
| 91 |
+
title={DeepSeek-V3 Technical Report},
|
| 92 |
+
author={DeepSeek-AI},
|
| 93 |
+
year={2024},
|
| 94 |
+
eprint={2412.19437},
|
| 95 |
+
archivePrefix={arXiv},
|
| 96 |
+
primaryClass={cs.CL},
|
| 97 |
+
url={https://arxiv.org/abs/2412.19437},
|
| 98 |
+
}
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
## Contact
|
| 102 |
+
|
| 103 |
+
If you have any questions, please raise an issue or contact us at [service@deepseek.com](service@deepseek.com).
|
assets/search_tool_trajectory.html
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|