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 +12 -0
- DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00001-of-00012.gguf +3 -0
- DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00002-of-00012.gguf +3 -0
- DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00003-of-00012.gguf +3 -0
- DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00004-of-00012.gguf +3 -0
- DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00005-of-00012.gguf +3 -0
- DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00006-of-00012.gguf +3 -0
- DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00007-of-00012.gguf +3 -0
- DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00008-of-00012.gguf +3 -0
- DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00009-of-00012.gguf +3 -0
- DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00010-of-00012.gguf +3 -0
- DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00011-of-00012.gguf +3 -0
- DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00012-of-00012.gguf +3 -0
.gitattributes
CHANGED
|
@@ -117,3 +117,15 @@ Q6_K/DeepSeek-R1-Q6_K-00011-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
|
| 117 |
Q6_K/DeepSeek-R1-Q6_K-00005-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 118 |
Q6_K/DeepSeek-R1-Q6_K-00010-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 119 |
Q6_K/DeepSeek-R1-Q6_K-00004-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
Q6_K/DeepSeek-R1-Q6_K-00005-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 118 |
Q6_K/DeepSeek-R1-Q6_K-00010-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 119 |
Q6_K/DeepSeek-R1-Q6_K-00004-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 120 |
+
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00007-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 121 |
+
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00004-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 122 |
+
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00012-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 123 |
+
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00009-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 124 |
+
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00006-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 125 |
+
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00001-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 126 |
+
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00011-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 127 |
+
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00002-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 128 |
+
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00008-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 129 |
+
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00005-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 130 |
+
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00010-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
| 131 |
+
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00003-of-00012.gguf filter=lfs diff=lfs merge=lfs -text
|
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00001-of-00012.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:082f5089abe43bd20d337dfebe0f2601945b6eb1697e1593fb5bf1fc514c5de6
|
| 3 |
+
size 47094114816
|
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00002-of-00012.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f38bf39529de304d8b122a4905e3d00d1b706a20fef3b496e7849c82a3071dfe
|
| 3 |
+
size 47227297696
|
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00003-of-00012.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c42b5e669b8ad0bf03003a8c2b10b1b993393a30eecd7664541377e399b24bbd
|
| 3 |
+
size 47227297760
|
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00004-of-00012.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:daa4045d7b73f5406588984f2db3d6e126a15fd3027b7fc361794e9bffb6cda8
|
| 3 |
+
size 47227297760
|
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00005-of-00012.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d3759c75317c68ca92ec6b7e836a3c81492daa472b2fc010591990849d8da14d
|
| 3 |
+
size 47227297760
|
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00006-of-00012.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d001edbcaa539f195aa6faf453dd159d37ee31223cce2415bc971c5ce165baa
|
| 3 |
+
size 47227297760
|
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00007-of-00012.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:25eb2c9e9c8ae49d3c204189a5c2aa03b13c6359d99838232f7b5c6585c196d0
|
| 3 |
+
size 47227297760
|
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00008-of-00012.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39cf879f0716db037f7638924918c691ee855c27bb44964aa117b28f9fd69496
|
| 3 |
+
size 47227297760
|
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00009-of-00012.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:942f70f5dd51ff258389ac53a732215601524a6608a81e39fcaa750fccd74b49
|
| 3 |
+
size 47227297760
|
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00010-of-00012.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:77ec68cefe2bf335cb3c841e19c1cbf2bab0f1062c5de1136e4f658d2c1b1fc8
|
| 3 |
+
size 47227297760
|
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00011-of-00012.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4e4ef2e5f9b469325050f2a4ec4efd6e3b5459a610436a0628a5a0c2736373fb
|
| 3 |
+
size 47227297760
|
DeepSeek-R1-Q6_K/DeepSeek-R1-Q6_K-00012-of-00012.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0cfea1e3309501d9d8e4db8d34b2414f5cb288b0862f45c3a2d7bca002b07be9
|
| 3 |
+
size 31431234528
|