Conversation
…1 on the GPU), perplexity-neutral Per-row int8 for the dense trunk cost +1.9 % perplexity on wikitext-2 (1.880 against 1.845 BF16; 1.877 on the CPU reference path, so 0.2 of it is the GPU's summation order). Probing the rows showed the error spread over the trunk, not one matrix class. One scale per 64 weights along the input brings it to 1.852 (+0.4 %), the same eight chunk NLLs on the GPU and on the CPU reference path, greedy text identical to BF16 over 100 tokens. Backend: fmt 1 uploaded with a group size takes the grouped int4 branch of quant_matmul (scales [O][ceil(I/gs)], group subtotal times scale); the per-element division becomes a shift when gs is a power of two (75 -> 69 ms resident-mm per token on the 553 trunk matrices; per-row was 63). The upload records gs for fmt 1 as it does for fmt 4. Tier: qt_dense_init(q, sc, I, O, device, gs); gs > 0 uploads through upload_g and the budget counts the scale table; qt_dense_matmul passes the handle's gs, because the backend's cached-tensor check refuses a grouped tensor asked with gs 0 -- the first hardware run failed all 553 matrices exactly that way, and the fake backend now mirrors the check so a test catches it. Engine: Q38_TRUNK_GS (default 64, 0 = per row) drives the quantizer, the CPU reference path, the selftest, the offered bytes and the placement sum. Planner: the trunk estimate carries the scale table (+1/16). Tests: grouped case in test_qwen36_tier_dense (result row by row against the reference loop, and the gs-0-refusal); the engine test runs the trunk grouped on the fake tier; planner expectations follow. Measured on the RTX 3070, cap 224, the 315+100-token prompt: trunk 4.21 GiB (3.96 per row), 312 resident experts (352), VRAM hits 20.6 % (22.3 %), decode 1.88 tok/s (1.91); selftest 553/553 at 1.5e-7. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X2HPETYXNwT4RmQkdMMyPS
kreuzzelg
force-pushed
the
r7c-trunk-gs
branch
from
September 15, 2026 17:40
ae82710 to
6db00fd
Compare
Edo771977
added a commit
to Edo771977/colibri
that referenced
this pull request
Sep 16, 2026
Integrazione dev (riuso KV Qwen3.6 JustVugg#1553) + JustVugg#1552 Qwen3.8 + JustVugg#1557 + JustVugg#1549
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.
Follow-up to #1424 (merged): one commit on
dev. Also takes the doc note from the #1424 review (greedy-identical is a measurement, not a guarantee; the two reference knobs).Why
#1424 quantizes the dense trunk to int8 per row. On wikitext-2 (8 x 512, 2048 scored tokens) that costs +1.9 %
perplexity (1.880 against 1.845 BF16). Probing the rows showed the error is spread over the trunk, not one
matrix class: the expert tier is neutral, lm_head contributes nothing, keeping the routers in BF16 recovers 0.3
points, and the GPU's summation order is 0.2 of the 1.9 (1.877 on the CPU reference path). One scale per 64
weights along the input brings it to 1.852 (+0.4 %), the same eight chunk NLLs on the GPU and on the CPU
reference path, greedy text identical to BF16 over 100 tokens.
What changes
quant_matmul(scales[O][ceil(I/gs)], group subtotal times scale); the per-elementi / gsbecomes a shift when gs is a power oftwo (75 -> 69 ms resident-mm per token on the 553 trunk matrices; per-row was 63). The upload records gs for
fmt 1 as it does for fmt 4. No new symbols, the DLL loader table is unchanged.
qt_dense_init(q, sc, I, O, device, gs); gs > 0 uploads throughupload_gand the budget counts thescale table;
qt_dense_matmulpasses the handle's gs. The backend's cached-tensor check refuses a groupedtensor asked with gs 0 -- the first hardware run of this branch failed all 553 matrices exactly that way, so
the fake backend now mirrors the check and the dense test has the case.
Q38_TRUNK_GS(default 64, 0 = per row) drives the quantizer, the CPU reference path(
Q38_TRUNK_CPU_INT8), the selftest, the offered bytes and the placement sum.Measured (RTX 3070, cap 224, the 315+100-token prompt of #1424)
Tests: the ten
tests/test_qwen36_tier_*(dense with the grouped case),test_qwen38_tier_engine(trunk groupedon the fake tier, cosine 0.99999), Python suites; CUDA builds of qwen36 and qwen38.
Thanks to Claude Code for the help along the way.
https://claude.ai/code/session_01X2HPETYXNwT4RmQkdMMyPS