mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2994
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1049
Author: @sergqwer
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:pr/q8_1-finite-fused📝 Commits (1)
69b3e95#606: the fused SwiGLU q8_1 quantizers keep the block's scale and sum finite too📊 Changes
3 files changed (+24 additions, -13 deletions)
View changed files
📝
src/kernels/cuda/iq_kernels.cu(+3 -3)📝
src/kernels/cuda/native_mmvq.cu(+3 -3)📝
src/kernels/iq_multi_parity.cpp(+18 -7)📄 Description
Replaces #838. GitHub closed it on 2026-10-05, when my fork was made private by mistake: that took the fork out of the network for good, so it can no longer open pull requests. This is the same branch and commit (
69b3e95), opened from a new fork; the discussion and the measurements are in #838.Completes the #606 clamp. 0.1.39 made two q8_1 activation quantizers keep the block's fp16 scale and sum finite:
q8_1_storein iq_kernels.cu andnative_quantize_q8_1_kernelin native_mmvq.cu. Two fused SwiGLU + q8_1 kernels still store the block raw:native_swiglu_quantize_q8_1_kernel(native_mmvq.cu:166-169)STRATA_FUSED_SWIGLU_Q81unset)native_gu_fused_kernel(iq_kernels.cu:2416-2420)STRATA_EXP_MODE=8(IQ types 18/21/22/23)Both now go through
q8_1_finite/q8_1_quant/q8_1_ds, the same three lines as their siblings. Every block that was finite before is stored bit for bit as before, so normal output does not change.rwkeyes found the first one in #606 but has no NVIDIA card to test it. The second one turned up in a sweep for
amax / 127.0fafter it; nothing else insrcstores a q8_1 block without the clamp now.Test
iq_multi_parity's #606 check now runsnative_swiglu_quantize_q8_1as a third path. It uses gate = 32 and up = x / 32:silu(32)is exactly 32 in float, so the fused kernel sees the same activations x as the other two paths and is held to the same expectations.RTX 5090, CUDA 13, sm_120:
The gfx906 kernel is not covered: I have no gfx906 card to run it on. Its change is the same three lines as
q8_1_storein the same file.Data point
On a fork of 0.1.39 (RTX 5090), a Qwen3.8-Flash-Next served conversation also turned into '!' (token 0) mid-thinking at about 99K positions, and later requests carrying that history kept producing it. Replaying the conversation up to that point did not reproduce it. So I cannot tie that run to this kernel; it is only the same symptom #606 describes, on a build that still had this store unclamped.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VZy1yKaDDiA8a7svdwaHio
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.