Skip to content

[Engine] keep STRATA_HC_Q8 opt-in on sm_86 - #350

Open
pwnedbygary wants to merge 1 commit into
simplexai-labs:mainfrom
pwnedbygary:fix/hc-q8-sm86
Open

pwnedbygary wants to merge 1 commit into
simplexai-labs:mainfrom
pwnedbygary:fix/hc-q8-sm86

Conversation

@pwnedbygary

Copy link
Copy Markdown

Problem and result

On sm_86 (RTX 3080, driver 620.73.04, CUDA 13.5, engine 0.1.66) a Unsloth UD pack fails at start-up:

strata serve: window warm-up: ms per width 1:39, total 96 ms; a window failed: verify: layer 0 never rang (operation not supported on global/shared address space)

apply_hc_q8_default() sets STRATA_HC_Q8=1 for every GGUF that carries Q8_0 hyper-connection projections — every Unsloth UD file does — with no architecture gate. On the same pack and flags, STRATA_HC_Q8=0 passes every warm-up width (1, 2, 3, 4, 5, 6, 12) and the engine reaches READY; an ISTA-DASLab GSQ-RCO pack (bf16 HC copy) never enters this path and works. nv_defaults.cpp already keeps STRATA_HC_Q8 opt-in on sm_86, but the automatic enable ignores that rule.

After this change, on sm_86 the automatic enable is skipped and the bf16 HC read is used, as the sm_86 defaults intend. STRATA_HC_Q8=1 still forces the Q8_0 path (and still fails on this card until the underlying kernel issue is found).

Related discussion

none

Approach

Gate the automatic enable in apply_hc_q8_default() on compute capability 8.6. An explicit STRATA_HC_Q8 value wins as before. Other architectures are unchanged.

Validation

Passed:

  • STRATA_HC_Q8=0 with the UD-IQ4_XS-v31 pack, engine 0.1.66, RTX 3080 10 GB: warm-up widths 1:97 2:100 3:107 4:116 5:132 6:146 12:272 ms, then READY 32768; a chat completion answered normally. The same config with 131072 context reached loaded: true and answered requests.

Failed:

  • STRATA_HC_Q8=1 (the automatic enable) with the same pack and flags: the window warm-up fails at width 1 with the error above. Reproduced with both the 0.1.66 component build and the PolyStrata engine build.

Not run:

  • The patched engine was not compiled here (this machine has no CUDA toolkit or CMake); the change is a small guard in apply_hc_q8_default(). The behaviour it selects (STRATA_HC_Q8=0) is the one verified above.

The Q8_0 hyper-connection verify read is enabled automatically for any GGUF
that carries Q8_0 HC projections (the Unsloth UD files), with no architecture
gate. On sm_86 (RTX 3080, driver 620.73.04, CUDA 13.5, engine 0.1.66) the first
verify window warm-up then fails:

  strata serve: window warm-up: ms per width 1:39, total 96 ms; a window failed:
  verify: layer 0 never rang (operation not supported on global/shared address space)

STRATA_HC_Q8=0 passes every warm-up width with the same pack and flags, and
nv_defaults.cpp already keeps STRATA_HC_Q8 opt-in on sm_86; apply_hc_q8_default
ignores that rule. Gate the automatic enable on sm_86 so those cards use the
bf16 HC read unless the runner sets STRATA_HC_Q8 explicitly.
@BatJack

BatJack commented Nov 26, 2026

Copy link
Copy Markdown

Thanks, I have same GPU and same issue, set STRATA_HC_Q8 = 0, problem fixed.

@kaban-baku

kaban-baku commented Nov 26, 2026 •

Copy link
Copy Markdown

The same start-up failure here on sm_86 under Windows. The root cause has been found and fixed upstream, so bumping the bundled Strata engine may be the fuller fix.

Upstream: Strata 0.2.21 (engine 0.1.67) fixes this, as Niko1221/Strata#6713 / Niko1221/Strata#6714 describe. In 0.1.66 a helper started to read through the read-only cache (__ldg), and four Tensor Core kernels of the Q8_0 hyper-connection projections called it on rows staged in shared memory. A load like that on a shared address traps with "operation not supported on global/shared address space". The author's notes are in Niko1221/Strata#6956 and Niko1221/Strata#6901. The same failure was reported upstream on sm_89 and sm_120 too (Niko1221/Strata#6790, Niko1221/Strata#6892, Niko1221/Strata#6940, Niko1221/Strata#6956), so the bug is not limited to sm_86.

Upstream engine versions: Strata has shipped engine 0.1.67 since v0.2.21 (released 2026-11-24). The current release, v0.2.22 (2026-11-25), ships engine 0.1.69. I tested 0.1.67 only, not 0.1.69.

Measured here: RTX 3070 Ti Laptop 8 GB (sm_86), Windows 11, driver 616.92, PolyStrata v0.2.20-poly.5. The model is Unsloth's Qwen3.8-Flash-Next UD-IQ2_XS, set up with --family unsloth --model UD-IQ2_XS --gguf-dir, with the run config setup wrote (DFlash2, --spec 4, KV streaming on). The prompts were a 1,200-token story and a code prompt, 2 runs each, temperature 0, with a cool start each time. The common shard is a locally re-quantized variant of the same file, which setup accepted as a complete GGUF; the failure does not depend on it.

engine setting result
bundled strata-engine 0.1.66 (2e87c08, cuda13) none window warm-up: … a window failed: verify: layer 0 never rang (operation not supported on global/shared address space), then kv_stream: reset: operation not supported …. The first request freezes and the server restarts the engine in a loop
same 0.1.66 STRATA_SM86_PERF=0 same failure
same 0.1.66 STRATA_HC_Q8=0 (in the run config's env), the workaround BatJack confirmed above warm-up passes for widths 1-8, mean 42.7 tok/s (story 37.5, code 45.8-49.9)
strata-engine 0.1.67 from Strata v0.2.21 (strata-engine-0.1.67-windows-x86_64-cuda-cuda13.tar.gz, sha256 b0bdbed3…, only exe changed in the run config) none warm-up passes for widths 1-8, mean 46.7 tok/s (story 40.0-40.5, code 53.1-53.2)

So the gate in this PR does avoid the crash on sm_86. But it leaves the other architectures exposed, and it keeps the slower bf16 HC read. With engine 0.1.67 bundled, no gate is needed, and here it was also faster. The pack that PolyStrata's setup built for 0.1.66 loaded unchanged in 0.1.67.

Not checked: Linux, other cards, other Qwen packs, and PolyStrata's own strata-poly engine (Inkling 2 works here with no change).

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants