[PR #318] [CLOSED] iq_pack: store an F32 ple_conv1d as F16 #2569

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/318
Author: @cripto-bot
Created: 9/30/2026
Status: ❌ Closed

Base: main ← Head: iq-pack-ple-conv1d-f16


📝 Commits (1)

  • dde004c tools/iq_pack: store an F32 ple_conv1d as F16 (the PLE kernel reads F16)

📊 Changes

1 file changed (+4 additions, -0 deletions)

View changed files

📝 tools/iq_pack.py (+4 -0)

📄 Description

Reaching the same root cause as #303, independently, on a second sm_70 rig (Tesla V100) with the same artifact family (Unsloth Qwen3.8-Flash-Next-UD-IQ3_XXS).

blk.1.ple_conv1d.weight is F32 in that GGUF, but the PLE conv kernel consumes the tensor as F16 bits (ss.ple.w.conv1d_f16 = (const uint16_t*) wc->data). iq_pack passed the F32 source through as index kind 2 ("copy 4 bytes per element"), so the kernel read F32 bytes as packed F16, the conv output came out ~500x too large and every generated token was noise. The official GSQ-RCO artifacts ship this tensor as F16 (kind 5) and are unaffected - which is why the bundled tests (synthetic F16 weights) cannot see it.

This PR fixes the pack side: when the source is F32, convert to F16 (same nearest-even rounding as the existing BF16 path) and write kind 5 (81,920 bytes instead of 163,840). It does not help packs already built from an F32 source - the load-time re-round suggested in #303 covers those; the two are complementary.

Validated end to end on the V100 with the fixed pack: "The capital of France is" -> " Paris. The capital of Germany is Berlin..." (was "zocz6wedawyzadsowjhcwways w" before), 15-30 tok/s decode with MTP spec 4 (60-75% draft acceptance), ~40 tok/s prefill, and the repo's parity checks pass with this artifact's data.


🔄 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/318 **Author:** [@cripto-bot](https://github.com/cripto-bot) **Created:** 9/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `iq-pack-ple-conv1d-f16` --- ### 📝 Commits (1) - [`dde004c`](https://github.com/Niko1221/Strata/commit/dde004cea86f67f2127b7c61bd8276b5d1bba843) tools/iq_pack: store an F32 ple_conv1d as F16 (the PLE kernel reads F16) ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tools/iq_pack.py` (+4 -0) </details> ### 📄 Description Reaching the same root cause as #303, independently, on a second sm_70 rig (Tesla V100) with the same artifact family (Unsloth Qwen3.8-Flash-Next-UD-IQ3_XXS). `blk.1.ple_conv1d.weight` is F32 in that GGUF, but the PLE conv kernel consumes the tensor as F16 bits (`ss.ple.w.conv1d_f16 = (const uint16_t*) wc->data`). `iq_pack` passed the F32 source through as index kind 2 ("copy 4 bytes per element"), so the kernel read F32 bytes as packed F16, the conv output came out ~500x too large and every generated token was noise. The official GSQ-RCO artifacts ship this tensor as F16 (kind 5) and are unaffected - which is why the bundled tests (synthetic F16 weights) cannot see it. This PR fixes the pack side: when the source is F32, convert to F16 (same nearest-even rounding as the existing BF16 path) and write kind 5 (81,920 bytes instead of 163,840). It does not help packs already built from an F32 source - the load-time re-round suggested in #303 covers those; the two are complementary. Validated end to end on the V100 with the fixed pack: "The capital of France is" -> " Paris. The capital of Germany is Berlin..." (was "zocz6wedawyzadsowjhcwways w" before), 15-30 tok/s decode with MTP spec 4 (60-75% draft acceptance), ~40 tok/s prefill, and the repo's parity checks pass with this artifact's data. --- <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:26 +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#2569
No description provided.