[PR #860] [CLOSED] Unsloth UD-Q6_K_XL: Q8_0 PLE rows and Q6_K gate/up experts #2879

Closed
opened 2026-11-04 02:03:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/860
Author: @DaRealDaHoodie
Created: 10/5/2026
Status: ❌ Closed

Base: main ← Head: q6-ple-q8


📝 Commits (3)

  • 41b1a3e PLE table as Q8_0 (Unsloth's UD-Q6_K_XL) + docs
  • 5c82451 Q6_K gate/up through the native expert paths (Unsloth's UD-Q6_K_XL experts)
  • 5c6aa73 docs: record the UD-Q6_K_XL server run and register its parity pair

📊 Changes

14 files changed (+383 additions, -31 deletions)

View changed files

📝 CMakeLists.txt (+9 -8)
📝 docs/MODELS.md (+3 -0)
📝 docs/UNSLOTH_Q4.md (+1 -0)
➕ docs/UNSLOTH_Q6.md (+137 -0)
📝 include/strata/kernels/ngram.hpp (+2 -1)
📝 include/strata/ngram/ple_reader.hpp (+1 -1)
📝 src/kernels/cuda/iq_kernels.cu (+62 -3)
📝 src/kernels/native_grouped_parity.cpp (+2 -1)
📝 src/kernels/ngram.cpp (+13 -6)
➕ src/kernels/ple_q8_parity.cpp (+79 -0)
📝 src/ngram/ple_reader_test.cpp (+8 -6)
📝 src/prefill/moe_mmq.cu (+2 -1)
📝 tests/cuda/prefill_mmq_kquant_test.cpp (+5 -4)
➕ tools/ple_q8_fixture.py (+59 -0)

📄 Description

Unsloth's UD-Q6_K_XL of Qwen3.8-Flash-Next (revision 38bb39e) does not load on main. Its PLE table is Q8_0 (170-byte rows, 54.4 GB) and its routed gate/up experts are Q6_K. Main reads the table as IQ4_NL, Q5_0 or FP8, and native_expert_supported refuses Q6_K gate/up with "no GPU kernels for".

This branch teaches the engine those two formats and documents the manual pack. Setup does not offer the model.

What changed

  • PleTable accepts per_layer_token_embd.weight as Q8_0. The row reader was already parameterized by bytes per row; this adds the type check, a dequantize_q8_0 loop (5 blocks of 34 bytes) and PLE_ROW_BYTES_MAX of 170. Gather still writes floats, so no GPU kernel changed. v0.1.39's PLE prefetch (up to 16 rows) stays; with --ple-io ram that path is idle.
  • Grouped expert kernels take gate/up Q6_K (Fmt<14>, llama.cpp's vec_dot_q6_K_q8_1). Per-token MMVQ already had Q6_K. STRATA_MMQ_KQUANTS=ON also builds the Q6_K MMQ prompt instance.
  • The pack on this file is gate/up Q6_K and down Q8_0 on 47 of 48 layers. Layer 2 is Q8_0 for both. Down Q6_K is not in this file.
  • native_expert_parity --synthetic q6_K/q8_0 is registered as a normal test. It used to be WILL_FAIL, from when that pair had no GPU kernel.

Measured

Linux, RTX PRO 4500 Blackwell (compute capability 12.0) plus a second GPU, Threadripper PRO 5975WX (AVX2, no AVX-512), 30 expert-pool workers, 499 GB of RAM. CUDA archs 86;120, STRATA_MMQ_KQUANTS=ON. Experts resident in RAM (101.75 GiB), --expert-cache 5465 slots / 22.63 GiB, CUDA1 1800 experts / 7.48 GiB, --kv-resident 32768, --ple-io ram, --pcie-frac 0.20, --spec 4.

Engine 0.1.39, one review, 2026-10-04:

  • Cold read of 14,915 tokens at 3,176 tok/s.
  • 14 turns, 5,799 tokens in 74.1 s, 78.3 tok/s, ending at 44,160 tokens of context.
  • Drafts accepted 3,485 of 4,406 (79.1%).

Same machine, engine 0.1.38, before this branch was rebased onto 0.1.39: a cold read of 249,193 tokens at 2,802 tok/s, then 1,079 tokens at 69.0 tok/s.

ple_reader_test --selftest covers 170-byte rows, and ple_q8_parity matches ggml's Q8_0 dequantizer bit for bit on the synthetic fixture (max_abs 0).

Not measured

Quality against llama.cpp on this file. The three Q6_K parity programs (native_grouped_parity, prefill_mmq_kquant_test, native_expert_parity --synthetic q6_K/q8_0) are built and have not been run: the GPU was serving. The page stays experimental until those exist.

docs/UNSLOTH_Q6.md is the manual workflow.


🔄 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/860 **Author:** [@DaRealDaHoodie](https://github.com/DaRealDaHoodie) **Created:** 10/5/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `q6-ple-q8` --- ### 📝 Commits (3) - [`41b1a3e`](https://github.com/Niko1221/Strata/commit/41b1a3ef32fdf427ce2bdf113fe26840c2e384d6) PLE table as Q8_0 (Unsloth's UD-Q6_K_XL) + docs - [`5c82451`](https://github.com/Niko1221/Strata/commit/5c8245147da23ee4cb9b44a5acd81be4506b6966) Q6_K gate/up through the native expert paths (Unsloth's UD-Q6_K_XL experts) - [`5c6aa73`](https://github.com/Niko1221/Strata/commit/5c6aa73efd5ecc5bf2b69c0467144ba88ea61dbc) docs: record the UD-Q6_K_XL server run and register its parity pair ### 📊 Changes **14 files changed** (+383 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+9 -8) 📝 `docs/MODELS.md` (+3 -0) 📝 `docs/UNSLOTH_Q4.md` (+1 -0) ➕ `docs/UNSLOTH_Q6.md` (+137 -0) 📝 `include/strata/kernels/ngram.hpp` (+2 -1) 📝 `include/strata/ngram/ple_reader.hpp` (+1 -1) 📝 `src/kernels/cuda/iq_kernels.cu` (+62 -3) 📝 `src/kernels/native_grouped_parity.cpp` (+2 -1) 📝 `src/kernels/ngram.cpp` (+13 -6) ➕ `src/kernels/ple_q8_parity.cpp` (+79 -0) 📝 `src/ngram/ple_reader_test.cpp` (+8 -6) 📝 `src/prefill/moe_mmq.cu` (+2 -1) 📝 `tests/cuda/prefill_mmq_kquant_test.cpp` (+5 -4) ➕ `tools/ple_q8_fixture.py` (+59 -0) </details> ### 📄 Description Unsloth's UD-Q6_K_XL of Qwen3.8-Flash-Next (revision `38bb39e`) does not load on main. Its PLE table is Q8_0 (170-byte rows, 54.4 GB) and its routed gate/up experts are Q6_K. Main reads the table as IQ4_NL, Q5_0 or FP8, and `native_expert_supported` refuses Q6_K gate/up with "no GPU kernels for". This branch teaches the engine those two formats and documents the manual pack. Setup does not offer the model. ## What changed - `PleTable` accepts `per_layer_token_embd.weight` as Q8_0. The row reader was already parameterized by bytes per row; this adds the type check, a `dequantize_q8_0` loop (5 blocks of 34 bytes) and `PLE_ROW_BYTES_MAX` of 170. Gather still writes floats, so no GPU kernel changed. v0.1.39's PLE prefetch (up to 16 rows) stays; with `--ple-io ram` that path is idle. - Grouped expert kernels take gate/up Q6_K (`Fmt<14>`, llama.cpp's `vec_dot_q6_K_q8_1`). Per-token MMVQ already had Q6_K. `STRATA_MMQ_KQUANTS=ON` also builds the Q6_K MMQ prompt instance. - The pack on this file is gate/up Q6_K and down Q8_0 on 47 of 48 layers. Layer 2 is Q8_0 for both. Down Q6_K is not in this file. - `native_expert_parity --synthetic q6_K/q8_0` is registered as a normal test. It used to be `WILL_FAIL`, from when that pair had no GPU kernel. ## Measured Linux, RTX PRO 4500 Blackwell (compute capability 12.0) plus a second GPU, Threadripper PRO 5975WX (AVX2, no AVX-512), 30 expert-pool workers, 499 GB of RAM. CUDA archs 86;120, `STRATA_MMQ_KQUANTS=ON`. Experts resident in RAM (101.75 GiB), `--expert-cache` 5465 slots / 22.63 GiB, CUDA1 1800 experts / 7.48 GiB, `--kv-resident 32768`, `--ple-io ram`, `--pcie-frac 0.20`, `--spec 4`. Engine 0.1.39, one review, 2026-10-04: - Cold read of 14,915 tokens at 3,176 tok/s. - 14 turns, 5,799 tokens in 74.1 s, 78.3 tok/s, ending at 44,160 tokens of context. - Drafts accepted 3,485 of 4,406 (79.1%). Same machine, engine 0.1.38, before this branch was rebased onto 0.1.39: a cold read of 249,193 tokens at 2,802 tok/s, then 1,079 tokens at 69.0 tok/s. `ple_reader_test --selftest` covers 170-byte rows, and `ple_q8_parity` matches ggml's Q8_0 dequantizer bit for bit on the synthetic fixture (`max_abs 0`). ## Not measured Quality against llama.cpp on this file. The three Q6_K parity programs (`native_grouped_parity`, `prefill_mmq_kquant_test`, `native_expert_parity --synthetic q6_K/q8_0`) are built and have not been run: the GPU was serving. The page stays experimental until those exist. `docs/UNSLOTH_Q6.md` is the manual workflow. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:03:50 +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#2879
No description provided.