[PR #1818] [CLOSED] fix: make CPU IQ dispatch independent of draft occupancy #3697

Closed
opened 2026-11-07 15:30:07 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1818
Author: @CC-David-CC
Created: 10/10/2026
Status: ❌ Closed

Base: main ← Head: fix/draft-independent-iq-dispatch


📝 Commits (6)

  • 92d3391 fix(cpu): keep IQ expert arithmetic independent of draft grouping
  • d4cc56c Merge remote-tracking branch 'upstream/main' into HEAD
  • d080011 docs: quantify refreshed IQ consistency costs and parity limits
  • 3176ad3 docs: retain all refreshed IQ cost measurement logs
  • 18d3a37 Separate approximate tail routing from IQ dispatch parity
  • a2160b7 Merge Strata v0.1.43 into fix/draft-independent-iq-dispatch

📊 Changes

75 files changed (+18229 additions, -53 deletions)

View changed files

📝 CMakeLists.txt (+2 -0)
➕ bench/results/2026-10-10-draft-independent-iq/README.md (+97 -0)
➕ bench/results/2026-10-10-draft-independent-iq/baseline-xeon.log (+33 -0)
➕ bench/results/2026-10-10-draft-independent-iq/cross-arm.json (+9 -0)
➕ bench/results/2026-10-10-draft-independent-iq/measure.py (+15 -0)
➕ bench/results/2026-10-10-draft-independent-iq/model-engine-0.log (+92 -0)
➕ bench/results/2026-10-10-draft-independent-iq/model-engine-1.log (+92 -0)
➕ bench/results/2026-10-10-draft-independent-iq/model-manifest.json (+252 -0)
➕ bench/results/2026-10-10-draft-independent-iq/model-result.json (+1880 -0)
➕ bench/results/2026-10-10-draft-independent-iq/solo-manifest.json (+126 -0)
➕ bench/results/2026-10-10-draft-independent-iq/solo-result.json (+329 -0)
➕ bench/results/2026-10-10-draft-independent-iq/timings.json (+619 -0)
➕ bench/results/2026-10-10-draft-independent-iq/xeon-avx2/bench-0-default.log (+87 -0)
➕ bench/results/2026-10-10-draft-independent-iq/xeon-avx2/bench-0-legacy.log (+87 -0)
➕ bench/results/2026-10-10-draft-independent-iq/xeon-avx2/bench-1-default.log (+87 -0)
➕ bench/results/2026-10-10-draft-independent-iq/xeon-avx2/bench-1-legacy.log (+87 -0)
➕ bench/results/2026-10-10-draft-independent-iq/xeon-avx2/bench-2-default.log (+87 -0)
➕ bench/results/2026-10-10-draft-independent-iq/xeon-avx2/bench-2-legacy.log (+87 -0)
➕ bench/results/2026-10-10-draft-independent-iq/xeon-avx2/ctest.log (+14 -0)
➕ bench/results/2026-10-10-draft-independent-iq/xeon-avx2/gpu-parity.log (+55 -0)

...and 55 more files

📄 Description

Uses the same supported CPU IQ kernel for a token alone and for a group of draft tokens. The previous default switched arithmetic at two tokens, allowing group occupancy to change rounding even when the accepted prefix and rollback were correct. The default now matches STRATA_IQ_MT_MIN=1, including IQ4_NL down rows. STRATA_IQ_MT_MIN=2 retains the legacy behavior for comparison; STRATA_IQ3S_MT1 is redundant.

Refreshed onto current main (61b3fb5d). Direct native CPU checks compare each token's gate/up and down rows bit for bit across widths 1 through 8. Default, forced AVX2 and ggml controls pass; the explicit legacy threshold fails the negative control as expected. CUDA/HIP/SYCL builds and CPU checks passed. CUDA/HIP GPU synthetic format comparisons use numerical tolerances and do not prove end-to-end speculative token identity.

This is a correctness tradeoff, not an unconditional speed improvement. Fresh Ryzen 7600X3D one-token CPU expert microbenchmarks measured +68.61% time for IQ2_XS, +17.65% IQ2_XXS, +13.22% IQ3_XXS and +10.03% IQ3_S; IQ2_S and IQ4_XS were approximately unchanged. Three processes per setting alternate default/legacy order; these are per-expert costs, not whole-model decode regressions.

The fresh 14-request mixed CPU/GPU no-draft/single-token/drafted comparison passes exactly when approximate tail skipping is disabled (STRATA_ROUTE_TAIL_SKIP=0). Earlier default-policy divergences are retained and explained: rank-7 skipping uses minimum expert rank across the token window, so adding draft rows can change target contributions. This PR preserves ordinary tail-skip defaults. The controlled main pipeline matrix also passes; suffix-on-pipeline coverage remains incomplete. These finite controls do not claim arbitrary model, CPU/GPU or pipeline parity.

Fresh results, full token records, diagnostic controls and all cost logs. Historical validation on its original source. No deployed server configuration was changed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1818 **Author:** [@CC-David-CC](https://github.com/CC-David-CC) **Created:** 10/10/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/draft-independent-iq-dispatch` --- ### 📝 Commits (6) - [`92d3391`](https://github.com/Niko1221/Strata/commit/92d3391fcb35128807d602c2c93b19861c703bdc) fix(cpu): keep IQ expert arithmetic independent of draft grouping - [`d4cc56c`](https://github.com/Niko1221/Strata/commit/d4cc56ca071b584d4cc32c96e4a745bf15db12a4) Merge remote-tracking branch 'upstream/main' into HEAD - [`d080011`](https://github.com/Niko1221/Strata/commit/d08001179cda31c38994568315a86cd824bed604) docs: quantify refreshed IQ consistency costs and parity limits - [`3176ad3`](https://github.com/Niko1221/Strata/commit/3176ad319677c07438e24635551a15e8e8908817) docs: retain all refreshed IQ cost measurement logs - [`18d3a37`](https://github.com/Niko1221/Strata/commit/18d3a37f0192da4d15993be5afbe25572ad31939) Separate approximate tail routing from IQ dispatch parity - [`a2160b7`](https://github.com/Niko1221/Strata/commit/a2160b71f59b1fa9460a4e4d13fad2e6f7c1763d) Merge Strata v0.1.43 into fix/draft-independent-iq-dispatch ### 📊 Changes **75 files changed** (+18229 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+2 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/README.md` (+97 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/baseline-xeon.log` (+33 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/cross-arm.json` (+9 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/measure.py` (+15 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/model-engine-0.log` (+92 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/model-engine-1.log` (+92 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/model-manifest.json` (+252 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/model-result.json` (+1880 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/solo-manifest.json` (+126 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/solo-result.json` (+329 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/timings.json` (+619 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/xeon-avx2/bench-0-default.log` (+87 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/xeon-avx2/bench-0-legacy.log` (+87 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/xeon-avx2/bench-1-default.log` (+87 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/xeon-avx2/bench-1-legacy.log` (+87 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/xeon-avx2/bench-2-default.log` (+87 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/xeon-avx2/bench-2-legacy.log` (+87 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/xeon-avx2/ctest.log` (+14 -0) ➕ `bench/results/2026-10-10-draft-independent-iq/xeon-avx2/gpu-parity.log` (+55 -0) _...and 55 more files_ </details> ### 📄 Description Uses the same supported CPU IQ kernel for a token alone and for a group of draft tokens. The previous default switched arithmetic at two tokens, allowing group occupancy to change rounding even when the accepted prefix and rollback were correct. The default now matches `STRATA_IQ_MT_MIN=1`, including IQ4_NL down rows. `STRATA_IQ_MT_MIN=2` retains the legacy behavior for comparison; `STRATA_IQ3S_MT1` is redundant. Refreshed onto current main (`61b3fb5d`). Direct native CPU checks compare each token's gate/up and down rows bit for bit across widths 1 through 8. Default, forced AVX2 and ggml controls pass; the explicit legacy threshold fails the negative control as expected. CUDA/HIP/SYCL builds and CPU checks passed. CUDA/HIP GPU synthetic format comparisons use numerical tolerances and do not prove end-to-end speculative token identity. This is a correctness tradeoff, not an unconditional speed improvement. Fresh Ryzen 7600X3D one-token CPU expert microbenchmarks measured +68.61% time for IQ2_XS, +17.65% IQ2_XXS, +13.22% IQ3_XXS and +10.03% IQ3_S; IQ2_S and IQ4_XS were approximately unchanged. Three processes per setting alternate default/legacy order; these are per-expert costs, not whole-model decode regressions. The fresh 14-request mixed CPU/GPU no-draft/single-token/drafted comparison passes exactly when approximate tail skipping is disabled (`STRATA_ROUTE_TAIL_SKIP=0`). Earlier default-policy divergences are retained and explained: rank-7 skipping uses minimum expert rank across the token window, so adding draft rows can change target contributions. This PR preserves ordinary tail-skip defaults. The controlled main pipeline matrix also passes; suffix-on-pipeline coverage remains incomplete. These finite controls do not claim arbitrary model, CPU/GPU or pipeline parity. [Fresh results, full token records, diagnostic controls and all cost logs](https://github.com/CC-David-CC/Strata-a5500/blob/18d3a37f/bench/results/2026-10-11-draft-independent-iq/README.md). [Historical validation on its original source](https://github.com/CC-David-CC/Strata-a5500/blob/18d3a37f/bench/results/2026-10-10-draft-independent-iq/README.md). No deployed server configuration was changed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:30:07 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3697
No description provided.