Text Generation
GGUF
English
llama.cpp
qwen3
layer-surgery
small-language-model
optimized
thinking
skip-connections
interpolation
conversational
Instructions to use g023/qwen3-tiny-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use g023/qwen3-tiny-v2 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="g023/qwen3-tiny-v2", filename="Qwen3-g023-tiny-v2-Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use g023/qwen3-tiny-v2 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf g023/qwen3-tiny-v2:Q4_K_M # Run inference directly in the terminal: llama-cli -hf g023/qwen3-tiny-v2:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf g023/qwen3-tiny-v2:Q4_K_M # Run inference directly in the terminal: llama-cli -hf g023/qwen3-tiny-v2: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 g023/qwen3-tiny-v2:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf g023/qwen3-tiny-v2: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 g023/qwen3-tiny-v2:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf g023/qwen3-tiny-v2:Q4_K_M
Use Docker
docker model run hf.co/g023/qwen3-tiny-v2:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use g023/qwen3-tiny-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "g023/qwen3-tiny-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "g023/qwen3-tiny-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/g023/qwen3-tiny-v2:Q4_K_M
- Ollama
How to use g023/qwen3-tiny-v2 with Ollama:
ollama run hf.co/g023/qwen3-tiny-v2:Q4_K_M
- Unsloth Studio
How to use g023/qwen3-tiny-v2 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 g023/qwen3-tiny-v2 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 g023/qwen3-tiny-v2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for g023/qwen3-tiny-v2 to start chatting
- Pi
How to use g023/qwen3-tiny-v2 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf g023/qwen3-tiny-v2: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": "g023/qwen3-tiny-v2:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use g023/qwen3-tiny-v2 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf g023/qwen3-tiny-v2: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 g023/qwen3-tiny-v2:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use g023/qwen3-tiny-v2 with Docker Model Runner:
docker model run hf.co/g023/qwen3-tiny-v2:Q4_K_M
- Lemonade
How to use g023/qwen3-tiny-v2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull g023/qwen3-tiny-v2:Q4_K_M
Run and chat with the model
lemonade run user.qwen3-tiny-v2-Q4_K_M
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -29,7 +29,7 @@ Created through innovative layer surgery combining multi-swap, interpolation, an
|
|
| 29 |
|
| 30 |
| Quantization | Bits/Weight | Description | Download |
|
| 31 |
|:---:|:---:|:---|:---:|
|
| 32 |
-
| **Q8_0** | 8.00 | Highest quality, virtually lossless | [Qwen3-g023-tiny-v2-Q8_0.gguf](./Qwen3-g023-tiny-v2-Q8_0.gguf) |
|
| 33 |
| **Q6_K** | 6.57 | Excellent quality, good compression | [Qwen3-g023-tiny-v2-Q6_K.gguf](./Qwen3-g023-tiny-v2-Q6_K.gguf) |
|
| 34 |
| **Q4_K_M** | 4.85 | Good balance of quality and size | [Qwen3-g023-tiny-v2-Q4_K_M.gguf](./Qwen3-g023-tiny-v2-Q4_K_M.gguf) |
|
| 35 |
| **Q3_K_M** | 3.91 | High compression, moderate quality loss | [Qwen3-g023-tiny-v2-Q3_K_M.gguf](./Qwen3-g023-tiny-v2-Q3_K_M.gguf) |
|
|
@@ -93,12 +93,20 @@ Evaluated using a comprehensive test suite with 17 factual questions, 2 completi
|
|
| 93 |
```bash
|
| 94 |
# Download the GGUF and create from Modelfile
|
| 95 |
cat > Modelfile << 'EOF'
|
| 96 |
-
FROM ./Qwen3-g023-tiny-v2-
|
| 97 |
|
| 98 |
-
PARAMETER temperature
|
| 99 |
PARAMETER top_p 0.95
|
| 100 |
-
PARAMETER top_k
|
| 101 |
-
PARAMETER min_p 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
TEMPLATE """{{- if .System }}
|
| 104 |
<|im_start|>system
|
|
@@ -126,16 +134,16 @@ ollama run qwen3-tiny-v2
|
|
| 126 |
|
| 127 |
```bash
|
| 128 |
# Interactive chat
|
| 129 |
-
llama-cli -m Qwen3-g023-tiny-v2-
|
| 130 |
--chat-template chatml -cnv
|
| 131 |
|
| 132 |
# Thinking mode
|
| 133 |
-
llama-cli -m Qwen3-g023-tiny-v2-
|
| 134 |
-p "<|im_start|>user\nExplain quantum computing<|im_end|>\n<|im_start|>assistant\n<think>\n" \
|
| 135 |
-n 512
|
| 136 |
|
| 137 |
# Non-thinking mode
|
| 138 |
-
llama-cli -m Qwen3-g023-tiny-v2-
|
| 139 |
-p "<|im_start|>user\n/no_think What is 2+2?<|im_end|>\n<|im_start|>assistant\n" \
|
| 140 |
-n 128
|
| 141 |
```
|
|
@@ -145,7 +153,7 @@ llama-cli -m Qwen3-g023-tiny-v2-Q4_K_M.gguf \
|
|
| 145 |
```python
|
| 146 |
from llama_cpp import Llama
|
| 147 |
|
| 148 |
-
model = Llama("Qwen3-g023-tiny-v2-
|
| 149 |
response = model.create_chat_completion(
|
| 150 |
messages=[
|
| 151 |
{"role": "system", "content": "You are a helpful assistant."},
|
|
|
|
| 29 |
|
| 30 |
| Quantization | Bits/Weight | Description | Download |
|
| 31 |
|:---:|:---:|:---|:---:|
|
| 32 |
+
| **Q8_0** | 8.00 | Highest quality, virtually lossless (USE THIS ONE) | [Qwen3-g023-tiny-v2-Q8_0.gguf](./Qwen3-g023-tiny-v2-Q8_0.gguf) |
|
| 33 |
| **Q6_K** | 6.57 | Excellent quality, good compression | [Qwen3-g023-tiny-v2-Q6_K.gguf](./Qwen3-g023-tiny-v2-Q6_K.gguf) |
|
| 34 |
| **Q4_K_M** | 4.85 | Good balance of quality and size | [Qwen3-g023-tiny-v2-Q4_K_M.gguf](./Qwen3-g023-tiny-v2-Q4_K_M.gguf) |
|
| 35 |
| **Q3_K_M** | 3.91 | High compression, moderate quality loss | [Qwen3-g023-tiny-v2-Q3_K_M.gguf](./Qwen3-g023-tiny-v2-Q3_K_M.gguf) |
|
|
|
|
| 93 |
```bash
|
| 94 |
# Download the GGUF and create from Modelfile
|
| 95 |
cat > Modelfile << 'EOF'
|
| 96 |
+
FROM ./Qwen3-g023-tiny-v2-Q8_0.gguf
|
| 97 |
|
| 98 |
+
PARAMETER temperature 1.0
|
| 99 |
PARAMETER top_p 0.95
|
| 100 |
+
PARAMETER top_k 45
|
| 101 |
+
PARAMETER min_p 0.1
|
| 102 |
+
PARAMETER num_ctx 40000
|
| 103 |
+
PARAMETER mirostat 2
|
| 104 |
+
PARAMETER mirostat_tau 5.0
|
| 105 |
+
PARAMETER mirostat_eta 0.1
|
| 106 |
+
PARAMETER repeat_last_n 16384
|
| 107 |
+
PARAMETER repeat_penalty 1.1
|
| 108 |
+
PARAMETER presence_penalty 0.5
|
| 109 |
+
PARAMETER frequency_penalty 1.0
|
| 110 |
|
| 111 |
TEMPLATE """{{- if .System }}
|
| 112 |
<|im_start|>system
|
|
|
|
| 134 |
|
| 135 |
```bash
|
| 136 |
# Interactive chat
|
| 137 |
+
llama-cli -m Qwen3-g023-tiny-v2-Q8_0.gguf \
|
| 138 |
--chat-template chatml -cnv
|
| 139 |
|
| 140 |
# Thinking mode
|
| 141 |
+
llama-cli -m Qwen3-g023-tiny-v2-Q8_0.gguf \
|
| 142 |
-p "<|im_start|>user\nExplain quantum computing<|im_end|>\n<|im_start|>assistant\n<think>\n" \
|
| 143 |
-n 512
|
| 144 |
|
| 145 |
# Non-thinking mode
|
| 146 |
+
llama-cli -m Qwen3-g023-tiny-v2-Q8_0.gguf \
|
| 147 |
-p "<|im_start|>user\n/no_think What is 2+2?<|im_end|>\n<|im_start|>assistant\n" \
|
| 148 |
-n 128
|
| 149 |
```
|
|
|
|
| 153 |
```python
|
| 154 |
from llama_cpp import Llama
|
| 155 |
|
| 156 |
+
model = Llama("Qwen3-g023-tiny-v2-Q8_0.gguf", n_ctx=4096)
|
| 157 |
response = model.create_chat_completion(
|
| 158 |
messages=[
|
| 159 |
{"role": "system", "content": "You are a helpful assistant."},
|