Instructions to use SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF", filename="DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.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 SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-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 SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-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 SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-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 SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF with Ollama:
ollama run hf.co/SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF:Q4_K_M
- Unsloth Studio new
How to use SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-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 SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-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 SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF to start chatting
- Docker Model Runner
How to use SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF with Docker Model Runner:
docker model run hf.co/SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF:Q4_K_M
- Lemonade
How to use SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.DeepSeek-R1-Distill-Qwen-1.5B-GGUF-Q4_K_M
List all available models
lemonade list
DeepSeek-R1-Distill-Qwen-1.5B Quantized Models
This repository contains Q4_KM and Q5_KM quantized versions of the DeepSeek-R1-Distill-Qwen-1.5B model, optimized for efficient deployment while maintaining strong performance.
Discover our full range of quantized language models by visiting our SandLogic Lexicon HuggingFace. To learn more about our company and services, check out our website at SandLogic.
Model Description
These models are quantized versions of DeepSeek-R1-Distill-Qwen-1.5B, which is a highly efficient distilled 1.5B parameter model based on the Qwen architecture. This lightweight model demonstrates that reasoning patterns from larger models can be effectively distilled into much smaller architectures, making it ideal for resource-constrained deployments.
Key Features
- Ultra-lightweight model with only 1.5B parameters
- Fine-tuned using DeepSeek-R1 generated reasoning data
- Modified configurations and tokenizer optimized for performance
- Excellent balance of performance and resource efficiency
- Perfect for edge devices and limited compute environments
Available Quantized Versions
Q4_KM Version
- 4-bit quantization using the K-means method
- Approximately 1.12GB model size
- Exceptional efficiency for deployment
- Ideal for mobile and edge devices
Q5_KM Version
- 5-bit quantization using the K-means method
- Approximately 1.30GB model size
- Higher precision while maintaining small size
- Recommended for balanced performance requirements
Usage
pip install llama-cpp-python
Please refer to the llama-cpp-python documentation to install with GPU support.
Basic Text Completion
Here's an example demonstrating how to use the high-level API for basic text completion:
from llama_cpp import Llama
llm = Llama(
model_path="model/path/",
verbose=False,
# n_gpu_layers=-1, # Uncomment to use GPU acceleration
# n_ctx=2048, # Uncomment to increase the context window
)
# Example of a simple task
output = llm(
"Q: What are the benefits of using smaller language models? A: ",
max_tokens=128,
stop=["Q:", "\n\n"],
echo=False
)
print(output["choices"][0]["text"])
Model Configuration Changes
Please note that DeepSeek have made slight modifications to the original Qwen-1.5B configurations and tokenizer to optimize performance. When using these models, ensure you're using provided settings rather than the original Qwen-1.5B configurations.
Deployment Benefits
- Minimal RAM requirements (< 2GB)
- Fast inference speed
- Suitable for CPU-only environments
- Excellent for edge computing applications
- Efficient batching capabilities
License
This model inherits the license of the original DeepSeek-R1-Distill-Qwen-1.5B model. Please refer to the original model's license for usage terms and conditions.
Acknowledgments
We thank the DeepSeek AI team for open-sourcing their distilled models and demonstrating that even very small models can achieve impressive performance through effective distillation techniques. Special thanks also to the Qwen team for providing the base model architecture.
- Downloads last month
- 46
4-bit
5-bit
Model tree for SandLogicTechnologies/DeepSeek-R1-Distill-Qwen-1.5B-GGUF
Base model
deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B