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
|
@@ -8,21 +8,20 @@ tags:
|
|
| 8 |
- llama
|
| 9 |
- llama-3
|
| 10 |
- meta
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
# DeepSeek-R1-Distill-Llama-8B-NexaQuant
|
| 14 |
|
| 15 |
## Background + Overview
|
|
|
|
| 16 |
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.
|
| 17 |
|
| 18 |
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 **66.40 tokens per second** and a peak RAM usage of just **1228 MB** in NexaQuant version—compared to only **25.28 tokens** per second and **3788 MB RAM** in the unquantized version—while **maintaining full precision model accuracy.**
|
| 19 |
|
| 20 |
-
---
|
| 21 |
-
|
| 22 |
## How to run locally
|
| 23 |
-
NexaQuant is compatible with **Nexa-SDK**, **Ollama**, **LM Studio**, **Llama.cpp**, and any llama.cpp based project.
|
| 24 |
|
| 25 |
-
Below, we outline multiple ways to run the model locally.
|
| 26 |
|
| 27 |
#### Option 1: Using Nexa SDK
|
| 28 |
|
|
|
|
| 8 |
- llama
|
| 9 |
- llama-3
|
| 10 |
- meta
|
| 11 |
+
- GGUF
|
| 12 |
---
|
| 13 |
|
| 14 |
# DeepSeek-R1-Distill-Llama-8B-NexaQuant
|
| 15 |
|
| 16 |
## Background + Overview
|
| 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 **66.40 tokens per second** and a peak RAM usage of just **1228 MB** in NexaQuant version—compared to only **25.28 tokens** per second and **3788 MB RAM** in the unquantized version—while **maintaining full precision model accuracy.**
|
| 21 |
|
|
|
|
|
|
|
| 22 |
## How to run locally
|
|
|
|
| 23 |
|
| 24 |
+
NexaQuant is compatible with **Nexa-SDK**, **Ollama**, **LM Studio**, **Llama.cpp**, and any llama.cpp based project. Below, we outline multiple ways to run the model locally.
|
| 25 |
|
| 26 |
#### Option 1: Using Nexa SDK
|
| 27 |
|