Instructions to use NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant", dtype="auto") - llama-cpp-python
How to use NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant", filename="DeepSeek-R1-Distill-Llama-8B-NexaQuant.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant # Run inference directly in the terminal: llama-cli -hf NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant # Run inference directly in the terminal: llama-cli -hf NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant
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 NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant # Run inference directly in the terminal: ./llama-cli -hf NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant
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 NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant # Run inference directly in the terminal: ./build/bin/llama-cli -hf NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant
Use Docker
docker model run hf.co/NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant
- LM Studio
- Jan
- Ollama
How to use NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant with Ollama:
ollama run hf.co/NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant
- Unsloth Studio
How to use NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant 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 NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant 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 NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant to start chatting
- Docker Model Runner
How to use NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant with Docker Model Runner:
docker model run hf.co/NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant
- Lemonade
How to use NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull NexaAI/DeepSeek-R1-Distill-Llama-8B-NexaQuant
Run and chat with the model
lemonade run user.DeepSeek-R1-Distill-Llama-8B-NexaQuant-{{QUANT_TAG}}List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -17,7 +17,7 @@ tags:
|
|
| 17 |
|
| 18 |
DeepSeek-R1 has been making headlines for rivaling OpenAI’s O1 reasoning model while remaining fully open-source. Many users want to run it locally to ensure data privacy, reduce latency, and maintain offline access. However, fitting such a large model onto personal devices typically requires quantization (e.g. Q4_K_M), which often sacrifices accuracy (up to ~22% accuracy loss) and undermines the benefits of the local reasoning model.
|
| 19 |
|
| 20 |
-
We’ve solved the trade-off by quantizing the DeepSeek R1 Distilled model to one-fourth its original size—without losing any accuracy. This lets you run powerful on-device reasoning wherever you are, with no compromises. Tests on an **HP Omnibook AIPC** with an **AMD Ryzen™ AI 9 HX 370 processor** showed a decoding speed of **
|
| 21 |
|
| 22 |
## How to run locally
|
| 23 |
|
|
|
|
| 17 |
|
| 18 |
DeepSeek-R1 has been making headlines for rivaling OpenAI’s O1 reasoning model while remaining fully open-source. Many users want to run it locally to ensure data privacy, reduce latency, and maintain offline access. However, fitting such a large model onto personal devices typically requires quantization (e.g. Q4_K_M), which often sacrifices accuracy (up to ~22% accuracy loss) and undermines the benefits of the local reasoning model.
|
| 19 |
|
| 20 |
+
We’ve solved the trade-off by quantizing the DeepSeek R1 Distilled model to one-fourth its original size—without losing any accuracy. This lets you run powerful on-device reasoning wherever you are, with no compromises. Tests on an **HP Omnibook AIPC** with an **AMD Ryzen™ AI 9 HX 370 processor** showed a decoding speed of **17.20 tokens per second** and a peak RAM usage of just **5017 MB** in NexaQuant version—compared to only **5.30 tokens** per second and **15564 MB RAM** in the unquantized version—while **maintaining full precision model accuracy.**
|
| 21 |
|
| 22 |
## How to run locally
|
| 23 |
|