Repository navigation
hexagon: Q8_0 configuration per model on the IQ-10, and Q4_0 with quantize_gguf --type-for - #84
Merged
Merged
Conversation
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.
…inRobotics#85 rather than its branch commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
docs/benchmark/qualcomm-iq10.md, "Q8_0 weights":--keep-floatlists searched to pass all six checks;quantize_gguf.pyflags;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 intests/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-forand π0's Q4_0 example.docs/MODELS.md: thequantize_gguf.pyflags;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-floatlist.Results on the IQ-10 at
71cdb09, mean latency and System RAM under the TEMPLATE protocol. TurboVLA is measured at511a0c3, main with theREPEATfix of #85; without it, obs1 to obs3 crash the Hexagon server.--type Q8_0, the 2-D weights outside the vision tower and the action head in Q8_0; base + vision adds the vision tower.--keep-floatkeeps n of those weights in F16.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:
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
-Wall -Wextra(first-party code): no C++ changectestpasses: no C++ change;python tests/py/test_converters.pypasses--type-for, π0's and TurboVLA's Q8_0 files are byte-identical to the onesmainwritesArchs 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).