[PR #722] [CLOSED] Add Hadamard-INT2 GGUF support #2789

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/722
Author: @SaibaWaipu
Created: 10/4/2026
Status: ❌ Closed

Base: main ← Head: codex/hadamard-int2


📝 Commits (6)

  • 904432e Add Hadamard INT2 GGUF converter and spec
  • d95df80 Add Hadamard-INT2 native pack support
  • 2dd00c6 Add Hadamard-INT2 CUDA and prefill paths
  • ca0c90b Document Hadamard-INT2 runtime workflow
  • 1ca52e1 Validate Hadamard expert sets before conversion
  • 25de9ab Specify Hadamard-INT2 metadata and fitting

📊 Changes

18 files changed (+1268 additions, -65 deletions)

View changed files

📝 README.md (+6 -0)
➕ docs/HADAMARD_INT2.md (+150 -0)
📝 include/strata/artifact/gguf_reader.hpp (+7 -1)
📝 include/strata/kernels/cpu/expert_layout.hpp (+7 -6)
📝 include/strata/kernels/cpu/native_expert.hpp (+11 -11)
📝 include/strata/kernels/iq_kernels.hpp (+14 -3)
📝 src/core/expert_source.cpp (+27 -0)
📝 src/core/peer_experts.cpp (+6 -2)
📝 src/core/remote_experts.cpp (+6 -2)
📝 src/core/verify.cpp (+12 -4)
📝 src/kernels/cpu/expert_layout.cpp (+16 -2)
📝 src/kernels/cpu/native_expert.cpp (+105 -22)
📝 src/kernels/cuda/iq_kernels.cu (+255 -3)
📝 src/prefill/prefill.cpp (+20 -4)
➕ tools/convert_hadamard_int2_gguf.py (+428 -0)
📝 tools/gguf_reader.py (+19 -2)
➕ tools/hadamard_int2.py (+144 -0)
📝 tools/iq_pack.py (+35 -3)

📄 Description

Summary

  • Add a Hadamard-INT2 GGUF converter, reference codec, and format documentation, including metadata and expert-set validation.
  • Add native packed-expert support with CPU and CUDA decode paths, plus Hadamard handling in prefill.
  • Update GGUF tooling and document the runtime workflow.

Validation

  • Built the CPU target and strata-gguf.
  • Ran synthetic single-shard and three-shard GGUF checks covering F16/BF16/F32 inputs, metadata and alignment, preservation of non-target payloads, importance matrices, transform dot invariance, and invalid inputs.
  • CUDA was not compiled or runtime-tested because a CUDA toolchain was unavailable. Real-model quality and performance were not evaluated.

🔄 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/722 **Author:** [@SaibaWaipu](https://github.com/SaibaWaipu) **Created:** 10/4/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/hadamard-int2` --- ### 📝 Commits (6) - [`904432e`](https://github.com/Niko1221/Strata/commit/904432e457428924b988f7a38d751ea4d8789d9e) Add Hadamard INT2 GGUF converter and spec - [`d95df80`](https://github.com/Niko1221/Strata/commit/d95df80b0173e4b8e6e20294ba63c80262062ef3) Add Hadamard-INT2 native pack support - [`2dd00c6`](https://github.com/Niko1221/Strata/commit/2dd00c67d073d47c5b59b41f6d05e6012489bcb9) Add Hadamard-INT2 CUDA and prefill paths - [`ca0c90b`](https://github.com/Niko1221/Strata/commit/ca0c90bceb2bdcedcaf96b5275e3449f7727237e) Document Hadamard-INT2 runtime workflow - [`1ca52e1`](https://github.com/Niko1221/Strata/commit/1ca52e1b2dfc44ed446cef58fe20e6f3083e4ef9) Validate Hadamard expert sets before conversion - [`25de9ab`](https://github.com/Niko1221/Strata/commit/25de9ab6668461b43701860a10638ed496147796) Specify Hadamard-INT2 metadata and fitting ### 📊 Changes **18 files changed** (+1268 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+6 -0) ➕ `docs/HADAMARD_INT2.md` (+150 -0) 📝 `include/strata/artifact/gguf_reader.hpp` (+7 -1) 📝 `include/strata/kernels/cpu/expert_layout.hpp` (+7 -6) 📝 `include/strata/kernels/cpu/native_expert.hpp` (+11 -11) 📝 `include/strata/kernels/iq_kernels.hpp` (+14 -3) 📝 `src/core/expert_source.cpp` (+27 -0) 📝 `src/core/peer_experts.cpp` (+6 -2) 📝 `src/core/remote_experts.cpp` (+6 -2) 📝 `src/core/verify.cpp` (+12 -4) 📝 `src/kernels/cpu/expert_layout.cpp` (+16 -2) 📝 `src/kernels/cpu/native_expert.cpp` (+105 -22) 📝 `src/kernels/cuda/iq_kernels.cu` (+255 -3) 📝 `src/prefill/prefill.cpp` (+20 -4) ➕ `tools/convert_hadamard_int2_gguf.py` (+428 -0) 📝 `tools/gguf_reader.py` (+19 -2) ➕ `tools/hadamard_int2.py` (+144 -0) 📝 `tools/iq_pack.py` (+35 -3) </details> ### 📄 Description ## Summary - Add a Hadamard-INT2 GGUF converter, reference codec, and format documentation, including metadata and expert-set validation. - Add native packed-expert support with CPU and CUDA decode paths, plus Hadamard handling in prefill. - Update GGUF tooling and document the runtime workflow. ## Validation - Built the CPU target and `strata-gguf`. - Ran synthetic single-shard and three-shard GGUF checks covering F16/BF16/F32 inputs, metadata and alignment, preservation of non-target payloads, importance matrices, transform dot invariance, and invalid inputs. - CUDA was not compiled or runtime-tested because a CUDA toolchain was unavailable. Real-model quality and performance were not evaluated. --- <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:08 +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#2789
No description provided.