[PR #453] [CLOSED] feat(ds4): load GSQ-RCO GGUF and IQ4_NL Engram tables #532

Closed
opened 2026-10-29 21:26:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/453
Author: @Whamp
Created: 10/24/2026
Status: ❌ Closed

Base: main ← Head: ds4-gsq-loader-pr


📝 Commits (1)

  • 3b829c4 feat(ds4): load GSQ-RCO GGUF and IQ4_NL Engram tables

📊 Changes

17 files changed (+1589 additions, -91 deletions)

View changed files

📝 CMakeLists.txt (+10 -0)
➕ LICENSE.strata-gsq (+27 -0)
➕ src/ds4/ds4_engram_format.hpp (+50 -0)
📝 src/ds4/ds4_gguf.cu (+6 -0)
📝 src/ds4/ds4_gguf.cuh (+4 -4)
📝 src/ds4/ds4_gguf_cpu.hpp (+3 -0)
📝 src/ds4/ds4_iq.cu (+75 -5)
📝 src/ds4/ds4_iq.cuh (+4 -2)
📝 src/ds4/ds4_iq_cpu.cpp (+15 -0)
📝 src/ds4/ds4_kernels.cu (+26 -8)
📝 src/ds4/ds4_kernels.cuh (+6 -5)
📝 src/ds4/ds4_model.cu (+56 -32)
📝 tests/ds4_engram_ram.cpp (+6 -0)
📝 tests/ds4_gguf_test.cu (+70 -3)
➕ tests/ds4_gsq_formats_test.cpp (+111 -0)
📝 tools/ds4/pack_gguf.py (+332 -32)
➕ tools/test_ds4_gsq_pack.py (+788 -0)

📄 Description

Why

  • Load ISTA-DASLab's DeepSeek-V4.1-Flash-1017 GSQ-RCO IQ2_XXS checkpoint, including its separate IQ4_NL Engram tables, without a weight conversion or requantization.

Scope

  • Recover integer Engram hash tensors and metadata aliases; retain separate q/k gates and grouped attention-output tensors.
  • Preserve packed Q5_K dense/embedding weights and decode IQ4_NL Engram rows through both device entry points.
  • Add the required IQ2_XS expert dispatch. This part overlaps #357 and can be deduplicated if that lands first.
  • Keep the IQ1_M CPU optimization in #452 separate. No installer/download-menu, clock, power, or drafter-selection changes.
  • Retain Strata's MIT notice for the adapted format and metadata code.
Pinned IQ2_XXS checkpoint Current main This PR
Pack backbone plus adjacent Engram file Counts the Engram file as a fifth model shard Separates the four backbone shards from Engram
Pack explicit backbone shards Rejects engram_token_map.weight, ggml type 26 Recovers the hash metadata and references the original weights
Dense/Engram runtime path Missing Q5_K dense and IQ4_NL Engram wiring Loads those formats without requantization
python tools/ds4/pack_gguf.py --model /models/DeepSeek-GSQ-IQ2_XXS --out /models/DeepSeek-GSQ-IQ2_XXS/maya-ds4
# Keep all four backbone GGUFs and the shared Engram GGUF in that model folder.
# Keep the original GGUFs after packing; the pack refers to their weight bytes.

Limits

  • The exercised checkpoint is IQ2_XXS. Other GSQ allocations, model quality, AMD runtime behavior, and automatic DSpark setup are not established by this PR.
  • Four-RTX-3090 load/generation evidence and exact-branch numerical/pack checks are in the evidence bundle. This is a compatibility change, not a speed claim.

🔄 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/mw00/project-maya/pull/453 **Author:** [@Whamp](https://github.com/Whamp) **Created:** 10/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `ds4-gsq-loader-pr` --- ### 📝 Commits (1) - [`3b829c4`](https://github.com/mw00/project-maya/commit/3b829c46b1b61f05553439968cbfe5138a0ca20a) feat(ds4): load GSQ-RCO GGUF and IQ4_NL Engram tables ### 📊 Changes **17 files changed** (+1589 additions, -91 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+10 -0) ➕ `LICENSE.strata-gsq` (+27 -0) ➕ `src/ds4/ds4_engram_format.hpp` (+50 -0) 📝 `src/ds4/ds4_gguf.cu` (+6 -0) 📝 `src/ds4/ds4_gguf.cuh` (+4 -4) 📝 `src/ds4/ds4_gguf_cpu.hpp` (+3 -0) 📝 `src/ds4/ds4_iq.cu` (+75 -5) 📝 `src/ds4/ds4_iq.cuh` (+4 -2) 📝 `src/ds4/ds4_iq_cpu.cpp` (+15 -0) 📝 `src/ds4/ds4_kernels.cu` (+26 -8) 📝 `src/ds4/ds4_kernels.cuh` (+6 -5) 📝 `src/ds4/ds4_model.cu` (+56 -32) 📝 `tests/ds4_engram_ram.cpp` (+6 -0) 📝 `tests/ds4_gguf_test.cu` (+70 -3) ➕ `tests/ds4_gsq_formats_test.cpp` (+111 -0) 📝 `tools/ds4/pack_gguf.py` (+332 -32) ➕ `tools/test_ds4_gsq_pack.py` (+788 -0) </details> ### 📄 Description ## Why - Load ISTA-DASLab's DeepSeek-V4.1-Flash-1017 GSQ-RCO IQ2_XXS checkpoint, including its separate IQ4_NL Engram tables, without a weight conversion or requantization. ## Scope - Recover integer Engram hash tensors and metadata aliases; retain separate q/k gates and grouped attention-output tensors. - Preserve packed Q5_K dense/embedding weights and decode IQ4_NL Engram rows through both device entry points. - Add the required IQ2_XS expert dispatch. This part overlaps #357 and can be deduplicated if that lands first. - Keep the IQ1_M CPU optimization in #452 separate. No installer/download-menu, clock, power, or drafter-selection changes. - Retain Strata's MIT notice for the adapted format and metadata code. | Pinned IQ2_XXS checkpoint | Current main | This PR | |---|---|---| | Pack backbone plus adjacent Engram file | Counts the Engram file as a fifth model shard | Separates the four backbone shards from Engram | | Pack explicit backbone shards | Rejects `engram_token_map.weight`, ggml type 26 | Recovers the hash metadata and references the original weights | | Dense/Engram runtime path | Missing Q5_K dense and IQ4_NL Engram wiring | Loads those formats without requantization | ```sh python tools/ds4/pack_gguf.py --model /models/DeepSeek-GSQ-IQ2_XXS --out /models/DeepSeek-GSQ-IQ2_XXS/maya-ds4 # Keep all four backbone GGUFs and the shared Engram GGUF in that model folder. # Keep the original GGUFs after packing; the pack refers to their weight bytes. ``` ## Limits - The exercised checkpoint is IQ2_XXS. Other GSQ allocations, model quality, AMD runtime behavior, and automatic DSpark setup are not established by this PR. - Four-RTX-3090 load/generation evidence and exact-branch numerical/pack checks are in the [evidence bundle](https://gist.github.com/Whamp/c26749a235ee6fbeb4d6bca039293471). This is a compatibility change, not a speed claim. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:26:29 +07:00
Sign in to join this conversation.
No labels
pull-request
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
mw00/project-maya#532
No description provided.