Skip to content

hexagon: Q8_0 configuration per model on the IQ-10, and Q4_0 with quantize_gguf --type-for - #84

Merged
khanhnd61-vr merged 11 commits into
VinRobotics:mainfrom
thanhdq1o2:hexagon-q8-recipes
Nov 20, 2026
Merged

khanhnd61-vr merged 11 commits into
VinRobotics:mainfrom
thanhdq1o2:hexagon-q8-recipes

Conversation

@thanhdq1o2

@thanhdq1o2 thanhdq1o2 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

What

  • docs/benchmark/qualcomm-iq10.md, "Q8_0 weights":
    • every Q8_0 configuration runs six checks against the CPU-only build at F32: fixed inputs and five served LIBERO observations (obs0 to obs4);
    • --keep-float lists searched to pass all six checks;
    • the configuration per model, with its quantize_gguf.py flags;
    • per model, a table of every configuration with its six checks and a table of every search with its outcome, in place of the single 62-row table;
    • levels named by what they put in Q8_0: base, base + vision, base + vision + DiT.
  • scripts/quantize_gguf.py --type-for REGEX=TYPE: pack the matching weights as TYPE instead of --type (repeatable, first match wins), so one file holds Q8_0, Q4_0 and float weights. Unit test in tests/py/test_converters.py.
  • docs/benchmark/qualcomm-iq10.md, new section "Q4_0 weights": every Q4_0 run, which models were tried and why, and the result.
  • docs/backend/hexagon.md: the Q8_0 summary and example follow the six-check results; --type-for and π0's Q4_0 example.
  • docs/MODELS.md: the quantize_gguf.py flags; docs/benchmark/README.md: a note pointing to the IQ-10 Q8_0 and Q4_0 results.
  • CHANGELOG.md.

Why

Lists picked on one observation fail on others: OpenVLA-OFT's obs0 list passes obs0 (2.5e-3) and fails obs1 (4.3e-3). The section now reports each configuration on six checks and picks, per model, the fastest one that passes all of them and has a recorded --keep-float list.

Results on the IQ-10 at 71cdb09, mean latency and System RAM under the TEMPLATE protocol. TurboVLA is measured at 511a0c3, main with the REPEAT fix of #85; without it, obs1 to obs3 crash the Hexagon server.

  • base: --type Q8_0, the 2-D weights outside the vision tower and the action head in Q8_0; base + vision adds the vision tower.
  • n kept F16: --keep-float keeps n of those weights in F16.
  • score: the largest max|Δ| / threshold (2.9e-3 on most checks) over the six checks; at 1 or less a configuration passes all of them.
  • All terms: Q8_0 weights.
Model Q8_0 result Q8_0 configuration Weights in Q8_0 F16 ms Q8_0 ms vs F16 F16 System RAM MiB Q8_0 System RAM MiB vs F16
π0 passes all checks base + vision, 8 kept F16 281 of 289 1123.3 937.7 -16.5% 5662 3326 -41.3%
π0.5 passes all checks base + vision, 181 kept F16 108 of 289 1107.8 1061.2 -4.2% 5980 5095 -14.8%
Octo-Small passes all checks base + vision, 4 kept F16 119 of 123 84.1 81.5 -3.1% 725 407 -43.9%
ACT passes all checks base 35 of 35 152.5 150.9 -1.0% 469 405 -13.6%
TurboVLA passes all checks base, 22 kept F16 111 of 133 192.2 188.9 -1.7% 1007 818 -18.8%
Evo-1 passes all checks base, 66 kept F16 34 of 100 1659.0 1657.4 -0.1% 1582 1494 -5.6%
OpenVLA-OFT fails: best score 1.03 - - 1125.2 - - 15266 - -
VLA-Adapter fails: best score 1.03 - - 669.2 - - 3569 - -
GR00T N1.5 fails: best score 1.23 - - 529.3 - - 3659 - -
GR00T N1.6 fails: best score 1.33 - - 682.6 - - 4929 - -
GR00T N1.7 fails: best score 1.40 - - 744.9 - - 5108 - -
SmolVLA fails: not searched, score 44 with all of base in Q8_0 - - 584.0 - - 1226 - -
VLA-JEPA fails: not searched, score 36 with all of base in Q8_0 - - 496.8 - - 4018 - -

Every configuration with its six checks, and every search, passing or not: Per model.

Q4_0 is not faster than Q8_0 on the NPU, so it can only cut memory, and a whole level in Q4_0 fails every check on π0, Octo-Small and ACT. Starting from a model's passing Q8_0 configuration instead, and moving groups of Q8_0 weights to Q4_0 only while all six checks still pass:

π0, measured together mean ms System RAM MiB checks passed
F16 1113.5 5568 6 / 6
Q8_0 configuration 938.7 3319 6 / 6
Q8_0 configuration, 123 of its 281 Q8_0 weights in Q4_0 941.0 2563 6 / 6

Octo-Small and TurboVLA have no group of Q8_0 weights that moves to Q4_0 and passes. Every Q4_0 run, passing or not: Q4_0 weights.

Verified

  • Builds clean under -Wall -Wextra (first-party code): no C++ change
  • ctest passes: no C++ change; python tests/py/test_converters.py passes
  • Numeric output unchanged: without --type-for, π0's and TurboVLA's Q8_0 files are byte-identical to the ones main writes

Archs and backends tested: SmolVLA, π0, π0.5, Evo-1, GR00T N1.5 / N1.6 / N1.7, VLA-JEPA, VLA-Adapter, OpenVLA-OFT, Octo-Small, TurboVLA and ACT on the IQ-10's Hexagon NPU, against the CPU-only build (-DGGML_HEXAGON=OFF, --weight-dtype f32 --flash-attn 0).

Check every Q8_0 configuration on fixed inputs and five served LIBERO
observations, search --keep-float lists that pass all six checks, and
list the configuration per model: π0, π0.5, Octo-Small, ACT, TurboVLA
and Evo-1 have one; GR00T N1.5 / N1.6 / N1.7, VLA-JEPA, SmolVLA,
VLA-Adapter and OpenVLA-OFT stay at F16. The Q8_0 results move to one
table per model.
With the REPEAT fix of VinRobotics#85, TurboVLA serves obs1 to obs3. The base list
with 12 weights kept F16, searched while those crashed, fails obs3
(6.5e-3). A search on all six checks keeps 22 weights F16 and passes all
six: 188.9 ms and 818 MiB against 192.2 ms and 1007 MiB at F16. Every
TurboVLA row is measured again at 511a0c3.
--type-for REGEX=TYPE, repeatable, packs the weights whose name matches
REGEX as TYPE instead of --type; the first match wins. One file can then
hold Q8_0, Q4_0 and float weights. Without --type-for the output is
byte-identical to before (checked on π0's and TurboVLA's Q8_0 files).
Weights the loader fuses into one matrix must get the same type, or the
model fails to load with a "does not match ... for fusing" error.
Q4_0 is not faster than Q8_0 on the NPU, so it is tried only where Q8_0
passes all checks. A whole level in Q4_0 fails every check on π0,
Octo-Small and ACT. Starting from the Q8_0 configuration and moving
groups of Q8_0 weights to Q4_0 while all six checks pass, π0 moves 123
of 281 (2563 MiB of System RAM against 3319 MiB, 941.0 ms against
938.7 ms); Octo-Small and TurboVLA move none.
@thanhdq1o2 thanhdq1o2 changed the title docs: pick a Q8_0 configuration per model on the IQ-10 hexagon: Q8_0 configuration per model on the IQ-10, and Q4_0 with quantize_gguf --type-for Nov 17, 2026
@khanhnd61-vr
khanhnd61-vr merged commit be05482 into VinRobotics:main Nov 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants