singulared commited on
Commit
e07c8b3
Β·
verified Β·
1 Parent(s): 4cb99ff

Add model card: class-aware FP6/FP4 hybrid

Browse files
Files changed (1) hide show
  1. README.md +131 -0
README.md ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model:
4
+ - ornith-ai/Ornith-1.5-35B-A3B
5
+ base_model_relation: quantized
6
+ library_name: llama.cpp
7
+ pipeline_tag: text-generation
8
+ tags:
9
+ - gguf
10
+ - rocm
11
+ - rocmfpx
12
+ - rocmfp4
13
+ - rocmfp6
14
+ - amd
15
+ - strix-halo
16
+ - gfx1151
17
+ - mtp
18
+ - speculative-decoding
19
+ - moe
20
+ ---
21
+
22
+ # Ornith-1.5-35B-A3B β€” ROCmFPX hybrid (FP6 dense / FP4 experts)
23
+
24
+ A **class-aware** quantisation of [Ornith-1.5-35B-A3B](https://huggingface.co/ornith-ai/Ornith-1.5-35B-A3B)
25
+ for AMD Strix Halo (`gfx1151`), built because every stock ROCmFP4 preset leaves the obvious lever
26
+ unused on a 256-expert MoE: they apply **one type to every tensor**.
27
+
28
+ This build splits them:
29
+
30
+ | tensor class | count | type |
31
+ | --- | ---: | --- |
32
+ | routed experts | 123 | `Q4_0_ROCMFP4_FAST` (4.25 bpw) |
33
+ | attention | 104 | **`Q6_0_ROCMFPX`** (FP6) |
34
+ | shared expert | 123 | **`Q6_0_ROCMFPX`** (FP6) |
35
+ | token embedding / output | 2 | **`Q6_0_ROCMFPX`** (FP6) |
36
+ | MTP (`nextn`) head | 1 | `Q4_0_ROCMFP4_FAST` |
37
+
38
+ **4.41 bpw Β· 18.21 GiB.** Routed experts are sparse (8 of 256 fire per token) and tolerate 4-bit;
39
+ attention and the shared expert are on every token's critical path and get 6-bit.
40
+
41
+ ## The result: better than BF16 on perplexity
42
+
43
+ wikitext-2, 145 chunks @ ctx 2048, identical corpus, same engine β€” every build measured here, not
44
+ quoted from elsewhere:
45
+
46
+ | build | bpw | size | PPL | vs BF16 |
47
+ | --- | ---: | ---: | --- | ---: |
48
+ | **HYBRID (this)** | 4.41 | 18.21 GiB | **7.3991** Β±0.0506 | **βˆ’3.8%** |
49
+ | BF16 reference | 16.01 | 66.19 GiB | 7.6890 Β±0.0543 | β€” |
50
+ | `ROCMFP4_FAST` | 4.27 | 17.65 GiB | 7.7749 Β±0.0539 | +1.1% |
51
+ | `ROCMFP4_COHERENT` | 4.55 | 18.81 GiB | 7.8233 Β±0.0550 | +1.7% |
52
+ | `ROCMFP4_STRIX` | 4.31 | 17.81 GiB | 7.8307 Β±0.0547 | +1.8% |
53
+
54
+ **The hybrid scores below the unquantised model.** That is unusual but not unheard of β€” mild
55
+ quantisation can act as regularisation on a next-token metric β€” and it should be read as "the
56
+ quantisation error is not the limiting factor here", not as "quantising improves the model".
57
+
58
+ Note how tightly the three stock presets cluster (7.77–7.83, a 0.8% spread): preset choice barely
59
+ matters on this architecture, while **class-aware assignment moves 4.8%**.
60
+
61
+ ## Speed (Radeon 8060S, gfx1151, Vulkan, MTP `n4`, `-ub 2048`)
62
+
63
+ | build | 8.5K pp / tg | 34K pp / tg | 69K pp / tg |
64
+ | --- | --- | --- | --- |
65
+ | HYBRID | 990.9 / **63.0** | 815.9 / 55.6 | 488.4 / 45.2 |
66
+ | `FAST` | 993.9 / **87.7** | 813.3 / 67.3 | 478.9 / 56.3 |
67
+
68
+ **Prefill is identical** (within 0.5%) β€” it is compute-bound, so the FP6 weights cost nothing there.
69
+ Decode pays the whole price: βˆ’28%, because FP6 attention means more bytes per generated token.
70
+
71
+ β‡’ **Pick HYBRID for prefill-dominated work** (digesting repos/documents, long context, short
72
+ answers). **Pick `FAST` for generation-dominated work.** The recipe is a quality/decode dial, not a
73
+ free win.
74
+
75
+ Needle-in-a-haystack retrieval passes at **8.5K, 34.5K and 69.5K** on both.
76
+
77
+ ## Backend: use Vulkan
78
+
79
+ Same build, same model, same flags β€” only `-dev` changes:
80
+
81
+ | backend | 8.5K pp / tg | 34K pp / tg |
82
+ | --- | --- | --- |
83
+ | **Vulkan** | 993.9 / **87.7** | 813.3 / **67.3** |
84
+ | HIP Β· ROCm 7.2.4 | 968.1 / 72.7 | 675.3 / 64.1 |
85
+ | HIP Β· ROCm 10.1 nightly | **1087.0** / 58.2 | **834.6** / 55.1 |
86
+
87
+ The ROCm nightly is a **prefill-for-decode trade**: +12% prefill over HIP 7.2 but βˆ’20% decode, and
88
+ βˆ’34% decode against Vulkan. Vulkan wins overall and needs no container.
89
+
90
+ ## MTP head at FP4 is safe here
91
+
92
+ The `nextn.eh_proj` head is often kept at Q8_0 on the theory that it determines draft acceptance.
93
+ Measured on this model, dropping it to FP4 **did not hurt** β€” identical perplexity to 4 decimals
94
+ (7.7749 both) and slightly *better* acceptance:
95
+
96
+ | MTP head | acceptance |
97
+ | --- | --- |
98
+ | Q8_0 | 0.73–0.77 |
99
+ | **FP4** | **0.78–0.80** |
100
+
101
+ ## Usage
102
+
103
+ ```bash
104
+ llama-server -m Ornith-1.5-35B-HYBRID-fp6.gguf \
105
+ -ngl 99 -c 131072 -dev Vulkan0 --jinja -fa on -b 2048 -ub 2048 \
106
+ --spec-type draft-mtp --spec-draft-n-max 4 --spec-draft-p-min 0.6
107
+ ```
108
+
109
+ Requires a [ROCmFPX](https://github.com/charlie12345/ROCmFPX) build β€” mainline llama.cpp does not
110
+ know the `Q4_0_ROCMFP4_*` / `Q6_0_ROCMFPX` tensor types. The MTP head is native to Ornith 1.5
111
+ (`blk.40.nextn.*`, `nextn_predict_layers=1`); no graft is needed, unlike 1.0.
112
+
113
+ Reproduce the recipe with:
114
+
115
+ ```
116
+ attn_.*=q6_0_rocmfpx
117
+ ffn_(gate|up|down)_shexp=q6_0_rocmfpx
118
+ token_embd.weight=q6_0_rocmfpx
119
+ output.weight=q6_0_rocmfpx
120
+ nextn.*=q4_0_rocmfp4_fast
121
+ ```
122
+ `llama-quantize --tensor-type-file <rules> Ornith-1.5-35B-BF16.gguf out.gguf Q4_0_ROCMFP4_FAST`
123
+
124
+ ## Honest caveat
125
+
126
+ On wikitext perplexity, **Ornith 1.0 scores far better** β€” 6.19 (ROCmFP4-COHERENT) against 7.40
127
+ here, and the gap is present at BF16, so it is a property of the 1.5 weights and not of this
128
+ quantisation. 1.0 also decodes faster (86.7 t/s) with higher draft acceptance (0.88).
129
+
130
+ Ornith 1.5 is chosen here for its reported agentic/SWE gains, which wikitext does not measure. If
131
+ your workload is prose modelling rather than agentic coding, 1.0 may serve you better.