mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #280] [CLOSED] RoPE: every kernel reads the session's float64 angle table #2546
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#2546
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/280
Author: @sergqwer
Created: 9/30/2026
Status: ❌ Closed
Base:
main← Head:pr/rope-f64📝 Commits (1)
bfaae8dRoPE: every kernel reads the session's float64 angle table📊 Changes
5 files changed (+78 additions, -26 deletions)
View changed files
📝
include/strata/kernels/mrope.hpp(+35 -0)📝
src/core/layer.cpp(+3 -0)📝
src/kernels/cuda/native_qsa_indexer.cu(+14 -15)📝
src/kernels/cuda/native_rope.cu(+20 -6)📝
src/prefill/kernels.cu(+6 -5)📄 Description
Summary
Three RoPE implementations disagreed:
pos * powf(...)withcosf/sinfunder--use_fast_math: 0.0014 rad off at 32K, ~0.02 at 262K;rope_table_setnow registers that table per device (mrope.hpp), and every kernel reads it throughrope_cs, orcomputes in float64 past its end. A position then has the same angle on every path.
Measured
Measured on current main (0.1.29,
d6708a4) with ISTA-DASLab's IQ2_XS, RTX 5090 32 GB, Ryzen 9 9950X3D, 128 GB DDR5, Windows 11. KL is first-token KL divergence (STRATA_DUMP_FIRST_LOGITS, #276); two runs of main itself differ by 0 on 5 of 6 short prompts and by 0.00013 on the sixth.That is ~35x the run-to-run noise. Prompt and decode speed are unchanged (fork measurement).
Switch
STRATA_ROPE_LEGACY=1brings the old float angles back.🤖 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.