[PR #140] [CLOSED] Add OrcaRouter Qwen3.8 Flash-Next Q4_K_S support #2478

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/140
Author: @Suoriks
Created: 9/29/2026
Status: ❌ Closed

Base: main ← Head: grammax-q4ks


📝 Commits (1)

  • 10981f8 feat: support OrcaRouter Q4_K_S

📊 Changes

15 files changed (+398 additions, -42 deletions)

View changed files

📝 CMakeLists.txt (+6 -1)
➕ docs/ORCA_Q4_K_S.md (+36 -0)
📝 include/strata/kernels/cpu/expert_layout.hpp (+3 -0)
📝 src/core/expert_source.cpp (+13 -9)
📝 src/kernels/cpu/expert_layout.cpp (+11 -3)
📝 src/kernels/cuda/dequant_bf16.cu (+13 -0)
📝 src/kernels/cuda/iq_kernels.cu (+106 -1)
📝 src/kernels/cuda/native_mmvq.cu (+3 -1)
📝 src/kernels/native_expert_parity.cpp (+18 -9)
📝 src/kernels/ngram.cpp (+30 -10)
➕ src/kernels/ple_q5_parity.cpp (+59 -0)
➕ src/kernels/q5_projection_parity.cpp (+62 -0)
📝 src/prefill/moe_mmq.cu (+5 -1)
📝 tools/iq_pack.py (+10 -7)
📝 tools/test_iq_pack.py (+23 -0)

📄 Description

Changes

Add support for the three original OrcaRouter Qwen3.8 Flash-Next Uncensored Q4_K_S GGUF shards. The loader finds experts whose tensors span shard boundaries. The packer keeps the Q4_K expert weights in GGUF form and reads the Q5_0 PLE table through mmap. CUDA and CPU paths handle the model's Q5_0/Q5_1 down projections and quantized small projections. docs/ORCA_Q4_K_S.md gives the setup commands and model-specific caveats.

Checks

  • Built strata, native_expert_parity, ple_q5_parity, and q5_projection_parity from the rebased 0.1.24 tree on Windows, CUDA 12.6, L40S (sm_89).
  • test_iq_pack.py: 9 tests, 1 skipped.
  • serve.test_server: 38 tests passed.
  • PLE parity: 320,001,536 Q5_0 rows, zero maximum absolute difference.
  • Projection parity: 2,560 Q5_1 elements, zero maximum absolute difference and zero BF16 differences.
  • Native expert parity: layers 0, 5, 6, 20, and 47 passed on CUDA with the three source shards. These cover both Q5_0 and Q5_1 down projections and shard boundaries.

The 0.1.23-based version also passed full text, vision, MTP, and 220K-token marker retrieval on two L40S cards. The 0.1.24 rebase has been rebuilt and checked with the parity tests above.


🔄 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/140 **Author:** [@Suoriks](https://github.com/Suoriks) **Created:** 9/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `grammax-q4ks` --- ### 📝 Commits (1) - [`10981f8`](https://github.com/Niko1221/Strata/commit/10981f8eb459ef2ae7c8beeadd10f07154b069f9) feat: support OrcaRouter Q4_K_S ### 📊 Changes **15 files changed** (+398 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+6 -1) ➕ `docs/ORCA_Q4_K_S.md` (+36 -0) 📝 `include/strata/kernels/cpu/expert_layout.hpp` (+3 -0) 📝 `src/core/expert_source.cpp` (+13 -9) 📝 `src/kernels/cpu/expert_layout.cpp` (+11 -3) 📝 `src/kernels/cuda/dequant_bf16.cu` (+13 -0) 📝 `src/kernels/cuda/iq_kernels.cu` (+106 -1) 📝 `src/kernels/cuda/native_mmvq.cu` (+3 -1) 📝 `src/kernels/native_expert_parity.cpp` (+18 -9) 📝 `src/kernels/ngram.cpp` (+30 -10) ➕ `src/kernels/ple_q5_parity.cpp` (+59 -0) ➕ `src/kernels/q5_projection_parity.cpp` (+62 -0) 📝 `src/prefill/moe_mmq.cu` (+5 -1) 📝 `tools/iq_pack.py` (+10 -7) 📝 `tools/test_iq_pack.py` (+23 -0) </details> ### 📄 Description ## Changes Add support for the three original OrcaRouter Qwen3.8 Flash-Next Uncensored Q4_K_S GGUF shards. The loader finds experts whose tensors span shard boundaries. The packer keeps the Q4_K expert weights in GGUF form and reads the Q5_0 PLE table through mmap. CUDA and CPU paths handle the model's Q5_0/Q5_1 down projections and quantized small projections. `docs/ORCA_Q4_K_S.md` gives the setup commands and model-specific caveats. ## Checks - Built `strata`, `native_expert_parity`, `ple_q5_parity`, and `q5_projection_parity` from the rebased 0.1.24 tree on Windows, CUDA 12.6, L40S (sm_89). - `test_iq_pack.py`: 9 tests, 1 skipped. - `serve.test_server`: 38 tests passed. - PLE parity: 320,001,536 Q5_0 rows, zero maximum absolute difference. - Projection parity: 2,560 Q5_1 elements, zero maximum absolute difference and zero BF16 differences. - Native expert parity: layers 0, 5, 6, 20, and 47 passed on CUDA with the three source shards. These cover both Q5_0 and Q5_1 down projections and shard boundaries. The 0.1.23-based version also passed full text, vision, MTP, and 220K-token marker retrieval on two L40S cards. The 0.1.24 rebase has been rebuilt and checked with the parity tests above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:00:31 +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#2478
No description provided.