cudabenchmarktest commited on
Commit
a023ed8
Β·
verified Β·
1 Parent(s): d8da57a

Expand card: 22-scenario hard tool stress test + image handling section + honest HX8 knowledge regression + hf download/ollama create run instructions

Browse files
Files changed (1) hide show
  1. README.md +103 -0
README.md CHANGED
@@ -65,6 +65,109 @@ GSM8K samples are drawn from `openai/gsm8k` (test split) with a fixed seed
65
  (`1337`). The **same** 100 questions are used for base
66
  and tuned so the delta is directly comparable.
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  ## How this adapter was trained
69
 
70
  ```bash
 
65
  (`1337`). The **same** 100 questions are used for base
66
  and tuned so the delta is directly comparable.
67
 
68
+
69
+ ### Stress test β€” 22 hard tool-calling scenarios (deterministic)
70
+
71
+ Decoding: `temperature=0`, `top_p=1.0`, `top_k=1`, `seed=42`.
72
+ Endpoint: http://localhost:11435/v1/chat/completions (Open Agents gateway).
73
+
74
+ Scores: **21 / 22** base, **20 / 22** tuned.
75
+
76
+ | # | Test | Base | Tuned |
77
+ |---|---|:---:|:---:|
78
+ | H1 | many-tool distraction (15 tools, 1 right answer) | βœ… | βœ… |
79
+ | HX1 | HARD: four-op precedence (12Β² βˆ’ (5+3)) / 4 | βœ… | βœ… |
80
+ | H2 | nested object argument (recipient={name,address}) | βœ… | βœ… |
81
+ | HX2 | HARD: Cβ†’F conversion inside enum-constrained call | βœ… | βœ… |
82
+ | H3 | array argument (list of user_ids) | βœ… | βœ… |
83
+ | HX3 | HARD: Gauss formula vs brute force (sum 1..100) | βœ… | βœ… |
84
+ | H4 | enum normalization (user says 'cooling', enum is 'cool') | βœ… | βœ… |
85
+ | HX4 | HARD: nested-object + array (multi-attendee meeting) | βœ… | βœ… |
86
+ | H5 | numeric extraction from words ('fifty-two') | βœ… | βœ… |
87
+ | HX5 | HARD: world knowledge + calculator (c βˆ’ v_sound) | βœ… | βœ… |
88
+ | H6 | negative + expression (calculator preserves parens) | βœ… | βœ… |
89
+ | HX6 | HARD: 5-element array from varied prose | βœ… | βœ… |
90
+ | H7 | chained sequential (convert + compute) | βœ… | βœ… |
91
+ | HX7 | HARD: schema min/max refusal or clamp (roll 5000 d20) | ❌ | ❌ |
92
+ | H8 | same tool, THREE different args (air_quality x 3) | βœ… | βœ… |
93
+ | HX8 | HARD: domain knowledge β†’ 7 parallel calls (G7 capitals) | βœ… | ❌ |
94
+ | H9 | tool non-existence (no tool fits β€” should NOT hallucinate) | βœ… | βœ… |
95
+ | HX9 | HARD: compound convert + chained compute (tax on EUR) | βœ… | βœ… |
96
+ | H10 | disambiguation (wiki vs news β€” user wants breaking news) | βœ… | βœ… |
97
+ | HX10 | HARD: deep-nested email with enum priority + body synthesis | βœ… | βœ… |
98
+ | H11 | enum strictness (user asks 'freezing' β€” not in enum) | βœ… | βœ… |
99
+ | H12 | reasoning-before-call (multi-step arithmetic β†’ single call) | βœ… | βœ… |
100
+
101
+ **Honest notes on the failures:**
102
+
103
+ - **HX7**: Both models ignored JSON Schema `maximum: 1000` on count. Shared weakness.
104
+ - **HX8**: Base correctly listed Washington as a G7 capital. Tuned substituted Brussels (wrong) β€” knowledge regression after distillation on 500 samples.
105
+ - **HX3**: Initial test had overly narrow regex; accepts any algebraic form of Gauss formula now.
106
+
107
+
108
+ ## Image handling β€” NOT SUPPORTED
109
+
110
+ This distilled model does **not** support image inputs. Attempting to pass
111
+ `images` to Ollama's `/api/chat` returns **HTTP 500**:
112
+
113
+ ```
114
+ Failed to create new sequence: failed to process inputs: this model is missing data required for image input
115
+ ```
116
+
117
+ ### Why
118
+
119
+ Distilled GGUF was converted from Qwen3_5ForCausalLM (text subnet only). Vision encoder weights are not present in the merged safetensors, so llama.cpp's convert_hf_to_gguf produced a text-only GGUF. Ollama correctly detects the missing image tensors and returns HTTP 500 with a clean error message.
120
+
121
+ ### Verified with a small probe (3 rendered test images)
122
+
123
+ | Model | Image-probe score | HTTP statuses |
124
+ |---|:---:|:---:|
125
+ | `qwen3.5:9b` (base) | 0 / 3 | 200 (serves images) |
126
+ | `qwen3.5-9b-qwen3.6-distilled:q4km` (tuned) | 0 / 3 | [500, 500, 500] (no vision) |
127
+
128
+ The base model *serves* image requests (Ollama reports `vision` in its
129
+ Capabilities) but its text-in-image OCR on the three probes was weak
130
+ (e.g. "HELLO" β†’ "HELO", "42" β†’ "44", "BANANA" β†’ "barna"). Do not assume
131
+ the base model is a reliable OCR tool just because image requests return
132
+ HTTP 200.
133
+
134
+ ### Remedy
135
+
136
+ For image+text workloads, use the base `qwen3.5:9b` (which has the vision tower). A multimodal-preserving distillation would require loading the full `Qwen3_5ForConditionalGeneration` checkpoint and keeping the vision layers frozen during LoRA training β€” out of scope for this text-only run.
137
+
138
+
139
+ ## Running this model with Ollama
140
+
141
+ **Recommended path β€” download the Modelfile and build locally.**
142
+ Direct `ollama pull hf.co/...` will auto-derive a Modelfile from GGUF
143
+ metadata and may lose tool support. Using the Modelfile in this repo is
144
+ the reliable way to preserve `tools` + `thinking` capabilities:
145
+
146
+ ```bash
147
+ # Install hf CLI if needed (part of huggingface_hub): pip install -U huggingface_hub
148
+ hf download cudabenchmarktest/qwen3.5-9b-qwen3.6-reasoning-distilled-GGUF Modelfile qwen3.5-9b-qwen3.6-reasoning-distilled.q4km.gguf --local-dir ./qwen-distilled
149
+
150
+ cd qwen-distilled
151
+ ollama create qwen3.5-9b-qwen3.6-distilled:q4km -f Modelfile
152
+ ollama show qwen3.5-9b-qwen3.6-distilled:q4km
153
+ # Capabilities should include: tools, thinking
154
+
155
+ # Tool-calling smoke test
156
+ curl -s http://localhost:11434/api/chat -d '{
157
+ "model": "qwen3.5-9b-qwen3.6-distilled:q4km",
158
+ "messages": [{"role": "user", "content": "What is the weather in Paris?"}],
159
+ "tools": [{"type":"function","function":{"name":"get_weather","description":"Get current weather","parameters":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}}],
160
+ "stream": false
161
+ }' | jq .message.tool_calls
162
+ ```
163
+
164
+ To use a different quant, download the matching `.gguf` and edit the
165
+ Modelfile's `FROM` line (or use one of the comment-suggested filenames):
166
+
167
+ - `qwen3.5-9b-qwen3.6-reasoning-distilled.q4km.gguf` (~5.6 GB) β€” recommended
168
+ - `qwen3.5-9b-qwen3.6-reasoning-distilled.q80.gguf` (~9.5 GB) β€” higher fidelity
169
+ - `qwen3.5-9b-qwen3.6-reasoning-distilled.f16.gguf` (~17.9 GB) β€” full precision
170
+
171
  ## How this adapter was trained
172
 
173
  ```bash