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) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# 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) - llama-cpp-python
How to use unsloth/DeepSeek-R1-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="unsloth/DeepSeek-R1-GGUF", filename="DeepSeek-R1-BF16/DeepSeek-R1.BF16-00001-of-00030.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use unsloth/DeepSeek-R1-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -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-server -hf unsloth/DeepSeek-R1-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf unsloth/DeepSeek-R1-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -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/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -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
- 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 Studio new
How to use unsloth/DeepSeek-R1-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for unsloth/DeepSeek-R1-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for unsloth/DeepSeek-R1-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for unsloth/DeepSeek-R1-GGUF to start chatting
- 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
Add files using upload-large-folder tool
Browse files- .gitattributes +15 -0
- DeepSeek-R1-UD-IQ1_M/DeepSeek-R1-UD-IQ1_M-00001-of-00004.gguf +3 -0
- DeepSeek-R1-UD-IQ1_M/DeepSeek-R1-UD-IQ1_M-00002-of-00004.gguf +3 -0
- DeepSeek-R1-UD-IQ1_M/DeepSeek-R1-UD-IQ1_M-00003-of-00004.gguf +3 -0
- DeepSeek-R1-UD-IQ1_M/DeepSeek-R1-UD-IQ1_M-00004-of-00004.gguf +3 -0
- DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00001-of-00003.gguf +3 -0
- DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00002-of-00003.gguf +3 -0
- DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00003-of-00003.gguf +3 -0
- DeepSeek-R1-UD-IQ2_XXS/DeepSeek-R1-UD-IQ2_XXS-00001-of-00004.gguf +3 -0
- DeepSeek-R1-UD-IQ2_XXS/DeepSeek-R1-UD-IQ2_XXS-00002-of-00004.gguf +3 -0
- DeepSeek-R1-UD-IQ2_XXS/DeepSeek-R1-UD-IQ2_XXS-00003-of-00004.gguf +3 -0
- DeepSeek-R1-UD-IQ2_XXS/DeepSeek-R1-UD-IQ2_XXS-00004-of-00004.gguf +3 -0
- DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00001-of-00005.gguf +3 -0
- DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00002-of-00005.gguf +3 -0
- DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00003-of-00005.gguf +3 -0
- DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00004-of-00005.gguf +3 -0
- DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00005-of-00005.gguf +3 -0
.gitattributes
CHANGED
|
@@ -207,3 +207,18 @@ DeepSeek-R1-Q2_UD/DeepSeek-R1-Q2_UD-00002-of-00005.gguf filter=lfs diff=lfs merg
|
|
| 207 |
DeepSeek-R1-IQ1_UD_S/DeepSeek-R1-IQ1_S-00001-of-00003.gguf filter=lfs diff=lfs merge=lfs -text
|
| 208 |
DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00001-of-00003.gguf filter=lfs diff=lfs merge=lfs -text
|
| 209 |
DeepSeek-R1-Q2_K_L/DeepSeek-R1-Q2_K_XL-00001-of-00005.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 207 |
DeepSeek-R1-IQ1_UD_S/DeepSeek-R1-IQ1_S-00001-of-00003.gguf filter=lfs diff=lfs merge=lfs -text
|
| 208 |
DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00001-of-00003.gguf filter=lfs diff=lfs merge=lfs -text
|
| 209 |
DeepSeek-R1-Q2_K_L/DeepSeek-R1-Q2_K_XL-00001-of-00005.gguf filter=lfs diff=lfs merge=lfs -text
|
| 210 |
+
DeepSeek-R1-UD-IQ1_M/DeepSeek-R1-UD-IQ1_M-00004-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
|
| 211 |
+
DeepSeek-R1-UD-IQ1_M/DeepSeek-R1-UD-IQ1_M-00002-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
|
| 212 |
+
DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00002-of-00005.gguf filter=lfs diff=lfs merge=lfs -text
|
| 213 |
+
DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00004-of-00005.gguf filter=lfs diff=lfs merge=lfs -text
|
| 214 |
+
DeepSeek-R1-UD-IQ1_M/DeepSeek-R1-UD-IQ1_M-00001-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
|
| 215 |
+
DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00005-of-00005.gguf filter=lfs diff=lfs merge=lfs -text
|
| 216 |
+
DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00003-of-00003.gguf filter=lfs diff=lfs merge=lfs -text
|
| 217 |
+
DeepSeek-R1-UD-IQ2_XXS/DeepSeek-R1-UD-IQ2_XXS-00001-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
|
| 218 |
+
DeepSeek-R1-UD-IQ2_XXS/DeepSeek-R1-UD-IQ2_XXS-00003-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
|
| 219 |
+
DeepSeek-R1-UD-IQ2_XXS/DeepSeek-R1-UD-IQ2_XXS-00004-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
|
| 220 |
+
DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00003-of-00005.gguf filter=lfs diff=lfs merge=lfs -text
|
| 221 |
+
DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00002-of-00003.gguf filter=lfs diff=lfs merge=lfs -text
|
| 222 |
+
DeepSeek-R1-UD-IQ2_XXS/DeepSeek-R1-UD-IQ2_XXS-00002-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
|
| 223 |
+
DeepSeek-R1-UD-IQ1_M/DeepSeek-R1-UD-IQ1_M-00003-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
|
| 224 |
+
DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00001-of-00005.gguf filter=lfs diff=lfs merge=lfs -text
|
DeepSeek-R1-UD-IQ1_M/DeepSeek-R1-UD-IQ1_M-00001-of-00004.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0d48c40de3bf58e9947d92864a3704d3bc00cfad9dbb8c0a050f2363544a2d8b
|
| 3 |
+
size 49268018272
|
DeepSeek-R1-UD-IQ1_M/DeepSeek-R1-UD-IQ1_M-00002-of-00004.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:897eeca22e71fe92a117085c8ab6b4a134cb879472bf6d93b56f8497d52ac0f7
|
| 3 |
+
size 49719024544
|
DeepSeek-R1-UD-IQ1_M/DeepSeek-R1-UD-IQ1_M-00003-of-00004.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d6460573757fb65aedd9bd7b02b5fa5ab6815c8797a086fb8b6ef8846d5a0719
|
| 3 |
+
size 49986597792
|
DeepSeek-R1-UD-IQ1_M/DeepSeek-R1-UD-IQ1_M-00004-of-00004.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c8d519ea81edf22a7979f078a34fb07728c9e6a82244b9fa03b400d60cb08053
|
| 3 |
+
size 19942643040
|
DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00001-of-00003.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f8a206f03ea08c1cfaab8695c7fb86a72dc1620886093b5860ae550ade9033ef
|
| 3 |
+
size 49349193664
|
DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00002-of-00003.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:775400c9fcf92862fca7af205669bdb84fa9c91f0f747fb2e573027077103fbf
|
| 3 |
+
size 49397904416
|
DeepSeek-R1-UD-IQ1_S/DeepSeek-R1-UD-IQ1_S-00003-of-00003.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3ec50e4d2ae64f78eb74dad4d40684c4970d37acfe25adf635a20ff6ec435fb6
|
| 3 |
+
size 41484340384
|
DeepSeek-R1-UD-IQ2_XXS/DeepSeek-R1-UD-IQ2_XXS-00001-of-00004.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:089bad3cbe27056cbcd39c5f6f32f0fee40ce8a24462ef3e5363bd7d85b0779a
|
| 3 |
+
size 49052228416
|
DeepSeek-R1-UD-IQ2_XXS/DeepSeek-R1-UD-IQ2_XXS-00002-of-00004.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ea1f482a3bde4e8303b52a689b2f7fa0bcfd6bdf311be7704dff6b824b03a5ed
|
| 3 |
+
size 49817480832
|
DeepSeek-R1-UD-IQ2_XXS/DeepSeek-R1-UD-IQ2_XXS-00003-of-00004.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b29c7a6a9d2f2f8826834d48cf62f3e2e67c2356fc261d6262827248fc00aa64
|
| 3 |
+
size 49817480832
|
DeepSeek-R1-UD-IQ2_XXS/DeepSeek-R1-UD-IQ2_XXS-00004-of-00004.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b7a7668399d5a297e08d2c85dc1d0355ebf6e64dc2fe66285f2ae51ea29db564
|
| 3 |
+
size 47475292352
|
DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00001-of-00005.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:311b7e2b72da29daffbac5e5f5df9353b1b3be9879d22d1dc498ece99529cfe5
|
| 3 |
+
size 49797296736
|
DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00002-of-00005.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b1b63ef53a397cb6ace27961165c1cfb82051b1ba42ade07405642ed096355d
|
| 3 |
+
size 49997709824
|
DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00003-of-00005.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:26dc583b72212bd0c0c0a646e78bb0863abef173de26cef5d38c2b051e3aaec6
|
| 3 |
+
size 49997709824
|
DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00004-of-00005.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:25427bd9a557f820cde553cfc5f6c911b6109322bd3dfa555ecbc0f0ad55c2f1
|
| 3 |
+
size 49997709824
|
DeepSeek-R1-UD-Q2/DeepSeek-R1-UD-Q2_K_XL-00005-of-00005.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9983ab89fe131158b39704b61f07215ed7c9f847ae9e97225d6a9e74692f70d2
|
| 3 |
+
size 26811168832
|