Shockem commited on
Commit
e68b1d4
·
verified ·
1 Parent(s): 87e6d5c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +131 -0
README.md CHANGED
@@ -1,3 +1,134 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ base_model:
4
+ - Qwen/Qwen3.8-27B
5
+ - Shockem/Qwen3.8-27b-Terse-Coder
6
+ tags:
7
+ - reasoning
8
+ - coding
9
+ - qwen3
10
+ - nvfp4
11
+ - modelopt
12
  ---
13
+
14
+ # Qwen3.8-27B Terse-Coder — NVFP4
15
+
16
+ NVFP4 (modelopt W4A16) quantization of
17
+ [Shockem/Qwen3.8-27b-Terse-Coder](https://huggingface.co/Shockem/Qwen3.8-27b-Terse-Coder),
18
+ a fine-tune of [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B)
19
+ with **~1/10 the chain-of-thought reasoning tokens on coding tasks and
20
+ correctness preserved**. This is the tested deployment artifact — every
21
+ number below was measured on this checkpoint.
22
+
23
+ > **Actively researched and improving.** Expect updated quants on this page
24
+ > as the study continues.
25
+
26
+ ## Results
27
+
28
+ Held-out 40 coding problems (20 HumanEval + 20 MBPP-sanitized, disjoint from
29
+ training), vLLM 0.28 on 2× RTX 5060 Ti 16 GB, MTP spec decode on, sampling
30
+ temp 0.6 / top_k 20 / top_p 0.95 / rep-penalty 1.05, pass@1 by automated
31
+ test execution:
32
+
33
+ | Model (all NVFP4) | pass@1 | Reasoning tokens / problem | Wall tok/s |
34
+ |---|---|---|---|
35
+ | nvidia/Qwen3.8-27B-NVFP4 (stock) | 72.5% | ~701 | 54.1 |
36
+ | **This model** | **67.5%** | **~38 (−95%)** | **54.5** |
37
+
38
+ Runs at stock-base wall speed with MTP acceptance 0.412 — the reasoning cut
39
+ is free end-to-end. **Independent benchmarks** (NVFP4 quant, vLLM 0.28, thinking on, house
40
+ sampling; reasoning = `completion_tokens_details.reasoning_tokens`):
41
+
42
+ | Benchmark | Score | Reasoning tokens (mean / median) |
43
+ |---|---|---|
44
+ | GSM8K (n=200) | **98.0%** | 84 / 72 |
45
+ | GPQA-Diamond (full 198) | **78.3%** | 1,485 / 969 |
46
+
47
+ A note on GPQA-Diamond: this is where a terseness fine-tune is *supposed*
48
+ to bleed — PhD-level science, far outside the coding training distribution,
49
+ where long deliberation is the whole game. Holding **78.3%** at ~1.5k mean
50
+ reasoning tokens (thinking models typically burn 10–20k here) means the
51
+ training cut the *deliberation budget*, not the *capability* — the model
52
+ still scales effort up on hard problems (median 969 → max 16k) instead of
53
+ answering blindly fast.
54
+
55
+ **Internal agentic harness** (30 tests across easy/medium/hard — instruction
56
+ following, coding, reasoning, compaction handoff, tool/JSON contracts —
57
+ ×10 runs each, this checkpoint served by vLLM): **easy 100% (40/40),
58
+ medium 100% (90/90), hard 100% (140/140)**, zero truncations, zero
59
+ reasoning fallbacks. Prior best on the same harness was 100/100/98.7.
60
+
61
+ ## Quantization recipe
62
+
63
+ This is a **v3-recipe** house quant, built to preserve the adapter effect
64
+ through 4-bit compression:
65
+
66
+ - modelopt 0.45 **W4A16** NVFP4, per-tensor streaming PTQ (the same
67
+ 400-tensor quantize set + ignore list as the published house Signal quants)
68
+ - **FP8 attention** (absmax — byte-matches NVIDIA's checkpoint at 97–99%)
69
+ - **Local-Hessian-weighted calibration on MLP + lm_head** (Hessian captured
70
+ from 2048 house-traffic chunks; Hessian-weighted MSE scale solve with
71
+ per-block e4m3 bracketing). This matters: an absmax-calibrated quant of the
72
+ same weights attenuates the terse-reasoning effect to roughly half
73
+ (−49.5% vs −92.4% cut measured). Geomean Hessian-weighted error ratio
74
+ 0.805 vs the absmax baseline on the stock base.
75
+ - **MTP draft stack included** (1 MTP layer, BF16, vocab-truncated
76
+ 40960-id draft head) so speculative decoding works out of the box.
77
+
78
+ ## Serving (vLLM, tested path)
79
+
80
+ ```bash
81
+ vllm serve Shockem/Qwen3.8-27b-Terse-Coder-NVFP4 \
82
+ --speculative-config '{"method":"mtp","num_speculative_tokens":3}' \
83
+ --kv-cache-dtype fp8
84
+ ```
85
+
86
+ **Turn MTP spec decode on** — outputs are target-verified (lossless) and
87
+ acceptance is 0.41. If you serve with spec decode, make sure the generation
88
+ config has **no `min_p`** — vLLM 0.28 rejects min_p under spec decode.
89
+
90
+ Recommended sampling (mirrors testing): temp 0.6, top_k 20, top_p 0.95,
91
+ repetition_penalty 1.05.
92
+
93
+ On 2×16 GB cards cap context at ~200k with a ~3.9 GiB FP8 KV pin;
94
+ single-card 24 GB+ rigs are unaffected.
95
+
96
+ ## Notes
97
+
98
+ - **Do not stack the
99
+ [Terse-Coder adapter](https://huggingface.co/Shockem/Qwen3.8-27b-Terse-Coder-LoRA)
100
+ on this checkpoint** — the preference is already merged in; double
101
+ application over-shortens reasoning (63% pass with `no_code` failures).
102
+ - The fp16 source weights are at
103
+ [Shockem/Qwen3.8-27b-Terse-Coder](https://huggingface.co/Shockem/Qwen3.8-27b-Terse-Coder)
104
+ if you want to quantize differently or merge further.
105
+ - Behavioral edit, not a knowledge edit — targeted at coding with thinking
106
+ enabled. Should work on other backends (SGLang, TabbyAPI/EXL3), but only
107
+ vLLM has been measured; validate before relying on them.
108
+
109
+ ## Attributions & licenses
110
+
111
+ This checkpoint is a quantized derivative of
112
+ [Shockem/Qwen3.8-27b-Terse-Coder](https://huggingface.co/Shockem/Qwen3.8-27b-Terse-Coder),
113
+ itself a derivative of [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B),
114
+ © Qwen Team, Alibaba Cloud, licensed **Apache 2.0**; this checkpoint remains
115
+ Apache 2.0 and the original license and copyright notices are retained.
116
+ Credits:
117
+
118
+ - **Qwen Team (Alibaba Cloud)** — the Qwen3.8-27B base model (Apache 2.0).
119
+ - **NVIDIA** — [TensorRT Model Optimizer](https://github.com/NVIDIA/TensorRT-Model-Optimizer)
120
+ 0.45 (Apache 2.0) drove this NVFP4 quantization; NVIDIA's published
121
+ [Qwen3.8-27B-NVFP4](https://huggingface.co/nvidia/Qwen3.8-27B-NVFP4)
122
+ checkpoint informed the Hessian-calibrated recipe.
123
+ - **[agentionai](https://huggingface.co/agentionai/Signal-3.8-27B)** and
124
+ **[p-e-w](https://github.com/p-e-w/heretic)** (Heretic) — Signal and a
125
+ heretic-ara variant were two of the three trace-generation policies in the
126
+ upstream adapter's preference data.
127
+ - **OpenAI** ([HumanEval](https://github.com/openai/human-eval), MIT) and
128
+ **Google** ([MBPP](https://github.com/google-research/google-research/tree/master/mbpp),
129
+ CC-BY 4.0) — prompt sources for training and held-out evaluation.
130
+ - **Hugging Face [TRL](https://github.com/huggingface/trl)** (Apache 2.0) —
131
+ DPO training; **[Datacurve](https://huggingface.co/datasets/datacurve/deep-swe)**
132
+ — DeepSWE, independent evaluation only.
133
+
134
+ None of these parties endorse this model; all remaining errors are ours.