Text Generation
Transformers
Safetensors
deepseek_v3
conversational
custom_code
text-generation-inference
fp8
Instructions to use deepseek-ai/DeepSeek-V3.1-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepseek-ai/DeepSeek-V3.1-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-V3.1-Base", 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-Base", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-V3.1-Base", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use deepseek-ai/DeepSeek-V3.1-Base 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-Base" # 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-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/deepseek-ai/DeepSeek-V3.1-Base
- SGLang
How to use deepseek-ai/DeepSeek-V3.1-Base 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-Base" \ --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-Base", "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-Base" \ --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-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use deepseek-ai/DeepSeek-V3.1-Base with Docker Model Runner:
docker model run hf.co/deepseek-ai/DeepSeek-V3.1-Base
Fix chat_template crash when assistant message omits the `content` key
#60 opened 17 days ago
by
qgallouedec
Script to download the Base modells tensor files
#59 opened 9 months ago
by
gariandamo
the pass@1 of deepseek-v3.1-base in lcb benchmark
#57 opened 9 months ago
by
wjmcat
Upload 9c2f9436-6470-49fa-a762-8adb27373e17.jpeg
#56 opened 9 months ago
by
Oganandos
Now ! I think it's a best model for world !!!
2
#55 opened 9 months ago
by
XiaoChuiChui
🚩 Report: Spam
1
#54 opened 9 months ago
by
Metin121
《DeepSeek-V3.1思考模式实测:新版本并非全面升级》,欢迎进群交流讨论~
1
#52 opened 9 months ago
by
JEIN
search-agent是不是无法使用原生的ToolCall?
1
#51 opened 9 months ago
by
xiaocc8
You made an error with SimpleQA scores
4
#50 opened 9 months ago
by
ID0M
火钳刘明 yyds
#49 opened 9 months ago
by
OrlandoHugBot
The coding capability of v3.1 is truly impressive.
1
#48 opened 9 months ago
by
omsmqwen
自言自语会导致胡乱思考
👀 1
1
#47 opened 9 months ago
by
Guesiz
naked model
#45 opened 9 months ago
by
gopi87
deepseek v3.1在理解用户问题能力/指令遵循上变得有些奇怪
➕ 1
2
#44 opened 9 months ago
by
ChrisJuanes
Will perplexity or other be making a “1776” version of this?
😎 1
4
#43 opened 9 months ago
by
PCmedia
为什么接在用户消息后的系统消息也会被提到最前面?
👀 3
1
#42 opened 9 months ago
by
Guesiz
Create README.md
1
#41 opened 9 months ago
by
Bidu33
Create README.md
1
#40 opened 9 months ago
by
Wioti
火钳留名HYY
👍 3
3
#38 opened 9 months ago
by
HYY010731
Create README.md
#37 opened 9 months ago
by
NGBot
Create README.md
#36 opened 9 months ago
by
ManipulatedConsciousness
Create README.md
1
#35 opened 9 months ago
by
FlameF0X
code for game
#32 opened 9 months ago
by
HIMANSHU2737
did they forget it?
🔥👀 12
3
#31 opened 9 months ago
by
DingzhenPearl
when can we have the chat model?
🚀 4
#30 opened 9 months ago
by
HourseCircle
Create README.md
#29 opened 9 months ago
by
arsurvase
Create README.md
#28 opened 9 months ago
by
hossammogalal999
太新了,火钳刘明
🤗 3
#26 opened 9 months ago
by
fchange
今天去问了官方客服,这个似乎是融合模型了,期待官方的模型卡
🤯👀 10
5
#25 opened 9 months ago
by
CHSFM
Create README.md
🚀 1
#24 opened 9 months ago
by
maji3ter
Modelcard come On ~~
#23 opened 9 months ago
by
seth-zou
Create README.md
1
#22 opened 9 months ago
by
MRevenant
Create README.md
#20 opened 9 months ago
by
Wprul2010
我要modelcard😡😡😡
#19 opened 9 months ago
by
ybh618
「Feedback」Deepseek V3.1 API 似乎在 JSON Output 上输出空结果的概率提高了
🚀 3
3
#18 opened 9 months ago
by
Wendaolee
123
1
#17 opened 9 months ago
by
dragonfly001
期待发现更多隐藏能力,加入我们一起评测探讨吧
2
#16 opened 9 months ago
by
jakyer
This model’s censorship is insane
😔🧠 15
41
#15 opened 9 months ago
by
smile1030
Create README.md
#13 opened 9 months ago
by
PowerDisplay
Why taking so long to add more information?
4
#12 opened 9 months ago
by
cinnybun02
test
👍 2
1
#11 opened 9 months ago
by
fahdmirzac
狗屎一样的更新, 变得和V3老版本一样平庸
👍🧠 46
47
#9 opened 9 months ago
by
smile1030
Create README.md
1
#8 opened 9 months ago
by
tioem
HunterMefford
🚀 1
1
#7 opened 9 months ago
by
Meffordh
здраствуйте
7
#6 opened 9 months ago
by
Tim324325
keep nucking whale
❤️ 4
3
#5 opened 9 months ago
by
sawd231
The whale is back
🚀❤️ 11
16
#4 opened 9 months ago
by
mrfakename
Where can I experience it?
2
#3 opened 9 months ago
by
aust-t