Instructions to use Bopalv/Qwen3-0.6B-quantized with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Bopalv/Qwen3-0.6B-quantized with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Bopalv/Qwen3-0.6B-quantized", filename="Qwen3-0.6B-GGUF/Qwen3-0.6B.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 Bopalv/Qwen3-0.6B-quantized with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Bopalv/Qwen3-0.6B-quantized:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Bopalv/Qwen3-0.6B-quantized:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Bopalv/Qwen3-0.6B-quantized:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Bopalv/Qwen3-0.6B-quantized: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 Bopalv/Qwen3-0.6B-quantized:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Bopalv/Qwen3-0.6B-quantized: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 Bopalv/Qwen3-0.6B-quantized:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Bopalv/Qwen3-0.6B-quantized:Q4_K_M
Use Docker
docker model run hf.co/Bopalv/Qwen3-0.6B-quantized:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Bopalv/Qwen3-0.6B-quantized with Ollama:
ollama run hf.co/Bopalv/Qwen3-0.6B-quantized:Q4_K_M
- Unsloth Studio
How to use Bopalv/Qwen3-0.6B-quantized 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 Bopalv/Qwen3-0.6B-quantized 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 Bopalv/Qwen3-0.6B-quantized to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Bopalv/Qwen3-0.6B-quantized to start chatting
- Pi
How to use Bopalv/Qwen3-0.6B-quantized with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Bopalv/Qwen3-0.6B-quantized:Q4_K_M
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": "Bopalv/Qwen3-0.6B-quantized:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Bopalv/Qwen3-0.6B-quantized with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Bopalv/Qwen3-0.6B-quantized:Q4_K_M
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 Bopalv/Qwen3-0.6B-quantized:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use Bopalv/Qwen3-0.6B-quantized with Docker Model Runner:
docker model run hf.co/Bopalv/Qwen3-0.6B-quantized:Q4_K_M
- Lemonade
How to use Bopalv/Qwen3-0.6B-quantized with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Bopalv/Qwen3-0.6B-quantized:Q4_K_M
Run and chat with the model
lemonade run user.Qwen3-0.6B-quantized-Q4_K_M
List all available models
lemonade list
Upload Qwen3-0.6B-Comparison.md with huggingface_hub
Browse files- Qwen3-0.6B-Comparison.md +168 -0
Qwen3-0.6B-Comparison.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Qwen3-0.6B Quantized Models Comparison
|
| 2 |
+
|
| 3 |
+
## Summary
|
| 4 |
+
|
| 5 |
+
Three quantized versions of Qwen3-0.6B were created on March 21, 2026 and uploaded to Hugging Face at:
|
| 6 |
+
**https://huggingface.co/Bopalv/Qwen3-0.6B-quantized**
|
| 7 |
+
|
| 8 |
+
## Models Overview
|
| 9 |
+
|
| 10 |
+
| Model | Format | Quantization | File Size | Status |
|
| 11 |
+
|-------|--------|--------------|-----------|--------|
|
| 12 |
+
| GGUF Q4_K_M | GGUF | 4-bit K-quant | 462 MB | β
Complete |
|
| 13 |
+
| GPTQ-Int4 | Safetensors | 4-bit GPTQ | 517 MB | β
Complete |
|
| 14 |
+
| GPTQ-Int8 | Safetensors | 8-bit GPTQ | 727 MB | β
Complete |
|
| 15 |
+
|
| 16 |
+
## Technical Specifications
|
| 17 |
+
|
| 18 |
+
### Common Properties
|
| 19 |
+
- **Base Model**: Qwen3-0.6B
|
| 20 |
+
- **Parameters**: 0.6B (490M)
|
| 21 |
+
- **Architecture**: Qwen3ForCausalLM
|
| 22 |
+
- **Hidden Size**: 1024
|
| 23 |
+
- **Layers**: 28
|
| 24 |
+
- **Attention Heads**: 16
|
| 25 |
+
- **KV Heads**: 8
|
| 26 |
+
- **Max Context**: 40,960 tokens
|
| 27 |
+
- **Vocab Size**: 151,936
|
| 28 |
+
|
| 29 |
+
### Quantization Details
|
| 30 |
+
|
| 31 |
+
| Model | Bits | Group Size | Symmetric | Quantizer | Pack Dtype |
|
| 32 |
+
|-------|------|------------|-----------|-----------|------------|
|
| 33 |
+
| GGUF Q4_K_M | 4 | N/A | Yes | llama.cpp | N/A |
|
| 34 |
+
| GPTQ-Int4 | 4 | 128 | Yes | gptqmodel 4.0.0 | int32 |
|
| 35 |
+
| GPTQ-Int8 | 8 | 128 | Yes | gptqmodel 2.2.0 | int32 |
|
| 36 |
+
|
| 37 |
+
## File Size Comparison
|
| 38 |
+
|
| 39 |
+
```
|
| 40 |
+
GGUF Q4_K_M ββββββββββββββββββββ 462 MB (Smallest)
|
| 41 |
+
GPTQ-Int4 ββββββββββββββββββββββββ 517 MB (+12%)
|
| 42 |
+
GPTQ-Int8 ββββββββββββββββββββββββββββββββββββ 727 MB (+57%)
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
## Theoretical Performance Analysis
|
| 46 |
+
|
| 47 |
+
### Memory Usage
|
| 48 |
+
- **GGUF Q4_K_M**: ~462 MB loaded
|
| 49 |
+
- **GPTQ-Int4**: ~517 MB loaded + overhead
|
| 50 |
+
- **GPTQ-Int8**: ~727 MB loaded + overhead
|
| 51 |
+
|
| 52 |
+
### Expected Quality (Lower bits = More compression, Potentially lower quality)
|
| 53 |
+
1. **GPTQ-Int8**: Best quality (8-bit precision)
|
| 54 |
+
2. **GPTQ-Int4**: Good quality (4-bit with group quantization)
|
| 55 |
+
3. **GGUF Q4_K_M**: Good quality (4-bit K-quant, optimized for llama.cpp)
|
| 56 |
+
|
| 57 |
+
### Expected Speed (CPU-based)
|
| 58 |
+
1. **GGUF Q4_K_M**: Fastest (optimized for llama.cpp, smallest size)
|
| 59 |
+
2. **GPTQ-Int4**: Medium (requires dequantization overhead)
|
| 60 |
+
3. **GPTQ-Int8**: Slowest (largest size, more computation)
|
| 61 |
+
|
| 62 |
+
## Compatibility
|
| 63 |
+
|
| 64 |
+
### GGUF Q4_K_M
|
| 65 |
+
- β
llama.cpp
|
| 66 |
+
- β
prima.cpp (if Qwen3 architecture is supported)
|
| 67 |
+
- β
Ollama
|
| 68 |
+
- β
LM Studio
|
| 69 |
+
- β
Text Generation WebUI
|
| 70 |
+
|
| 71 |
+
### GPTQ-Int4 & GPTQ-Int8
|
| 72 |
+
- β
HuggingFace Transformers
|
| 73 |
+
- β
AutoGPTQ
|
| 74 |
+
- β
vLLM
|
| 75 |
+
- β
Text Generation WebUI
|
| 76 |
+
- β οΈ llama.cpp (requires conversion)
|
| 77 |
+
|
| 78 |
+
## Usage Recommendations
|
| 79 |
+
|
| 80 |
+
### For CPU-only systems
|
| 81 |
+
**Recommended: GGUF Q4_K_M**
|
| 82 |
+
- Smallest file size
|
| 83 |
+
- Optimized for CPU inference
|
| 84 |
+
- Fastest loading time
|
| 85 |
+
- Compatible with llama.cpp ecosystem
|
| 86 |
+
|
| 87 |
+
### For GPU systems
|
| 88 |
+
**Recommended: GPTQ-Int4**
|
| 89 |
+
- Good balance of quality and size
|
| 90 |
+
- Works with AutoGPTQ and Transformers
|
| 91 |
+
- Faster than GPTQ-Int8
|
| 92 |
+
- Better quality than GGUF on GPU
|
| 93 |
+
|
| 94 |
+
### For Maximum Quality
|
| 95 |
+
**Recommended: GPTQ-Int8**
|
| 96 |
+
- Highest precision (8-bit)
|
| 97 |
+
- Best output quality
|
| 98 |
+
- Requires more memory
|
| 99 |
+
- Slower inference
|
| 100 |
+
|
| 101 |
+
## Benchmarking Notes
|
| 102 |
+
|
| 103 |
+
The model-efficiency tool from `bopalvelut-prog/model-efficiency` requires:
|
| 104 |
+
1. Ollama running on port 11434, OR
|
| 105 |
+
2. An OpenAI-compatible API server
|
| 106 |
+
|
| 107 |
+
To benchmark these models:
|
| 108 |
+
|
| 109 |
+
### Option 1: Using Ollama
|
| 110 |
+
```bash
|
| 111 |
+
# Install Ollama
|
| 112 |
+
curl -fsSL https://ollama.com/install.sh | sh
|
| 113 |
+
|
| 114 |
+
# Import GGUF model
|
| 115 |
+
ollama create qwen3-0.6b-gguf -f Modelfile
|
| 116 |
+
|
| 117 |
+
# Run benchmark
|
| 118 |
+
cd model-efficiency
|
| 119 |
+
python model_efficiency_comparator.py -p "Your test prompt"
|
| 120 |
+
```
|
| 121 |
+
|
| 122 |
+
### Option 2: Using prima.cpp
|
| 123 |
+
```bash
|
| 124 |
+
# Start server with GGUF model
|
| 125 |
+
/home/ma/prima.cpp/llama-server \
|
| 126 |
+
-m /home/ma/models/Qwen3-0.6B-GGUF/Qwen3-0.6B.Q4_K_M.gguf \
|
| 127 |
+
--port 8080
|
| 128 |
+
|
| 129 |
+
# Test with curl
|
| 130 |
+
curl http://localhost:8080/v1/chat/completions \
|
| 131 |
+
-H "Content-Type: application/json" \
|
| 132 |
+
-d '{"messages":[{"role":"user","content":"Hello"}],"max_tokens":50}'
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
### Option 3: Using Transformers (for GPTQ models)
|
| 136 |
+
```python
|
| 137 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 138 |
+
import time
|
| 139 |
+
|
| 140 |
+
model_path = "/home/ma/models/Qwen3-0.6B-GPTQ-Int4"
|
| 141 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 142 |
+
model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto")
|
| 143 |
+
|
| 144 |
+
inputs = tokenizer("Hello", return_tensors="pt")
|
| 145 |
+
start = time.time()
|
| 146 |
+
outputs = model.generate(**inputs, max_new_tokens=100)
|
| 147 |
+
end = time.time()
|
| 148 |
+
|
| 149 |
+
print(f"Time: {end-start:.2f}s")
|
| 150 |
+
```
|
| 151 |
+
|
| 152 |
+
## Storage Requirements
|
| 153 |
+
|
| 154 |
+
| Model | File Size | Disk Space Needed | RAM Needed (Est.) |
|
| 155 |
+
|-------|-----------|-------------------|-------------------|
|
| 156 |
+
| GGUF Q4_K_M | 462 MB | 462 MB | ~600 MB |
|
| 157 |
+
| GPTQ-Int4 | 517 MB | 517 MB | ~700 MB |
|
| 158 |
+
| GPTQ-Int8 | 727 MB | 727 MB | ~900 MB |
|
| 159 |
+
| **All Models** | **1.7 GB** | **1.7 GB** | **~2.2 GB** |
|
| 160 |
+
|
| 161 |
+
## Conclusion
|
| 162 |
+
|
| 163 |
+
- **Best for CPU/Embedded**: GGUF Q4_K_M (smallest, fastest)
|
| 164 |
+
- **Best for GPU**: GPTQ-Int4 (balanced)
|
| 165 |
+
- **Best Quality**: GPTQ-Int8 (highest precision)
|
| 166 |
+
|
| 167 |
+
All models are available at:
|
| 168 |
+
**https://huggingface.co/Bopalv/Qwen3-0.6B-quantized**
|