piotr-sikora commited on
Commit
9c41c39
·
verified ·
1 Parent(s): 21f0067

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +137 -0
README.md CHANGED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Jackrong/Qwopus3.5-9B-v3
3
+ library_name: auto-round
4
+ tags:
5
+ - quantized
6
+ - auto-round
7
+ - int3
8
+ - w3a16
9
+ - qwen3.5
10
+ - coding
11
+ - tool-calling
12
+ - reasoning
13
+ license: apache-2.0
14
+ ---
15
+
16
+ # Qwopus3.5-9B-v3 — W3A16 AutoRound (3-bit)
17
+
18
+ 3-bit weight quantization of [Jackrong/Qwopus3.5-9B-v3](https://huggingface.co/Jackrong/Qwopus3.5-9B-v3) using [Intel AutoRound](https://github.com/intel/auto-round).
19
+
20
+ > **Note:** `lm_head` is **not quantized** (kept at bfloat16) due to a known vLLM incompatibility with quantized lm_head for the `qwen3_5` architecture. This adds ~1.9 GB but ensures correct loading in vLLM without patching.
21
+
22
+ ## Model details
23
+
24
+ | Property | Value |
25
+ |----------|-------|
26
+ | Base model | Jackrong/Qwopus3.5-9B-v3 |
27
+ | Architecture | Qwen3.5-9B hybrid (DeltaNet + GatedAttention) |
28
+ | Quantization | W3A16 — 3-bit weights, 16-bit activations |
29
+ | Group size | 128 |
30
+ | Symmetric | Yes |
31
+ | lm_head | **Not quantized** (bfloat16) |
32
+ | Format | auto_round (auto_gptq packing) |
33
+ | Tool calling | ✅ hermes parser (`<tool_call>` format) |
34
+ | Reasoning | ✅ Qwen3 thinking mode |
35
+
36
+ ## Quantization parameters
37
+
38
+ ```python
39
+ AutoRound(
40
+ scheme="W3A16",
41
+ sym=True,
42
+ group_size=128,
43
+ iters=100,
44
+ nsamples=22,
45
+ seqlen=128,
46
+ quant_lm_head=False, # lm_head stays bfloat16
47
+ quant_nontext_module=False, # vision tower stays bfloat16
48
+ layer_config={
49
+ "mtp": {"data_type": "bfloat16"},
50
+ "mtp.fc": {"data_type": "bfloat16"},
51
+ },
52
+ )
53
+ ```
54
+
55
+ Calibration: Python, PHP, SQL, Bash, Docker, API patterns — domain-specific for coding agents.
56
+
57
+ ## Memory requirements
58
+
59
+ | | |
60
+ |-|-|
61
+ | Model on disk | ~11 GB |
62
+ | VRAM (weights only) | ~6.5 GB |
63
+ | KV cache (12 GB GPU, util=0.93) | ~3.9 GB (~32k tokens) |
64
+
65
+ Fits on a single 12 GB VRAM GPU.
66
+
67
+ ## Run with vLLM
68
+
69
+ ```bash
70
+ vllm serve YOUR_USERNAME/Qwopus3.5-9B-W3A16-AutoRound \
71
+ --served-model-name qwopus-9b \
72
+ --port 8000 \
73
+ --host 0.0.0.0 \
74
+ --reasoning-parser qwen3 \
75
+ --language-model-only \
76
+ --max-model-len 65536 \
77
+ --gpu-memory-utilization 0.93 \
78
+ --max-num-seqs 16 \
79
+ --max-num-batched-tokens 8192 \
80
+ --enable-prefix-caching \
81
+ --dtype half \
82
+ --enable-auto-tool-choice \
83
+ --tool-call-parser hermes
84
+ ```
85
+
86
+ > Use `--tool-call-parser hermes` — the model outputs `<tool_call>` tags (Hermes format), not the `qwen3_coder` format.
87
+
88
+ ## Usage
89
+
90
+ ```python
91
+ from openai import OpenAI
92
+ import json
93
+
94
+ client = OpenAI(base_url="http://localhost:8000/v1", api_key="empty")
95
+
96
+ # Basic chat
97
+ response = client.chat.completions.create(
98
+ model="qwopus-9b",
99
+ messages=[{"role": "user", "content": "Write a Python async REST client."}],
100
+ max_tokens=1024,
101
+ )
102
+ print(response.choices[0].message.content)
103
+
104
+ # Tool calling
105
+ tools = [{
106
+ "type": "function",
107
+ "function": {
108
+ "name": "execute_code",
109
+ "description": "Execute Python code and return output",
110
+ "parameters": {
111
+ "type": "object",
112
+ "properties": {
113
+ "code": {"type": "string"},
114
+ "language": {"type": "string", "enum": ["python", "bash"]}
115
+ },
116
+ "required": ["code"]
117
+ }
118
+ }
119
+ }]
120
+
121
+ response = client.chat.completions.create(
122
+ model="qwopus-9b",
123
+ messages=[{"role": "user", "content": "Calculate fibonacci up to 10 terms."}],
124
+ tools=tools,
125
+ tool_choice="auto",
126
+ )
127
+
128
+ msg = response.choices[0].message
129
+ if msg.tool_calls:
130
+ print(f"Tool: {msg.tool_calls[0].function.name}")
131
+ print(f"Args: {msg.tool_calls[0].function.arguments}")
132
+ ```
133
+
134
+ ## Known limitations
135
+
136
+ - **lm_head not quantized** — vLLM's `Qwen3_5ForCausalLM` currently does not support quantized lm_head; kept at bfloat16
137
+ - Add `--enforce-eager` if you encounter CUDA graph issues