Text Generation
GGUF
llama-cpp
cpu-inference
qwen3
qwen
multilingual
conversational
tool-calling
thinking-mode
quantized
neo
Instructions to use gvij/qwen3-0.6b-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use gvij/qwen3-0.6b-gguf 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 gvij/qwen3-0.6b-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf gvij/qwen3-0.6b-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf gvij/qwen3-0.6b-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf gvij/qwen3-0.6b-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 gvij/qwen3-0.6b-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf gvij/qwen3-0.6b-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 gvij/qwen3-0.6b-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf gvij/qwen3-0.6b-gguf:Q4_K_M
Use Docker
docker model run hf.co/gvij/qwen3-0.6b-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use gvij/qwen3-0.6b-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gvij/qwen3-0.6b-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gvij/qwen3-0.6b-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gvij/qwen3-0.6b-gguf:Q4_K_M
- Ollama
How to use gvij/qwen3-0.6b-gguf with Ollama:
ollama run hf.co/gvij/qwen3-0.6b-gguf:Q4_K_M
- Unsloth Studio
How to use gvij/qwen3-0.6b-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 gvij/qwen3-0.6b-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 gvij/qwen3-0.6b-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for gvij/qwen3-0.6b-gguf to start chatting
- Pi
How to use gvij/qwen3-0.6b-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf gvij/qwen3-0.6b-gguf:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "gvij/qwen3-0.6b-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use gvij/qwen3-0.6b-gguf with Docker Model Runner:
docker model run hf.co/gvij/qwen3-0.6b-gguf:Q4_K_M
- Lemonade
How to use gvij/qwen3-0.6b-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull gvij/qwen3-0.6b-gguf:Q4_K_M
Run and chat with the model
lemonade run user.qwen3-0.6b-gguf-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use gvij/qwen3-0.6b-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf gvij/qwen3-0.6b-gguf: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 gvij/qwen3-0.6b-gguf:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use gvij/qwen3-0.6b-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf gvij/qwen3-0.6b-gguf:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "gvij/qwen3-0.6b-gguf:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload USAGE_GUIDE.md with huggingface_hub
Browse files- USAGE_GUIDE.md +181 -0
USAGE_GUIDE.md
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Qwen3-0.6B GGUF Models
|
| 2 |
+
|
| 3 |
+
This directory contains Qwen3-0.6B language model converted to GGUF format with multiple quantization levels optimized for CPU inference.
|
| 4 |
+
|
| 5 |
+
## Available Model Variants
|
| 6 |
+
|
| 7 |
+
| Variant | File Size | Use Case | Quality | Speed |
|
| 8 |
+
|---------|-----------|----------|---------|-------|
|
| 9 |
+
| **FP16** | 1.4 GB | Maximum accuracy, baseline reference | Highest | Slowest |
|
| 10 |
+
| **Q8_0** | 767 MB | High-quality CPU inference | Very High | Medium |
|
| 11 |
+
| **Q5_K_M** | 526 MB | Balanced quality and performance | High | Fast |
|
| 12 |
+
| **Q4_K_M** | 462 MB | Edge devices, fastest inference | Good | Fastest |
|
| 13 |
+
|
| 14 |
+
### Quantization Recommendations
|
| 15 |
+
|
| 16 |
+
- **Q4_K_M**: Best for edge devices, mobile, or when speed is critical. Minimal quality loss for most tasks.
|
| 17 |
+
- **Q5_K_M**: Recommended for production use. Excellent balance of quality and resource efficiency.
|
| 18 |
+
- **Q8_0**: Use when quality is paramount and you have sufficient memory. Close to FP16 performance.
|
| 19 |
+
- **FP16**: Reference model for validation and quality comparison. Use for benchmarking.
|
| 20 |
+
|
| 21 |
+
## Model Specifications
|
| 22 |
+
|
| 23 |
+
- **Architecture**: Qwen3 Causal Language Model
|
| 24 |
+
- **Parameters**: 0.6B (Non-embedding: 0.44B)
|
| 25 |
+
- **Layers**: 28
|
| 26 |
+
- **Attention**: Grouped Query Attention (GQA) - 16 heads for Q, 8 heads for KV
|
| 27 |
+
- **Context Length**: 32,768 tokens (40,960 in config)
|
| 28 |
+
- **Vocabulary Size**: 151,936 tokens
|
| 29 |
+
- **Special Features**:
|
| 30 |
+
- Thinking/non-thinking mode with `<think>...</think>` tags
|
| 31 |
+
- Multilingual support (100+ languages)
|
| 32 |
+
- Tool calling capabilities
|
| 33 |
+
- Enhanced reasoning
|
| 34 |
+
|
| 35 |
+
## Usage Instructions
|
| 36 |
+
|
| 37 |
+
### 1. Using llama.cpp CLI
|
| 38 |
+
|
| 39 |
+
```bash
|
| 40 |
+
# Basic text generation
|
| 41 |
+
/path/to/llama-cli -m qwen3-0.6b-q5_k_m.gguf -p "Hello, I am" -n 512 --temp 0.7
|
| 42 |
+
|
| 43 |
+
# Interactive chat mode
|
| 44 |
+
/path/to/llama-cli -m qwen3-0.6b-q5_k_m.gguf --interactive-first --reverse-prompt "User:"
|
| 45 |
+
|
| 46 |
+
# With GPU offloading (if available)
|
| 47 |
+
/path/to/llama-cli -m qwen3-0.6b-q5_k_m.gguf -ngl 28 -p "Explain quantum computing"
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
### 2. Using Ollama
|
| 51 |
+
|
| 52 |
+
Create a `Modelfile`:
|
| 53 |
+
|
| 54 |
+
```dockerfile
|
| 55 |
+
FROM ./qwen3-0.6b-q5_k_m.gguf
|
| 56 |
+
|
| 57 |
+
PARAMETER temperature 0.7
|
| 58 |
+
PARAMETER top_k 40
|
| 59 |
+
PARAMETER top_p 0.9
|
| 60 |
+
|
| 61 |
+
TEMPLATE """<|im_start|>system
|
| 62 |
+
You are a helpful AI assistant.<|im_end|>
|
| 63 |
+
<|im_start|>user
|
| 64 |
+
{{ .Prompt }}<|im_end|>
|
| 65 |
+
<|im_start|>assistant
|
| 66 |
+
"""
|
| 67 |
+
|
| 68 |
+
PARAMETER stop "<|im_start|>"
|
| 69 |
+
PARAMETER stop "<|im_end|>"
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
Import and run:
|
| 73 |
+
|
| 74 |
+
```bash
|
| 75 |
+
# Create the model
|
| 76 |
+
ollama create qwen3-0.6b -f Modelfile
|
| 77 |
+
|
| 78 |
+
# Run the model
|
| 79 |
+
ollama run qwen3-0.6b "What is machine learning?"
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
### 3. Using Python (llama-cpp-python)
|
| 83 |
+
|
| 84 |
+
```python
|
| 85 |
+
from llama_cpp import Llama
|
| 86 |
+
|
| 87 |
+
# Initialize model
|
| 88 |
+
llm = Llama(
|
| 89 |
+
model_path="qwen3-0.6b-q5_k_m.gguf",
|
| 90 |
+
n_ctx=2048,
|
| 91 |
+
n_threads=4,
|
| 92 |
+
n_gpu_layers=0,
|
| 93 |
+
verbose=False
|
| 94 |
+
)
|
| 95 |
+
|
| 96 |
+
# Generate text
|
| 97 |
+
output = llm(
|
| 98 |
+
"Write a short poem about AI:",
|
| 99 |
+
max_tokens=256,
|
| 100 |
+
temperature=0.7,
|
| 101 |
+
stop=["<|im_end|>"]
|
| 102 |
+
)
|
| 103 |
+
|
| 104 |
+
print(output['choices'][0]['text'])
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
## Performance Characteristics
|
| 108 |
+
|
| 109 |
+
### Inference Speed (approximate, CPU-dependent)
|
| 110 |
+
|
| 111 |
+
| Model | Tokens/sec (2-core) | Tokens/sec (8-core) | Memory Usage |
|
| 112 |
+
|-------|---------------------|---------------------|--------------|
|
| 113 |
+
| Q4_K_M | ~15-20 | ~40-60 | ~800 MB |
|
| 114 |
+
| Q5_K_M | ~12-18 | ~35-50 | ~900 MB |
|
| 115 |
+
| Q8_0 | ~10-15 | ~30-40 | ~1.2 GB |
|
| 116 |
+
| FP16 | ~8-12 | ~25-35 | ~1.8 GB |
|
| 117 |
+
|
| 118 |
+
*Note: Actual performance depends on CPU architecture, cache size, and prompt complexity.*
|
| 119 |
+
|
| 120 |
+
### Recommended CPU Configurations
|
| 121 |
+
|
| 122 |
+
- **Minimum**: 2 cores, 2GB RAM - Use Q4_K_M
|
| 123 |
+
- **Recommended**: 4 cores, 4GB RAM - Use Q5_K_M
|
| 124 |
+
- **Optimal**: 8+ cores, 8GB RAM - Use Q8_0 or FP16
|
| 125 |
+
|
| 126 |
+
## Context Length Management
|
| 127 |
+
|
| 128 |
+
The model supports up to 32,768 tokens but uses less memory with smaller contexts:
|
| 129 |
+
|
| 130 |
+
```bash
|
| 131 |
+
# Short context (faster, less memory)
|
| 132 |
+
llama-cli -m qwen3-0.6b-q5_k_m.gguf --ctx-size 2048
|
| 133 |
+
|
| 134 |
+
# Long context (slower, more memory)
|
| 135 |
+
llama-cli -m qwen3-0.6b-q5_k_m.gguf --ctx-size 32768
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
## Multilingual Support
|
| 139 |
+
|
| 140 |
+
Qwen3-0.6B supports 100+ languages including English, Chinese, Spanish, French, German, Japanese, Korean, and many more.
|
| 141 |
+
|
| 142 |
+
## Troubleshooting
|
| 143 |
+
|
| 144 |
+
### Model fails to load
|
| 145 |
+
- **Solution**: Use smaller quantization (Q4_K_M) or reduce context size
|
| 146 |
+
|
| 147 |
+
### Slow generation
|
| 148 |
+
- **Solution**: Increase thread count, use Q4_K_M, or reduce batch size
|
| 149 |
+
|
| 150 |
+
### Poor quality outputs
|
| 151 |
+
- **Solution**: Use higher quantization (Q8_0 or FP16), adjust temperature
|
| 152 |
+
|
| 153 |
+
## Conversion Details
|
| 154 |
+
|
| 155 |
+
- **Source**: Qwen/Qwen3-0.6B from Hugging Face Hub
|
| 156 |
+
- **Conversion Tool**: llama.cpp convert_hf_to_gguf.py
|
| 157 |
+
- **Base Format**: FP16 (converted from BF16)
|
| 158 |
+
- **Quantization Tool**: llama-quantize
|
| 159 |
+
- **Validated**: All models tested for loading and inference
|
| 160 |
+
|
| 161 |
+
## License
|
| 162 |
+
|
| 163 |
+
This model follows the Apache 2.0 license from the original Qwen3-0.6B model.
|
| 164 |
+
|
| 165 |
+
**Original Model**: https://huggingface.co/Qwen/Qwen3-0.6B
|
| 166 |
+
|
| 167 |
+
## Support & Resources
|
| 168 |
+
|
| 169 |
+
- **llama.cpp Documentation**: https://github.com/ggerganov/llama.cpp
|
| 170 |
+
- **Ollama Documentation**: https://ollama.ai/
|
| 171 |
+
- **Qwen3 Model Card**: https://huggingface.co/Qwen/Qwen3-0.6B
|
| 172 |
+
|
| 173 |
+
## Version Information
|
| 174 |
+
|
| 175 |
+
- **Conversion Date**: 2024-12-17
|
| 176 |
+
- **llama.cpp Version**: Build 7451 (669696e00)
|
| 177 |
+
- **GGUF Version**: V3 (latest)
|
| 178 |
+
|
| 179 |
+
---
|
| 180 |
+
|
| 181 |
+
**Note**: Performance metrics are approximate and will vary based on hardware. Test different quantization levels to find the optimal balance for your use case.
|