Instructions to use Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Orivael-SRD-Lab/qwen25-coder-0p5b-srd4", filename="qwen25_coder_0p5b_srd4_q4km.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 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 Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 # Run inference directly in the terminal: llama cli -hf Orivael-SRD-Lab/qwen25-coder-0p5b-srd4
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 # Run inference directly in the terminal: llama cli -hf Orivael-SRD-Lab/qwen25-coder-0p5b-srd4
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 Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 # Run inference directly in the terminal: ./llama-cli -hf Orivael-SRD-Lab/qwen25-coder-0p5b-srd4
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 Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Orivael-SRD-Lab/qwen25-coder-0p5b-srd4
Use Docker
docker model run hf.co/Orivael-SRD-Lab/qwen25-coder-0p5b-srd4
- LM Studio
- Jan
- vLLM
How to use Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Orivael-SRD-Lab/qwen25-coder-0p5b-srd4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Orivael-SRD-Lab/qwen25-coder-0p5b-srd4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Orivael-SRD-Lab/qwen25-coder-0p5b-srd4
- Ollama
How to use Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 with Ollama:
ollama run hf.co/Orivael-SRD-Lab/qwen25-coder-0p5b-srd4
- Unsloth Studio
How to use Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 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 Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 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 Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 to start chatting
- Pi
How to use Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Orivael-SRD-Lab/qwen25-coder-0p5b-srd4
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Orivael-SRD-Lab/qwen25-coder-0p5b-srd4" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Orivael-SRD-Lab/qwen25-coder-0p5b-srd4
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Orivael-SRD-Lab/qwen25-coder-0p5b-srd4
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 with Docker Model Runner:
docker model run hf.co/Orivael-SRD-Lab/qwen25-coder-0p5b-srd4
- Lemonade
How to use Orivael-SRD-Lab/qwen25-coder-0p5b-srd4 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Orivael-SRD-Lab/qwen25-coder-0p5b-srd4
Run and chat with the model
lemonade run user.qwen25-coder-0p5b-srd4-{{QUANT_TAG}}List all available models
lemonade list
Qwen2.5-Coder-0.5B ยท SRD4 Q4_K_M
Standard GGUF โ drop into any llama.cpp build, no custom kernels.
Base model: Qwen/Qwen2.5-Coder-0.5B-Instruct
Quantization: SRD4 โ Q4_K_M
File size: ~360 MB
What is SRD?
Standard Q4_K_M loses information systematically. Stochastic Residual Dithering (SRD)
computes an INT8 residual (D8) before quantization. At load time the corrected weights
are: W โ W4 + D8 ร S8. Inference speed is identical to vanilla Q4_K_M after load.
SRD targets the reasoning layers (40โ77% of depth, 9 layers in this model), where Q4 degradation disrupts multi-step code reasoning most.
Benchmark results
Evaluated on TruthfulQA MC1 (817 questions). WikiText-2 PPL is reported for completeness but note this is a code-specialized model โ WikiText-2 (English prose) is off-domain; code benchmarks are more representative.
| Mode | TruthfulQA MC1 โ | ฮ vs baseline | D8 overhead |
|---|---|---|---|
| Baseline Q4_K_M | 0.303 | โ | 0 MB |
| Selective SRD (reasoning layers) | 0.307 | +0.4% | 35 MB |
| Full SRD (all layers) | 0.305 | +0.2% | 391 MB |
Selective matches or edges full SRD at 9% of the RAM cost.
Usage
llama-cli -m qwen25-coder-0p5b-srd4-q4km.gguf \
-p "def fibonacci(n):" \
--n-predict 80
How it was built
from research.quant.quantize_model import quantize_hf_model_inplace
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-Coder-0.5B-Instruct", torch_dtype=torch.float16
)
quantize_hf_model_inplace(model, alpha=1.0, group_size=64)
# โ converted to GGUF Q4_K_M via llama.cpp convert_hf_to_gguf.py
Pipeline: orivael-dev/axiom โ branch claude/srd-prototype-benchmark-JRtv1
Contribute results
Run llama-perplexity on a code corpus or HumanEval and open a Discussion with:
- Hardware (CPU / CUDA / Metal / ROCm)
- Perplexity or pass@k score
- Tokens/sec
- Downloads last month
- 116
We're not able to determine the quantization variants.
Model tree for Orivael-SRD-Lab/qwen25-coder-0p5b-srd4
Base model
Qwen/Qwen2.5-0.5B