[PR #168] [CLOSED] hip: support Q2_K embeddings and type-aware PLE table rows #2487

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

📋 Pull Request Information

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

Base: main ← Head: pr-ple-types


📝 Commits (1)

  • 041f6ef hip: support Q2_K embeddings and type-aware PLE table rows

📊 Changes

9 files changed (+332 additions, -64 deletions)

View changed files

📝 CMakeLists.txt (+7 -0)
📝 include/strata/kernels/iq_kernels.hpp (+2 -0)
📝 include/strata/kernels/ngram.hpp (+19 -8)
📝 include/strata/ngram/ple_reader.hpp (+6 -4)
📝 src/core/native_head.cpp (+1 -1)
📝 src/kernels/cuda/iq_kernels.cu (+25 -3)
📝 src/kernels/ngram.cpp (+125 -32)
📝 src/ngram/ple_reader.cpp (+27 -16)
➕ tests/hip/q2k_embed_parity.cpp (+120 -0)

📄 Description

Extends the HIP/CUDA quant paths to cover more public checkpoints:

  • Bartowski's IQ2_XS uses Q2_K for token_embd.weight; add a GPU dequantizer and embedding gather, exposed through iq_dequant_supported() so it is accepted for embeddings but not silently treated as an MMVQ type.
  • The AD IQ4_XS-M64 checkpoint stores PLE table rows as Q5_1; make row decode type-aware for Q4_0 / IQ4_NL / Q5_1 with matching row-byte counts in PleReader and its row cache.
  • Add hip_q2k_embed_parity to exercise both synthetic and optional real IQ2_XS rows.

🔄 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/168 **Author:** [@samuelishida](https://github.com/samuelishida) **Created:** 9/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr-ple-types` --- ### 📝 Commits (1) - [`041f6ef`](https://github.com/Niko1221/Strata/commit/041f6ef68eccd72a7d628f44d7dfcd94148afe93) hip: support Q2_K embeddings and type-aware PLE table rows ### 📊 Changes **9 files changed** (+332 additions, -64 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+7 -0) 📝 `include/strata/kernels/iq_kernels.hpp` (+2 -0) 📝 `include/strata/kernels/ngram.hpp` (+19 -8) 📝 `include/strata/ngram/ple_reader.hpp` (+6 -4) 📝 `src/core/native_head.cpp` (+1 -1) 📝 `src/kernels/cuda/iq_kernels.cu` (+25 -3) 📝 `src/kernels/ngram.cpp` (+125 -32) 📝 `src/ngram/ple_reader.cpp` (+27 -16) ➕ `tests/hip/q2k_embed_parity.cpp` (+120 -0) </details> ### 📄 Description Extends the HIP/CUDA quant paths to cover more public checkpoints: - Bartowski's IQ2_XS uses Q2_K for `token_embd.weight`; add a GPU dequantizer and embedding gather, exposed through `iq_dequant_supported()` so it is accepted for embeddings but not silently treated as an MMVQ type. - The AD IQ4_XS-M64 checkpoint stores PLE table rows as Q5_1; make row decode type-aware for Q4_0 / IQ4_NL / Q5_1 with matching row-byte counts in `PleReader` and its row cache. - Add `hip_q2k_embed_parity` to exercise both synthetic and optional real IQ2_XS rows. --- <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:37 +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#2487
No description provided.