Repository navigation
ggml-hrx: Q2_0 weights (shared dequantizer, decode lanes, bit-exact GET_ROWS test) [rebased] - #99
Closed
bong-water-water-bong wants to merge 3 commits into
Closed
bong-water-water-bong wants to merge 3 commits into
bong-water-water-bong wants to merge 3 commits into
Conversation
Q2_0 (ggml type 42) is 64-value blocks of an f16 scale d and 16 bytes of 2-bit codes; value j is ((qs[j / 4] >> 2 (j % 4)) & 3) - 1 times d (dequantize_row_q2_0). Four aligned values are the four fields of one byte. The decoder takes the value index k like Q1_0 and lives in our motifs/dequant_1bit.loom; row bytes are 18 per 64 values and a 256-value tile is 72 bytes. Input sizes are multiples of 64. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A Q2_0 lane of 16 values is four code bytes under one scale, so Q2_0 joins the 16-value lanes of kquant_decode_f32: lane l reads block l / 4 (d at its first 16-bit word) and the two 16-bit words of qs bytes 4 (l % 4)..+4 (blocks are 18 bytes, 2-byte aligned). 72 bytes per 256 values. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… on HRX Eight rows of 256 values with f16 scales 1, 0.1, -1, the smallest subnormal, a negative subnormal, 0, 65504 and 2^-10, and every byte value in the codes. HRX's GET_ROWS must equal dequantize_row_q2_0 bit for bit, on the HRX device with no scheduler, through the get_rows kernel. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
|
Landed through #100: GitHub closed this PR when #98's merge deleted its base branch, and #100 (stacked on this branch) was retargeted to 1bit/hrx-vulkan-patched and merged, which brought these three commits (5625fa2, 4f3607c, 993a733) onto the tip. Verified on the tip: |
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.
Rebase of #76 onto the rebased NVFP4 branch (stacked, as before). Three patches, no conflicts, range-diff unchanged; HRX format code 42 still free at the tip.
Verified on strixhalo 2026-10-09 (power mode performance, hrx-system 98d05d94, built with the engine's HRX configuration, every GPU step under box.lock):
Supersedes #76.
🤖 Generated with Claude Code