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-00054-of-000163.safetensors with huggingface_hub
Verified signaturedaa010a -
Upload model-00053-of-000163.safetensors with huggingface_hub
Verified signature6ebf218 -
Upload model-00052-of-000163.safetensors with huggingface_hub
Verified signaturedbc071e -
Upload model-00051-of-000163.safetensors with huggingface_hub
Verified signature9b5b84c -
Upload model-00050-of-000163.safetensors with huggingface_hub
Verified signaturef9c9245 -
Upload model-00049-of-000163.safetensors with huggingface_hub
Verified signaturec994da6 -
Upload model-00048-of-000163.safetensors with huggingface_hub
Verified signatured3b13be -
Upload model-00047-of-000163.safetensors with huggingface_hub
Verified signatureab85515 -
Upload model-00046-of-000163.safetensors with huggingface_hub
Verified signature63116c0 -
Upload model-00045-of-000163.safetensors with huggingface_hub
Verified signature6b0891f -
Upload model-00044-of-000163.safetensors with huggingface_hub
Verified signaturebff0dab -
Upload model-00043-of-000163.safetensors with huggingface_hub
Verified signature33b83e3 -
Upload model-00042-of-000163.safetensors with huggingface_hub
Verified signaturec3e48eb -
Upload model-00041-of-000163.safetensors with huggingface_hub
Verified signature0b227ad -
Upload model-00040-of-000163.safetensors with huggingface_hub
Verified signature9cb01f3 -
Upload model-00039-of-000163.safetensors with huggingface_hub
Verified signature2cd6b96 -
Upload model-00038-of-000163.safetensors with huggingface_hub
Verified signaturea7f550f -
Upload model-00037-of-000163.safetensors with huggingface_hub
Verified signature47241bf -
Upload model-00036-of-000163.safetensors with huggingface_hub
Verified signatured417934 -
Upload model-00035-of-000163.safetensors with huggingface_hub
Verified signature14ed48c -
Upload model-00034-of-000163.safetensors with huggingface_hub
Verified signature404b560 -
Upload model-00033-of-000163.safetensors with huggingface_hub
Verified signature54fc934 -
Upload model-00032-of-000163.safetensors with huggingface_hub
Verified signature0f9785a -
Upload model-00031-of-000163.safetensors with huggingface_hub
Verified signature36b159a -
Upload model-00030-of-000163.safetensors with huggingface_hub
Verified signaturee56cf72 -
Upload model-00029-of-000163.safetensors with huggingface_hub
Verified signaturea29cd07 -
Upload model-00028-of-000163.safetensors with huggingface_hub
Verified signaturec8080d1 -
Upload model-00027-of-000163.safetensors with huggingface_hub
Verified signature99b2662 -
Upload model-00026-of-000163.safetensors with huggingface_hub
Verified signature598b207 -
Upload model-00025-of-000163.safetensors with huggingface_hub
Verified signature9437807 -
Upload model-00024-of-000163.safetensors with huggingface_hub
Verified signature13d23a6 -
Upload model-00023-of-000163.safetensors with huggingface_hub
Verified signature2f1368e -
Upload model-00022-of-000163.safetensors with huggingface_hub
Verified signature53b063c -
Upload model-00021-of-000163.safetensors with huggingface_hub
Verified signature28b4c25 -
Upload model-00020-of-000163.safetensors with huggingface_hub
Verified signature8a899d1 -
Upload model-00019-of-000163.safetensors with huggingface_hub
Verified signature565c7e0 -
Upload model-00018-of-000163.safetensors with huggingface_hub
Verified signature629a0eb -
Upload model-00017-of-000163.safetensors with huggingface_hub
Verified signature62eef56 -
Upload model-00016-of-000163.safetensors with huggingface_hub
Verified signature9853e03 -
Upload model-00015-of-000163.safetensors with huggingface_hub
Verified signature3b3caff -
Upload model-00014-of-000163.safetensors with huggingface_hub
Verified signature3e15bcc -
Upload model-00013-of-000163.safetensors with huggingface_hub
Verified signature0bd1d0c -
Upload model-00012-of-000163.safetensors with huggingface_hub
Verified signaturee2dd6eb -
Upload model-00011-of-000163.safetensors with huggingface_hub
Verified signature859fc92 -
Upload model-00010-of-000163.safetensors with huggingface_hub
Verified signature056ee33 -
Upload model-00009-of-000163.safetensors with huggingface_hub
Verified signaturea6eed19 -
Upload model-00008-of-000163.safetensors with huggingface_hub
Verified signature0d17669 -
Upload model-00007-of-000163.safetensors with huggingface_hub
Verified signaturefed0033 -
Upload model-00006-of-000163.safetensors with huggingface_hub
Verified signature5b936a2 -
Upload model-00005-of-000163.safetensors with huggingface_hub
Verified signaturea18c9cd