Text Generation
Transformers
Safetensors
English
deepseek_v3
deepseek
unsloth
conversational
custom_code
text-generation-inference
fp8
Instructions to use unsloth/DeepSeek-R1-Zero with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/DeepSeek-R1-Zero with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unsloth/DeepSeek-R1-Zero", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("unsloth/DeepSeek-R1-Zero", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("unsloth/DeepSeek-R1-Zero", trust_remote_code=True, device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use unsloth/DeepSeek-R1-Zero with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/DeepSeek-R1-Zero" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/DeepSeek-R1-Zero", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unsloth/DeepSeek-R1-Zero
- SGLang
How to use unsloth/DeepSeek-R1-Zero 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 "unsloth/DeepSeek-R1-Zero" \ --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": "unsloth/DeepSeek-R1-Zero", "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 "unsloth/DeepSeek-R1-Zero" \ --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": "unsloth/DeepSeek-R1-Zero", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use unsloth/DeepSeek-R1-Zero with Docker Model Runner:
docker model run hf.co/unsloth/DeepSeek-R1-Zero
Commit History
-
Upload model-00140-of-000163.safetensors with huggingface_hub
Verified signatureac8b3eb -
Upload model-00139-of-000163.safetensors with huggingface_hub
Verified signaturee1a6eae -
Upload model-00138-of-000163.safetensors with huggingface_hub
Verified signature649c61d -
Upload model-00137-of-000163.safetensors with huggingface_hub
Verified signature18e621d -
Upload model-00136-of-000163.safetensors with huggingface_hub
Verified signature607c67b -
Upload model-00135-of-000163.safetensors with huggingface_hub
Verified signature437104c -
Upload model-00134-of-000163.safetensors with huggingface_hub
Verified signature004d6f7 -
Upload model-00133-of-000163.safetensors with huggingface_hub
Verified signatured82477a -
Upload model-00132-of-000163.safetensors with huggingface_hub
Verified signature1a2c80c -
Upload model-00131-of-000163.safetensors with huggingface_hub
Verified signature08c088e -
Upload model-00130-of-000163.safetensors with huggingface_hub
Verified signature31776c2 -
Upload model-00129-of-000163.safetensors with huggingface_hub
Verified signaturea0e57af -
Upload model-00128-of-000163.safetensors with huggingface_hub
Verified signatured82e09f -
Upload model-00127-of-000163.safetensors with huggingface_hub
Verified signature13c64ef -
Upload model-00126-of-000163.safetensors with huggingface_hub
Verified signature083b6ea -
Upload model-00125-of-000163.safetensors with huggingface_hub
Verified signature38a53ad -
Upload model-00124-of-000163.safetensors with huggingface_hub
Verified signatureb3e18cb -
Upload model-00123-of-000163.safetensors with huggingface_hub
Verified signature4ae8777 -
Upload model-00122-of-000163.safetensors with huggingface_hub
Verified signatured77e1f5 -
Upload model-00121-of-000163.safetensors with huggingface_hub
Verified signaturee8efdfa -
Upload model-00120-of-000163.safetensors with huggingface_hub
Verified signature9da5ab3 -
Upload model-00119-of-000163.safetensors with huggingface_hub
Verified signaturec96ffc7 -
Upload model-00118-of-000163.safetensors with huggingface_hub
Verified signature2f5fd00 -
Upload model-00117-of-000163.safetensors with huggingface_hub
Verified signature2e103ad -
Upload model-00116-of-000163.safetensors with huggingface_hub
Verified signature60c9e95 -
Upload model-00115-of-000163.safetensors with huggingface_hub
Verified signature3715d0c -
Upload model-00114-of-000163.safetensors with huggingface_hub
Verified signaturef5f9ede -
Upload model-00113-of-000163.safetensors with huggingface_hub
Verified signature7fee743 -
Upload model-00112-of-000163.safetensors with huggingface_hub
Verified signaturee43d416 -
Upload model-00111-of-000163.safetensors with huggingface_hub
Verified signature09f1f93 -
Upload model-00110-of-000163.safetensors with huggingface_hub
Verified signature3a91756 -
Upload model-00109-of-000163.safetensors with huggingface_hub
Verified signature27e66de -
Upload model-00108-of-000163.safetensors with huggingface_hub
Verified signature898b034 -
Upload model-00107-of-000163.safetensors with huggingface_hub
Verified signature9d83c43 -
Upload model-00106-of-000163.safetensors with huggingface_hub
Verified signature9c6d282 -
Upload model-00105-of-000163.safetensors with huggingface_hub
Verified signature57ce7bb -
Upload model-00104-of-000163.safetensors with huggingface_hub
Verified signatureca0e5e9 -
Upload model-00103-of-000163.safetensors with huggingface_hub
Verified signatured1d6535 -
Upload model-00102-of-000163.safetensors with huggingface_hub
Verified signature94e1f94 -
Upload model-00101-of-000163.safetensors with huggingface_hub
Verified signature3ad05f1 -
Upload model-00100-of-000163.safetensors with huggingface_hub
Verified signatured2f1cc8 -
Upload model-00099-of-000163.safetensors with huggingface_hub
Verified signature14f7aa6 -
Upload model-00098-of-000163.safetensors with huggingface_hub
Verified signature8a42d93 -
Upload model-00097-of-000163.safetensors with huggingface_hub
Verified signature5476f77 -
Upload model-00096-of-000163.safetensors with huggingface_hub
Verified signature8d49743 -
Upload model-00095-of-000163.safetensors with huggingface_hub
Verified signaturecb4c1fb -
Upload model-00094-of-000163.safetensors with huggingface_hub
Verified signature81799a3 -
Upload model-00093-of-000163.safetensors with huggingface_hub
Verified signaturece9ffc8 -
Upload model-00092-of-000163.safetensors with huggingface_hub
Verified signature95fa8ab -
Upload model-00091-of-000163.safetensors with huggingface_hub
Verified signatureb0e1588