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
-
Update README.md
Verified signature5831f13 -
Upload model-00163-of-000163.safetensors with huggingface_hub
Verified signature282af7b -
Upload model-00162-of-000163.safetensors with huggingface_hub
Verified signature9b05396 -
Upload model-00161-of-000163.safetensors with huggingface_hub
Verified signature2626adf -
Upload model-00160-of-000163.safetensors with huggingface_hub
Verified signature728b979 -
Upload model-00159-of-000163.safetensors with huggingface_hub
Verified signature93279db -
Upload model-00158-of-000163.safetensors with huggingface_hub
Verified signature025132c -
Upload model-00157-of-000163.safetensors with huggingface_hub
Verified signature4b8c78c -
Upload model-00156-of-000163.safetensors with huggingface_hub
Verified signature010767e -
Upload model-00155-of-000163.safetensors with huggingface_hub
Verified signature0d021bf -
Upload model-00154-of-000163.safetensors with huggingface_hub
Verified signature9dca62a -
Upload model-00153-of-000163.safetensors with huggingface_hub
Verified signaturec421282 -
Upload model-00152-of-000163.safetensors with huggingface_hub
Verified signature59022ee -
Upload model-00151-of-000163.safetensors with huggingface_hub
Verified signature05e393f -
Upload model-00150-of-000163.safetensors with huggingface_hub
Verified signaturef404ab1 -
Upload model-00149-of-000163.safetensors with huggingface_hub
Verified signature2d039d2 -
Upload model-00148-of-000163.safetensors with huggingface_hub
Verified signature9cae2e3 -
Upload model-00147-of-000163.safetensors with huggingface_hub
Verified signatured67414f -
Upload model-00146-of-000163.safetensors with huggingface_hub
Verified signature6faf308 -
Upload model-00145-of-000163.safetensors with huggingface_hub
Verified signature9ec93b4 -
Upload model-00144-of-000163.safetensors with huggingface_hub
Verified signaturedf1739c -
Upload model-00143-of-000163.safetensors with huggingface_hub
Verified signaturec82f6b8 -
Upload model-00142-of-000163.safetensors with huggingface_hub
Verified signature9d01600 -
Upload model-00141-of-000163.safetensors with huggingface_hub
Verified signature5d5e1c7 -
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