Instructions to use deepseek-ai/DeepSeek-R1-0528 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepseek-ai/DeepSeek-R1-0528 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-R1-0528", 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-R1-0528", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-R1-0528", 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-R1-0528 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deepseek-ai/DeepSeek-R1-0528" # 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-R1-0528", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/deepseek-ai/DeepSeek-R1-0528
- SGLang
How to use deepseek-ai/DeepSeek-R1-0528 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-R1-0528" \ --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-R1-0528", "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-R1-0528" \ --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-R1-0528", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use deepseek-ai/DeepSeek-R1-0528 with Docker Model Runner:
docker model run hf.co/deepseek-ai/DeepSeek-R1-0528
刚部署满血deepseek r1 0528版本,推理性能提升这么多嘛?不是架构没变嘛?
支持了fp8
这个是sglang的截图,是因为sglang默认换用了fa3,提升比较多
sglang用的哪个版本?
推理参数是什么呢?帮分享一下吧
单并发只有50吗?A100更快一点,可以做到80TPS
单并发只有50吗?A100更快一点,可以做到80TPS
怎么做到的!!!教教我,我也要用A100
单并发只有50吗?A100更快一点,可以做到80TPS
怎么做到的!!!教教我,我也要用A100
有一个为A100专门优化版本,Hopper架构也能跑,但没有调优:https://hub.docker.com/r/tutelgroup/deepseek-671b
单并发只有50吗?A100更快一点,可以做到80TPS
怎么做到的!!!教教我,我也要用A100
有一个为A100专门优化版本,Hopper架构也能跑,但没有调优:https://hub.docker.com/r/tutelgroup/deepseek-671b
A100并不支持FP4/FP8啊,这是怎么做到的?很神奇的样子,等我卡到了我要测试下
单并发只有50吗?A100更快一点,可以做到80TPS
请问tutel能否被用于openai server部署?还是只能在命令行做单请求
tutel 是一个moe相关的算子加速库,可以集成到sglang/vllm上实现engine的加速、或者增加对FP4的支持。
container demo 只提供了 ollama 一样的基本请求功能,根据时间充裕情况,以后可能会扩展。
tutel 是一个moe相关的算子加速库,可以集成到sglang/vllm上实现engine的加速。
container demo 只提供了 ollama 一样的基本请求功能,根据时间充裕情况,以后可能会扩展。
好的,我去提feature request了。。。这么高的性能应该会集成的比较快


