Instructions to use unsloth/DeepSeek-R1-Zero-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/DeepSeek-R1-Zero-GGUF with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("unsloth/DeepSeek-R1-Zero-GGUF", dtype="auto") - llama-cpp-python
How to use unsloth/DeepSeek-R1-Zero-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="unsloth/DeepSeek-R1-Zero-GGUF", filename="DeepSeek-R1-Zero-Q2_K_L/DeepSeek-R1-Zero-Q2_K_L-00001-of-00005.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use unsloth/DeepSeek-R1-Zero-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-Zero-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf unsloth/DeepSeek-R1-Zero-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-Zero-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf unsloth/DeepSeek-R1-Zero-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-Zero-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf unsloth/DeepSeek-R1-Zero-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-Zero-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/DeepSeek-R1-Zero-GGUF:Q4_K_M
Use Docker
docker model run hf.co/unsloth/DeepSeek-R1-Zero-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use unsloth/DeepSeek-R1-Zero-GGUF with Ollama:
ollama run hf.co/unsloth/DeepSeek-R1-Zero-GGUF:Q4_K_M
- Unsloth Studio new
How to use unsloth/DeepSeek-R1-Zero-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-Zero-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-Zero-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-Zero-GGUF to start chatting
- Docker Model Runner
How to use unsloth/DeepSeek-R1-Zero-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/DeepSeek-R1-Zero-GGUF:Q4_K_M
- Lemonade
How to use unsloth/DeepSeek-R1-Zero-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/DeepSeek-R1-Zero-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.DeepSeek-R1-Zero-GGUF-Q4_K_M
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -15,11 +15,11 @@ tags:
|
|
| 15 |
Or you can view more detailed instructions here: [unsloth.ai/blog/deepseek-r1](https://unsloth.ai/blog/deepseek-r1)
|
| 16 |
1. Do not forget about `<|User|>` and `<|Assistant|>` tokens! - Or use a chat template formatter
|
| 17 |
2. Obtain the latest `llama.cpp` at https://github.com/ggerganov/llama.cpp
|
| 18 |
-
3. Example with
|
| 19 |
```bash
|
| 20 |
./llama.cpp/llama-cli \
|
| 21 |
-
--model unsloth/DeepSeek-R1-GGUF/DeepSeek-R1-
|
| 22 |
-
--cache-type-k
|
| 23 |
--threads 16 \
|
| 24 |
--prompt '<|User|>What is 1+1?<|Assistant|>' \
|
| 25 |
-no-cnv
|
|
@@ -38,8 +38,8 @@ Or you can view more detailed instructions here: [unsloth.ai/blog/deepseek-r1](h
|
|
| 38 |
4. If you have a GPU (RTX 4090 for example) with 24GB, you can offload multiple layers to the GPU for faster processing. If you have multiple GPUs, you can probably offload more layers.
|
| 39 |
```bash
|
| 40 |
./llama.cpp/llama-cli \
|
| 41 |
-
--model unsloth/DeepSeek-R1-GGUF/DeepSeek-R1-
|
| 42 |
-
--cache-type-k
|
| 43 |
--threads 16
|
| 44 |
--prompt '<|User|>What is 1+1?<|Assistant|>'
|
| 45 |
--n-gpu-layers 20 \
|
|
|
|
| 15 |
Or you can view more detailed instructions here: [unsloth.ai/blog/deepseek-r1](https://unsloth.ai/blog/deepseek-r1)
|
| 16 |
1. Do not forget about `<|User|>` and `<|Assistant|>` tokens! - Or use a chat template formatter
|
| 17 |
2. Obtain the latest `llama.cpp` at https://github.com/ggerganov/llama.cpp
|
| 18 |
+
3. Example with Q5_0 K quantized cache **Notice -no-cnv disables auto conversation mode**
|
| 19 |
```bash
|
| 20 |
./llama.cpp/llama-cli \
|
| 21 |
+
--model unsloth/DeepSeek-R1-GGUF/DeepSeek-R1-Q2_K_XS.gguf \
|
| 22 |
+
--cache-type-k q5_0 \
|
| 23 |
--threads 16 \
|
| 24 |
--prompt '<|User|>What is 1+1?<|Assistant|>' \
|
| 25 |
-no-cnv
|
|
|
|
| 38 |
4. If you have a GPU (RTX 4090 for example) with 24GB, you can offload multiple layers to the GPU for faster processing. If you have multiple GPUs, you can probably offload more layers.
|
| 39 |
```bash
|
| 40 |
./llama.cpp/llama-cli \
|
| 41 |
+
--model unsloth/DeepSeek-R1-GGUF/DeepSeek-R1-Q2_K_XS.gguf
|
| 42 |
+
--cache-type-k q5_0
|
| 43 |
--threads 16
|
| 44 |
--prompt '<|User|>What is 1+1?<|Assistant|>'
|
| 45 |
--n-gpu-layers 20 \
|