[PR #296] [CLOSED] Add OrcaRouter Q4_K_S support (0.1.30) #2562

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

📋 Pull Request Information

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

Base: main ← Head: grammax-q4ks-hip


📝 Commits (1)

  • 9871aa2 feat: support OrcaRouter Q4_K_S

📊 Changes

15 files changed (+420 additions, -45 deletions)

View changed files

📝 CMakeLists.txt (+23 -2)
➕ 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 (+10 -1)
📝 tools/iq_pack.py (+10 -9)
📝 tools/test_iq_pack.py (+23 -0)

📄 Description

This rebases the OrcaRouter Q4_K_S port from #140 onto Strata 0.1.30.

The new STRATA_ORCA_Q4KS_MMQ option defaults to OFF. When enabled, it adds Q4_K, Q5_0 and Q5_1 GGML MMQ instances to the CUDA build and to the optional HIP prefill build. The existing Q8_0 draft-layer instance stays in both configurations. The port also reads expert tensors that cross GGUF shard boundaries, handles the Q5_0 PLE table and Q5_1 projections, and adds manual setup instructions.

Checks on Windows with two NVIDIA L40S cards:

  • CUDA Release strata build passed with the option both ON and OFF. Both generated build graphs retain Q8_0; only ON adds the three new instances.
  • Focused pack tests: 8 passed, 1 Windows symlink test skipped. The existing BF16 pack byte-identity test passed.
  • Real GGUF parity: Q5_0 PLE, Q5_1 projection and native experts at layers 0, 5, 6, 20 and 47 passed.

The HIP sources use the same CMake instance list. This machine has no ROCm toolchain or AMD GPU, so I could not compile or run the HIP build here. CMake stops at HIP compiler discovery (Failed to find HIP root directory).


🔄 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/296 **Author:** [@Suoriks](https://github.com/Suoriks) **Created:** 9/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `grammax-q4ks-hip` --- ### 📝 Commits (1) - [`9871aa2`](https://github.com/Niko1221/Strata/commit/9871aa2f4193e35b0f4c205cf9028bd8d5f372dd) feat: support OrcaRouter Q4_K_S ### 📊 Changes **15 files changed** (+420 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+23 -2) ➕ `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` (+10 -1) 📝 `tools/iq_pack.py` (+10 -9) 📝 `tools/test_iq_pack.py` (+23 -0) </details> ### 📄 Description This rebases the OrcaRouter Q4_K_S port from #140 onto Strata 0.1.30. The new `STRATA_ORCA_Q4KS_MMQ` option defaults to `OFF`. When enabled, it adds Q4_K, Q5_0 and Q5_1 GGML MMQ instances to the CUDA build and to the optional HIP prefill build. The existing Q8_0 draft-layer instance stays in both configurations. The port also reads expert tensors that cross GGUF shard boundaries, handles the Q5_0 PLE table and Q5_1 projections, and adds manual setup instructions. Checks on Windows with two NVIDIA L40S cards: - CUDA Release `strata` build passed with the option both `ON` and `OFF`. Both generated build graphs retain Q8_0; only `ON` adds the three new instances. - Focused pack tests: 8 passed, 1 Windows symlink test skipped. The existing BF16 pack byte-identity test passed. - Real GGUF parity: Q5_0 PLE, Q5_1 projection and native experts at layers 0, 5, 6, 20 and 47 passed. The HIP sources use the same CMake instance list. This machine has no ROCm toolchain or AMD GPU, so I could not compile or run the HIP build here. CMake stops at HIP compiler discovery (`Failed to find HIP root directory`). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:01:20 +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#2562
No description provided.