Repository navigation
Conversation
native_expert_i8 covers Q4_K (12) as gate/up but not as down. Ornith-1.5-35B Q4_K_M, the catalog's smallest Ornith size, stores ffn_down_exps as Q4_K in 20 of its 41 layers (Q6_K in the other 21), so those layers have no int8 route in a build without MMQ, and q36_prompt_path_ok sends every prompt chunk of every layer to the native grouped kernels. The decoder is the one the kernel already has for Q4_K gate/up (shared with Q5_K, which is already a down format). As in f66a48b for Q5_K / Q6_K, the change is the format predicate, the shared-memory size table, the down dispatch and the n_ff condition of native_expert_i8_supported (n_ff a whole number of 256-value super-blocks). native_i8_parity: Q4_K / Q4_K, Q5_K / Q4_K and Q6_K / Q4_K at the Qwen3.6 shape (2048 x 512) and 512 x 256. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
schmittcn
added a commit
to schmittcn/Strata
that referenced
this pull request
Dec 1, 2026
…iko1221#7617) into local Conflicts with fa969cf (IQ4_XS down, Niko1221#6197) on the same lines: both formats kept (12 and 23). FORK.md: patch table row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem and result
native_expert_i8(Strata's int8 expert kernels, the prompt route of the q36 path in a build without MMQ) covers Q4_K as gate/up but not as down. The catalog's smallest Ornith size,Ornith-1.5-35B-Q4_K_M.gguf, storesffn_down_expsas Q4_K in 20 of its 41 layers (Q6_K in the other 21). Those 20 layers have no int8 route, andq36_prompt_path_okthen sends every prompt chunk of every layer to the native grouped kernels:strata-q36: prompt experts on the native grouped kernelsstrata-q36: prompt experts: 0 of 41 layers on the fused int8 kernels, 41 on our int8 kernels, 0 on MMQ (int8)So the default Ornith size reads prompts at about half the rate of Qwen3.6 UD-Q4_K_XL (Q5_K / Q6_K downs, already on the int8 route) with the same arguments. Q5_K_M (Q5_K / Q6_K downs), Q6_K and Q8_0 are not affected. With this change Q4_K_M reads prompts at Qwen3.6's rate: +66 to +91%.
Related discussion
--kv fp8decode attention reads each KV head once for its query-head group #7397 (decode attention for--kv fp8) was measured on the same official Q4_K_M file; the two changes are independent.A focused fix, so no scope agreement asked first.
Approach
The decoder is the one the kernel already has for Q4_K gate/up. Q4_K shares it with Q5_K (
T == 12 || T == 13), and Q5_K is already a down format. As in f66a48b for Q5_K / Q6_K, the change is:i8_d_type: add 12;i8_smem_bytes: the down size for 12;native_expert_i8:i8_launch<12, false>;native_expert_i8_supported: 12 joins 13 / 14 in requiringn_ffto be a whole number of 256-value super-blocks.Nothing else changes: other formats keep their routes, and the decode path is untouched.
Validation
RX 6900 XT 16 GB (gfx1030), Ryzen 9 5950X, 64 GB RAM, Arch Linux, ROCm 7.2.4, performance power profile. Two builds with setup's HIP cmake line (plus tests ON): B = main
8db8753d5, N = main + this commit. Same stock 0.2.23 server for both. OfficialOrnith-1.5-35B-Q4_K_M.ggufat the catalog's pinned revision, SHA-256 checked.Passed:
native_i8_parityon N:all ok. New rows: Q4_K, Q5_K and Q6_K gate/up, each with a Q4_K down, at 2048 x 512 and 512 x 256. Worst relative RMS against the grouped kernels is 2.0e-3 to 2.5e-3, the same level as the existing formats. B:all ok.--max-context 131072 --prefill auto --mtp 2, default KV, automatic expert fit). Arms B N | N B | B N; per passtools/strata_bench.pyplus 3 short and 3 cold 40,207-token prompts; medians, with the range in brackets:--expert-vramcovers experts and staging together. A control with the same experts on the card (B--expert-vram 4.5, N--expert-vram 5.47, both 61 of 256 per layer; 2 interleaved passes):strata-q36 --dump-full-logits, N against B: mean KL 0.0183, p99 0.133, top-1 same 96.5%. [Engine] int8 expert kernels: IQ4_XS as a down format #6197's int8-vs-grouped figure on the same kind of sequence was 0.0167.Failed:
none observed
Not run:
.cu/.cuhand only enables existing templates, but no CUDA build was done.Limits
--expert-vramaround that is a separate question.🤖 Generated with Claude Code