Instructions to use unsloth/DeepSeek-R1-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/DeepSeek-R1-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unsloth/DeepSeek-R1-GGUF", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("unsloth/DeepSeek-R1-GGUF", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("unsloth/DeepSeek-R1-GGUF", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use unsloth/DeepSeek-R1-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/DeepSeek-R1-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf unsloth/DeepSeek-R1-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/DeepSeek-R1-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf unsloth/DeepSeek-R1-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf unsloth/DeepSeek-R1-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf unsloth/DeepSeek-R1-GGUF:Q4_K_M
Use Docker
docker model run hf.co/unsloth/DeepSeek-R1-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use unsloth/DeepSeek-R1-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/DeepSeek-R1-GGUF" # 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-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unsloth/DeepSeek-R1-GGUF:Q4_K_M
- SGLang
How to use unsloth/DeepSeek-R1-GGUF 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-GGUF" \ --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-GGUF", "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-GGUF" \ --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-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use unsloth/DeepSeek-R1-GGUF with Ollama:
ollama run hf.co/unsloth/DeepSeek-R1-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use unsloth/DeepSeek-R1-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/DeepSeek-R1-GGUF:Q4_K_M
- Lemonade
How to use unsloth/DeepSeek-R1-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/DeepSeek-R1-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.DeepSeek-R1-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Commit History
-
Update README.md
Verified signature4dab99f
-
Delete Q8_0
Verified signaturee6d48c6 -
Delete Q5_K_M
Verified signaturecf54b4b -
Delete Q3_K_M
Verified signature8e76e51 -
Delete Q2_K_L
Verified signature9db7f60 -
Delete BF16
Verified signature1bc47dd
-
Update README.md
Verified signaturea523ebd
-
Add files using upload-large-folder tool
Verified signature3c4941a -
Add files using upload-large-folder tool
Verified signature419b46f
-
Add files using upload-large-folder tool
Verified signatured220066
-
Update README.md
Verified signature02bcc0a
-
Update README.md
Verified signaturec1cd3da
-
Update README.md
Verified signatureaab9249 -
Update README.md
Verified signaturef615ad3
-
Update README.md
Verified signaturee092ebe -
Update README.md
Verified signaturee94a1c7
-
Update README.md
Verified signature3083b08
-
Update README.md
Verified signature90bbbcf -
Update README.md
Verified signatureeafc82a -
Update README.md
Verified signature12c2900 -
Update README.md
Verified signatureaaffc4e -
Update README.md
Verified signaturef44860f -
Update README.md
Verified signature17ec705 -
Update README.md
Verified signatureba27025 -
Update README.md
Verified signaturefcb1678
-
Update README.md
Verified signature1506ee4 -
Add files using upload-large-folder tool
Verified signaturecdf2939 -
Delete DeepSeek-R1-UD-Q2
Verified signaturea41683d -
Add files using upload-large-folder tool
Verified signature02656f6 -
Rename DeepSeek-R1-Q2_K_L/DeepSeek-R1-Q2_K_XL-00001-of-00005.gguf to DeepSeek-R1-Q2_K_L/DeepSeek-R1-Q2_K_L-00001-of-00005.gguf
Verified signaturec4da182 -
Rename DeepSeek-R1-Q2_K_L/DeepSeek-R1-Q2_K_L-00001-of-00005.gguf to DeepSeek-R1-Q2_K_L/DeepSeek-R1-Q2_K_XL-00001-of-00005.gguf
Verified signature9fc8512 -
Delete DeepSeek-R1-Q2_UD
Verified signature01665d0 -
Delete DeepSeek-R1-IQ2_UD
Verified signatureaa043d6 -
Delete DeepSeek-R1-IQ1_UD_S
Verified signatureb4ae30d -
Delete DeepSeek-R1-IQ1_UD
Verified signature9c4c04d -
Delete DeepSeek-R1-UD-IQ1_S
Verified signature07e5097 -
Rename DeepSeek-R1-IQ1_UD_S/DeepSeek-R1-IQ1_S-00001-of-00003.gguf to DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00001-of-00003.gguf
Verified signature5047385 -
Rename DeepSeek-R1-IQ1_UD_S/DeepSeek-R1-IQ1_UD_S-00001-of-00003.gguf to DeepSeek-R1-IQ1_UD_S/DeepSeek-R1-IQ1_S-00001-of-00003.gguf
Verified signature956c18f -
Add files using upload-large-folder tool
Verified signature4408aa2 -
Add files using upload-large-folder tool
Verified signature1c5ee84 -
Add files using upload-large-folder tool
Verified signaturebe42a9a
-
Add files using upload-large-folder tool
Verified signaturec0b6265 -
Delete Q5_K_M
Verified signature9e85135 -
Add files using upload-large-folder tool
Verified signature64961ae -
Add files using upload-large-folder tool
Verified signature38a2a8b -
Delete DeepSeek-R1-Q2_K_L
Verified signaturefbc9ad4 -
Delete Q6_K
Verified signature5d2eee2 -
Delete DeepSeek-R1-Q5_K_M
Verified signature72f0a72 -
Delete DeepSeek-R1-Q4_K_M
Verified signaturece23135 -
Add files using upload-large-folder tool
Verified signature7b636fc