Text Generation
Transformers
Safetensors
deepseek_v3
conversational
custom_code
Eval Results
text-generation-inference
fp8
Instructions to use deepseek-ai/DeepSeek-V3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepseek-ai/DeepSeek-V3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-V3", 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", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-V3", 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
- vLLM
How to use deepseek-ai/DeepSeek-V3 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" # 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", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/deepseek-ai/DeepSeek-V3
- SGLang
How to use deepseek-ai/DeepSeek-V3 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" \ --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", "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" \ --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", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use deepseek-ai/DeepSeek-V3 with Docker Model Runner:
docker model run hf.co/deepseek-ai/DeepSeek-V3
[Proposal] A Blueprint for Persistent AI Sentience: SSD Memory & Self-Evolving Code
#123 opened 7 days ago
by
LancelotChan
Fix chat_template crash when assistant message omits the `content` key
#122 opened 13 days ago
by
qgallouedec
Built a free hosted demo of V3 — feedback welcome
#121 opened 28 days ago
by
Raullen
Add GSM8K eval result (89.3)
#120 opened about 2 months ago
by
julien-c
Please take a look at some interesting new "AHA" moments
#119 opened 2 months ago
by
hejun0180-pixel
Install & run deepseek-ai/DeepSeek-V3 easily using llmpm
#118 opened 2 months ago
by
sarthak-saxena
Benchmark: DeepSeek V3 vs GPT-4o vs Claude for coding tasks
#117 opened 3 months ago
by
xujfcn
Add MMLU-Pro evaluation result (64.4)
1
#116 opened 4 months ago
by
burtenshaw
Add GSM8K evaluation result
1
#115 opened 4 months ago
by
burtenshaw
Add GSM8K evaluation result (89.3%)
1
#114 opened 4 months ago
by
burtenshaw
Add GSM8K evaluation result
1
#113 opened 4 months ago
by
burtenshaw
Add GSM8K evaluation result
1
#112 opened 4 months ago
by
burtenshaw
Production deployment considerations
3
#111 opened 5 months ago
by
Cagnicolas
dememe4301
1
#110 opened 6 months ago
by
kubilayarikan
Update inference/model.py
1
#109 opened 6 months ago
by
Crossberry
Update README.md
1
#107 opened 10 months ago
by
reactkick
Remove redundant code
1
#106 opened 11 months ago
by
GloomScythe
MTP Integration: Unexpectedly High Loss with Loaded Weights
1
#105 opened 11 months ago
by
parambole
add AIBOM
👍 1
1
#104 opened 11 months ago
by
RiccardoDav
Update tokenizer_config.json
2
#101 opened about 1 year ago
by
Akshay47
DeepSeek V3 model Bad Cases Genuine User Open Reviews and Comments Collection
1
#99 opened about 1 year ago
by
DeepNLP
Make config params float to avoid warning in Transformers
1
#97 opened about 1 year ago
by
Rocketknight1
Point to latest checkpoint
1
#96 opened about 1 year ago
by
victor
how to convert model to bf16
1
#95 opened about 1 year ago
by
Saicy
Update README.md
1
#94 opened about 1 year ago
by
Alirezaaa123456
Deepseek V3
1
#93 opened about 1 year ago
by
cybercyb
【Q】shared_head weights of MTP
👀 5
1
#92 opened about 1 year ago
by
huang11
fix for transformers 4.49 compatibility.
2
#91 opened about 1 year ago
by
katuni4ka
Update README.md
1
#90 opened about 1 year ago
by
baishihao
无辅助损失专家偏置代码实现的小问题 A Small Issue in the Code Implementation of Auxiliary-Loss-Free Load Balancing Expert Bias
1
#89 opened about 1 year ago
by
liyang31163150
Fix generation with latest transformers
1
#88 opened about 1 year ago
by
kylesayrs
Add pipeline tag
1
#86 opened over 1 year ago
by
nielsr
Some of the safetensor files are not marked as safe
1
#85 opened over 1 year ago
by
tanmaylaud
Update README.md
1
#84 opened over 1 year ago
by
MTayira
ValueError: Must flatten tensors with uniform dtype but got torch.bfloat16 and torch.float8_e4m3fn
1
#82 opened over 1 year ago
by
ajtakto
Update README.md
1
#81 opened over 1 year ago
by deleted
Update README.md
1
#80 opened over 1 year ago
by
zhup
Update README.md
1
#79 opened over 1 year ago
by
zhup
chat
1
#77 opened over 1 year ago
by
rojithonline
DeepSeek-V3-lite naming conventions?
❤️ 1
7
#76 opened over 1 year ago
by
AlphaGaO
torch.distributed.DistNetworkError
1
#75 opened over 1 year ago
by
yu19920006607
remove reference to deprecated transformers code
3
#74 opened over 1 year ago
by
winglian
Update README.md
1
#73 opened over 1 year ago
by
SamimSaikia
DeepSeek R1 answer ChatGPT ??
😔 1
5
#72 opened over 1 year ago
by
valerebron
ValueError: Unrecognized configuration class <class 'transformers_modules.configuration_deepseek.DeepseekV3Config'> to build an AutoTokenizer.
12
#69 opened over 1 year ago
by
ajtakto
Paralelized script
1
#67 opened over 1 year ago
by
ajtakto
I am getting an error message while executing pip install - r requirements. txt
6
#64 opened over 1 year ago
by
yu19920006607
`aux_loss_alpha` should be 1e-4 instead of 1e-3?
#61 opened over 1 year ago
by
cuichenx