[GH-ISSUE #4615] [Engine] Scope: opt-in IQ2_XXS gate/up for SYCL int8 prefill #2092

Open
opened 2026-11-04 01:56:37 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @pankleks on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4615

Area

[Engine]

What do you want to do?

Would you accept a SYCL-only, default-off IQ2_XXS gate/up extension to the existing fused int8 prompt-expert path as a focused PR?

This is a scope request under CONTRIBUTING.md, not a claim that the clean branch is ready for review. I have a private prototype and measured it on two Arc Pro B50s. A small preview is available here:

  • Preview branch, commit 0bc4a7d13085035dc249f4d94da53a86d08894e6.
  • Based on upstream 46c152a1310f77cd2f0ce2c7cd213962df14fe83.
  • The preview applies cleanly, but has not been built or run on this newer base. Historical validation below is for the older private prototype, not this commit.

What do you do today instead?

The existing int8 gate/up dispatch covers IQ3_S, IQ3_XXS and IQ2_S. IQ2_XXS experts take the FP16 conversion/matrix path. In the tested ISTA GSQ-RCO IQ3_XXS model, 9/48 layers use IQ2_XXS gate/up. Retaining their expanded FP16 weights is costly: 9.375 MiB per expert, or 4.6875 GiB for all 512 experts of one layer.

The proposed path decodes the existing IQ2_XXS codebook/signs/scales directly into DPAS operands instead of materializing those FP16 matrices.

Proposed scope and tradeoffs

  • Only IQ2_XXS/type 16 gate/up, controlled by STRATA_SYCL_IQ2_XXS_I8=1. Unset and all other values retain the old format set.
  • Keep existing device/shape checks, automatic int8/FP16 crossover, downstream IQ4_NL/Q2_0 kernels and fallback behavior. STRATA_PREFILL_MMQ=0 still selects FP16 everywhere.
  • Keep IQ2_XS, default settings, unrelated optimizations and CUDA/HIP/Metal untouched.
  • Use the non-work-group ESIMD variant first, with bounds-clamped dword reads and a 2 KiB opt-in codebook per device. No large FP16 cache.
  • Activation quantization changes rounding and may change wording. This is not a bit-exact FP16 optimization.
  • The clean preview contains only the extension, codebook, relevant tests and a short usage note. It excludes local telemetry/collector and host-job patches, debug output, machine-specific paths and benchmark dumps.

Historical prototype evidence, 29 October 2026

Provenance: private source based on fa663fabc5c2c568d6035b3ae853b38e1762865a (0.2.5 / engine 0.1.50), with unchanged local telemetry and the SYCL host-job capacity fix described in #3805 present in both arms. The clean preview excludes those local patches. These are not clean-main or preview-head measurements.

  • Prototype executable SHA-256: 3027f82fe3b9eae696b42862962b42d9ca3407465292f7072a539ac189fc20c8.
  • Prototype-only source patch SHA-256: d8f13818de369789f2ff95c524943b780e0db3850d00df5c0024c25c81aa7696.
  • Hardware: 2× Arc Pro B50 16 GiB, Ryzen 9 5950X, about 60.7 GiB visible RAM.
  • Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, xe, Level Zero reported driver 1.14.37020; oneAPI 2026.1 SYCL Release/JIT build. No AOT measurement.
  • Model: Qwen3.8-Flash-Next ISTA GSQ-RCO IQ3_XXS, numbered GGUF shards. Model repository revision/full GGUF hashes were not recorded.
  • Same settings: split 25; configured context 262144; prefill 1024; spec 4/min-p 0.5; INT8 KV/resident 32768; mirror budget 12288 MiB; STRATA_VERIFY_NO_HOST=0; VRAM reserve 2048 MiB; GPU power policy auto; service limit 40 GiB, no service swap. Expert profile SHA-256 ddddf9b361dd1cb1e68ef8d130759fa15da3b84d74f21d37b28f377493b80bbc unchanged.
  • Same candidate binary off/on, three fresh-engine pairs in off/on, on/off, off/on order. One warm-up per workload per engine, then one measured request per workload: three measured samples per arm/workload. Compilation and kernel tests finished before timing.
  • Fixed synthetic prompts, actual lengths 96/105/1007/4074, temperature 0, seed 20261029, thinking off, 128 generated tokens, cache_n=0. Separate private crossover caches; all starts reported 13,546 expert slots, 7,908 on the primary. Existing GPU collector unchanged. Native engine protocol, not an HTTP/SSE latency benchmark.

Median throughput, tok/s:

Workload Prompt off → on Change Decode off → on
Prose 71.0 → 74.5 +4.9% 27.4 → 27.9
Code 78.2 → 83.7 +7.0% 34.2 → 33.5
1K 357.9 → 379.1 +5.9% 35.1 → 35.3
4K 501.6 → 515.7 +2.8% 36.6 → 38.2

All 12 paired prompt-throughput observations favored on, but only 2/12 generated outputs matched exactly. Decode changes are mixed, not same-output speedups. This small experiment is not a standard/approved community benchmark or evidence for other cards.

All individual measured throughput samples (off / on, tok/s)
Pair Workload Prompt off / on Decode off / on
1 Prose 70.9 / 74.5 27.9 / 27.9
2 Prose 71.4 / 74.7 26.2 / 26.7
3 Prose 71.0 / 74.0 27.4 / 29.5
1 Code 78.4 / 84.0 37.1 / 34.0
2 Code 78.2 / 83.7 34.2 / 33.5
3 Code 78.1 / 83.7 33.3 / 32.1
1 1K 359.8 / 380.6 36.4 / 35.9
2 1K 357.0 / 379.1 34.2 / 33.7
3 1K 357.9 / 378.0 35.1 / 35.3
1 4K 502.4 / 515.7 36.2 / 38.2
2 4K 496.6 / 516.2 36.6 / 37.7
3 4K 501.6 / 513.9 36.8 / 38.8

Validation status

Passed on the private prototype, not the preview head:

  • SYCL Release/JIT engine and parity builds; both host-job regressions; six default-off/flag host checks; all 256 codebook entries matched the pinned ggml table.
  • 56 numerical cases across both B50s: 12 existing-format regressions, 16 new synthetic cases, 24 forced tile/register variants and four real-weight cases. Signed/zero/subnormal scales, uneven/padded rows, MT 2/4/8, GRF 128/256, both down formats.
  • Existing quantize_act_parity and iq_multi_parity on each card.
  • Original binary, candidate off and candidate on each scored 19/20 on the same smoke cases: arithmetic, JSON, basic Python-expression syntax (not execution), Polish text, native tool-call/result handling, document anchors. The same punctuation case failed in all three.
  • A 256-position teacher-forced probe (four prompts × 64 tokens) gave mean ΔNLL +0.000213 nats, conditional perplexity ratio 1.000213 and top-1 agreement 255/256 with on. Repeat off: −0.000362 nats, ratio 0.999638, agreement 254/256. This is a small, biased probe on earlier generated synthetic continuations, not full-vocabulary KL or general quality equivalence.
  • Original production restored, protected files/settings unchanged and both GPUs visible; no new wedge/reset or Strata segfault in the boot's kernel log. No memory-limit/OOM events or service swap were recorded in the full-model transient unit.

Commands underlying the prototype kernel checks included:

# Run against the private tested prototype, in its oneAPI environment.
# BUILD below denotes that build, not the unvalidated preview branch.
ONEAPI_DEVICE_SELECTOR=level_zero:0 SYCL_CACHE_PERSISTENT=0 \
  STRATA_SYCL_IQ2_XXS_I8=1 "$BUILD/esimd_moe_parity" 32 8 3 1 16 42
# Repeated on GPU 1, for down types 20/42, requested rows 32/128,
# seeds 1/20261029; forced MT=2/4/8 and GRF=128/256 used 64 4 2 3 16 <down>.
ONEAPI_DEVICE_SELECTOR=level_zero:0 SYCL_CACHE_PERSISTENT=0 \
  ctest --test-dir "$BUILD" -R '^(quantize_act_parity|iq_multi_parity)$' --output-on-failure

Failed/corrected during that experiment: an initial compile lacked the copied codebook and was corrected before GPU execution. The raw smoke scorer initially treated the engine's <|im_end|> token as answer text, producing invalid 3/20 scores. Stored token IDs were rescored with the server's stop-token rule; prompts/expectations/answers were unchanged, and raw results were retained. The remaining exact-copy failure omitted a final period in every arm.

Not run: clean preview-head build/runtime; complete default-path byte-identity comparison; HTTP/vision integration; independent quality corpora; contexts over 4K; sustained/concurrent load; other GPUs, Windows or AOT targets. CUDA/HIP/Metal files are untouched and were not built. A B50 long-load wedge history is an additional reason not to infer sustained stability from this short pass.

I checked open/closed issues and PRs for IQ2_XXS, IQ2/int8/DPAS and esimd_moe coverage. Related but different:

  • #2584: opt-in FP16 pairing/bounded decoding, not this fused int8 format extension; closed in the tracker reset, not a declined copy of this proposal.
  • #2802: bit-exact routed-expert decode changes; explicitly leaves the prompt path unchanged.
  • #3805: separate host-job capacity fix, excluded from this preview.

If this scope is acceptable, the next step is exact-head build/kernel revalidation and a focused PR with reproducible sanitized evidence, not a default change. Is this the preferred direction, or would you prefer the IQ2_XXS FP16 path work first?

Prepared with AI assistance in OpenCode. The prototype tests and measurements above were executed on the submitter's two B50s; neither maintainer approval nor validation of the clean preview head is implied.

Originally created by @pankleks on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4615 ### Area [Engine] ### What do you want to do? Would you accept a **SYCL-only, default-off IQ2_XXS gate/up extension to the existing fused int8 prompt-expert path** as a focused PR? This is a scope request under CONTRIBUTING.md, not a claim that the clean branch is ready for review. I have a private prototype and measured it on two Arc Pro B50s. A small preview is available here: - [Preview branch](https://github.com/pankleks/Strata/tree/feat/sycl-iq2xxs-int8-opt-in), commit `0bc4a7d13085035dc249f4d94da53a86d08894e6`. - Based on upstream `46c152a1310f77cd2f0ce2c7cd213962df14fe83`. - The preview applies cleanly, but **has not been built or run on this newer base**. Historical validation below is for the older private prototype, not this commit. ### What do you do today instead? The existing int8 gate/up dispatch covers IQ3_S, IQ3_XXS and IQ2_S. IQ2_XXS experts take the FP16 conversion/matrix path. In the tested ISTA GSQ-RCO IQ3_XXS model, 9/48 layers use IQ2_XXS gate/up. Retaining their expanded FP16 weights is costly: 9.375 MiB per expert, or 4.6875 GiB for all 512 experts of one layer. The proposed path decodes the existing IQ2_XXS codebook/signs/scales directly into DPAS operands instead of materializing those FP16 matrices. ### Proposed scope and tradeoffs - Only IQ2_XXS/type 16 gate/up, controlled by `STRATA_SYCL_IQ2_XXS_I8=1`. Unset and all other values retain the old format set. - Keep existing device/shape checks, automatic int8/FP16 crossover, downstream IQ4_NL/Q2_0 kernels and fallback behavior. `STRATA_PREFILL_MMQ=0` still selects FP16 everywhere. - Keep IQ2_XS, default settings, unrelated optimizations and CUDA/HIP/Metal untouched. - Use the non-work-group ESIMD variant first, with bounds-clamped dword reads and a 2 KiB opt-in codebook per device. No large FP16 cache. - Activation quantization changes rounding and may change wording. **This is not a bit-exact FP16 optimization.** - The clean preview contains only the extension, codebook, relevant tests and a short usage note. It excludes local telemetry/collector and host-job patches, debug output, machine-specific paths and benchmark dumps. ### Historical prototype evidence, 29 October 2026 **Provenance:** private source based on `fa663fabc5c2c568d6035b3ae853b38e1762865a` (0.2.5 / engine 0.1.50), with unchanged local telemetry and the SYCL host-job capacity fix described in #3805 present in both arms. The clean preview excludes those local patches. These are not clean-main or preview-head measurements. - Prototype executable SHA-256: `3027f82fe3b9eae696b42862962b42d9ca3407465292f7072a539ac189fc20c8`. - Prototype-only source patch SHA-256: `d8f13818de369789f2ff95c524943b780e0db3850d00df5c0024c25c81aa7696`. - Hardware: 2× Arc Pro B50 16 GiB, Ryzen 9 5950X, about 60.7 GiB visible RAM. - Ubuntu 26.04.1 LTS, kernel `7.0.0-38-generic`, xe, Level Zero reported driver `1.14.37020`; oneAPI 2026.1 SYCL Release/JIT build. No AOT measurement. - Model: Qwen3.8-Flash-Next ISTA GSQ-RCO IQ3_XXS, numbered GGUF shards. Model repository revision/full GGUF hashes were not recorded. - Same settings: split 25; configured context 262144; prefill 1024; spec 4/min-p 0.5; INT8 KV/resident 32768; mirror budget 12288 MiB; `STRATA_VERIFY_NO_HOST=0`; VRAM reserve 2048 MiB; GPU power policy `auto`; service limit 40 GiB, no service swap. Expert profile SHA-256 `ddddf9b361dd1cb1e68ef8d130759fa15da3b84d74f21d37b28f377493b80bbc` unchanged. - Same candidate binary off/on, three fresh-engine pairs in off/on, on/off, off/on order. One warm-up per workload per engine, then one measured request per workload: three measured samples per arm/workload. Compilation and kernel tests finished before timing. - Fixed synthetic prompts, actual lengths 96/105/1007/4074, temperature 0, seed 20261029, thinking off, 128 generated tokens, `cache_n=0`. Separate private crossover caches; all starts reported 13,546 expert slots, 7,908 on the primary. Existing GPU collector unchanged. Native engine protocol, not an HTTP/SSE latency benchmark. Median throughput, tok/s: | Workload | Prompt off → on | Change | Decode off → on | |---|---:|---:|---:| | Prose | 71.0 → 74.5 | +4.9% | 27.4 → 27.9 | | Code | 78.2 → 83.7 | +7.0% | 34.2 → 33.5 | | 1K | 357.9 → 379.1 | +5.9% | 35.1 → 35.3 | | 4K | 501.6 → 515.7 | +2.8% | 36.6 → 38.2 | All 12 paired prompt-throughput observations favored on, but only **2/12 generated outputs matched exactly**. Decode changes are mixed, not same-output speedups. This small experiment is not a standard/approved community benchmark or evidence for other cards. <details> <summary>All individual measured throughput samples (off / on, tok/s)</summary> | Pair | Workload | Prompt off / on | Decode off / on | |---|---|---:|---:| | 1 | Prose | 70.9 / 74.5 | 27.9 / 27.9 | | 2 | Prose | 71.4 / 74.7 | 26.2 / 26.7 | | 3 | Prose | 71.0 / 74.0 | 27.4 / 29.5 | | 1 | Code | 78.4 / 84.0 | 37.1 / 34.0 | | 2 | Code | 78.2 / 83.7 | 34.2 / 33.5 | | 3 | Code | 78.1 / 83.7 | 33.3 / 32.1 | | 1 | 1K | 359.8 / 380.6 | 36.4 / 35.9 | | 2 | 1K | 357.0 / 379.1 | 34.2 / 33.7 | | 3 | 1K | 357.9 / 378.0 | 35.1 / 35.3 | | 1 | 4K | 502.4 / 515.7 | 36.2 / 38.2 | | 2 | 4K | 496.6 / 516.2 | 36.6 / 37.7 | | 3 | 4K | 501.6 / 513.9 | 36.8 / 38.8 | </details> ### Validation status **Passed on the private prototype, not the preview head:** - SYCL Release/JIT engine and parity builds; both host-job regressions; six default-off/flag host checks; all 256 codebook entries matched the pinned ggml table. - 56 numerical cases across both B50s: 12 existing-format regressions, 16 new synthetic cases, 24 forced tile/register variants and four real-weight cases. Signed/zero/subnormal scales, uneven/padded rows, MT 2/4/8, GRF 128/256, both down formats. - Existing `quantize_act_parity` and `iq_multi_parity` on each card. - Original binary, candidate off and candidate on each scored 19/20 on the same smoke cases: arithmetic, JSON, basic Python-expression syntax (not execution), Polish text, native tool-call/result handling, document anchors. The same punctuation case failed in all three. - A 256-position teacher-forced probe (four prompts × 64 tokens) gave mean ΔNLL +0.000213 nats, conditional perplexity ratio 1.000213 and top-1 agreement 255/256 with on. Repeat off: −0.000362 nats, ratio 0.999638, agreement 254/256. This is a small, biased probe on earlier generated synthetic continuations, **not full-vocabulary KL or general quality equivalence**. - Original production restored, protected files/settings unchanged and both GPUs visible; no new wedge/reset or Strata segfault in the boot's kernel log. No memory-limit/OOM events or service swap were recorded in the full-model transient unit. Commands underlying the prototype kernel checks included: ```sh # Run against the private tested prototype, in its oneAPI environment. # BUILD below denotes that build, not the unvalidated preview branch. ONEAPI_DEVICE_SELECTOR=level_zero:0 SYCL_CACHE_PERSISTENT=0 \ STRATA_SYCL_IQ2_XXS_I8=1 "$BUILD/esimd_moe_parity" 32 8 3 1 16 42 # Repeated on GPU 1, for down types 20/42, requested rows 32/128, # seeds 1/20261029; forced MT=2/4/8 and GRF=128/256 used 64 4 2 3 16 <down>. ONEAPI_DEVICE_SELECTOR=level_zero:0 SYCL_CACHE_PERSISTENT=0 \ ctest --test-dir "$BUILD" -R '^(quantize_act_parity|iq_multi_parity)$' --output-on-failure ``` **Failed/corrected during that experiment:** an initial compile lacked the copied codebook and was corrected before GPU execution. The raw smoke scorer initially treated the engine's `<|im_end|>` token as answer text, producing invalid 3/20 scores. Stored token IDs were rescored with the server's stop-token rule; prompts/expectations/answers were unchanged, and raw results were retained. The remaining exact-copy failure omitted a final period in every arm. **Not run:** clean preview-head build/runtime; complete default-path byte-identity comparison; HTTP/vision integration; independent quality corpora; contexts over 4K; sustained/concurrent load; other GPUs, Windows or AOT targets. CUDA/HIP/Metal files are untouched and were not built. A B50 long-load wedge history is an additional reason not to infer sustained stability from this short pass. ### Related work and next step I checked open/closed issues and PRs for IQ2_XXS, IQ2/int8/DPAS and `esimd_moe` coverage. Related but different: - #2584: opt-in FP16 pairing/bounded decoding, not this fused int8 format extension; closed in the tracker reset, not a declined copy of this proposal. - #2802: bit-exact routed-expert decode changes; explicitly leaves the prompt path unchanged. - #3805: separate host-job capacity fix, excluded from this preview. If this scope is acceptable, the next step is exact-head build/kernel revalidation and a focused PR with reproducible sanitized evidence, not a default change. Is this the preferred direction, or would you prefer the IQ2_XXS FP16 path work first? Prepared with AI assistance in OpenCode. The prototype tests and measurements above were executed on the submitter's two B50s; neither maintainer approval nor validation of the clean preview head is implied.
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#2092
No description provided.