Instructions to use duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-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 duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-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 duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-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 duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-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 duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF:Q4_K_M
Use Docker
docker model run hf.co/duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-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": "duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF:Q4_K_M
- SGLang
How to use duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-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 "duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-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": "duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-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 "duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-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": "duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF with Ollama:
ollama run hf.co/duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF with Docker Model Runner:
docker model run hf.co/duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF:Q4_K_M
- Lemonade
How to use duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull duyntnet/DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.DeepSeek-R1-Distill-Llama-8B-imatrix-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Quantizations of https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-8B
Open source inference clients/UIs
Closed source inference clients/UIs
From original readme
We introduce our first-generation reasoning models, DeepSeek-R1-Zero and DeepSeek-R1. DeepSeek-R1-Zero, a model trained via large-scale reinforcement learning (RL) without supervised fine-tuning (SFT) as a preliminary step, demonstrated remarkable performance on reasoning. With RL, DeepSeek-R1-Zero naturally emerged with numerous powerful and interesting reasoning behaviors. However, DeepSeek-R1-Zero encounters challenges such as endless repetition, poor readability, and language mixing. To address these issues and further enhance reasoning performance, we introduce DeepSeek-R1, which incorporates cold-start data before RL. DeepSeek-R1 achieves performance comparable to OpenAI-o1 across math, code, and reasoning tasks. To support the research community, we have open-sourced DeepSeek-R1-Zero, DeepSeek-R1, and six dense models distilled from DeepSeek-R1 based on Llama and Qwen. DeepSeek-R1-Distill-Qwen-32B outperforms OpenAI-o1-mini across various benchmarks, achieving new state-of-the-art results for dense models.
How to Run Locally
DeepSeek-R1 Models
Please visit DeepSeek-V3 repo for more information about running DeepSeek-R1 locally.
NOTE: Hugging Face's Transformers has not been directly supported yet.
DeepSeek-R1-Distill Models
DeepSeek-R1-Distill models can be utilized in the same manner as Qwen or Llama models.
For instance, you can easily start a service using vLLM:
vllm serve deepseek-ai/DeepSeek-R1-Distill-Qwen-32B --tensor-parallel-size 2 --max-model-len 32768 --enforce-eager
You can also easily start a service using SGLang
python3 -m sglang.launch_server --model deepseek-ai/DeepSeek-R1-Distill-Qwen-32B --trust-remote-code --tp 2
Usage Recommendations
We recommend adhering to the following configurations when utilizing the DeepSeek-R1 series models, including benchmarking, to achieve the expected performance:
- Set the temperature within the range of 0.5-0.7 (0.6 is recommended) to prevent endless repetitions or incoherent outputs.
- Avoid adding a system prompt; all instructions should be contained within the user prompt.
- For mathematical problems, it is advisable to include a directive in your prompt such as: "Please reason step by step, and put your final answer within \boxed{}."
- When evaluating model performance, it is recommended to conduct multiple tests and average the results.
Additionally, we have observed that the DeepSeek-R1 series models tend to bypass thinking pattern (i.e., outputting "<think>\n\n</think>") when responding to certain queries, which can adversely affect the model's performance. To ensure that the model engages in thorough reasoning, we recommend enforcing the model to initiate its response with "<think>\n" at the beginning of every output.
- Downloads last month
- 252
1-bit
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit