mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1047] [CLOSED] Adaptive tier: --adapt-decay outside (0, 1) is refused (inf counts, NaN swap gains) #2993
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#2993
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/1047
Author: @sergqwer
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:pr/adapt-decay-range📝 Commits (10+)
f4e96d5tests: gdn_rec_head also compares the PP (variant 4) and two-column (variant 5) recurrence kernels, bitwise16bc95aprefill: STRATA_HCD_EXACT=1 - the HC down projection by a WMMA kernel with hipBLASLt solution 1176/1177 k order (StaggerU included), bitwise502fcef#606: the fused SwiGLU q8_1 quantizers keep the block's scale and sum finite too64d0136cache: preserve checkpoints when split allocation failsa0d0056prefill: fused-expert exact wins (table16 via direct selector, float4 moe_combine, LDS alias + occupancy)5f5452bserve: park_current's try covers the checkpoint split too (#752): a host OOM skips parking8b19a38Layer split: --vram-reserve-later-mib, a separate reserve for the later cardsea83d0dResident RAM mode with a layer splitd2d981fsetup: the low-RAM mode's resident variant on several GPUs (#642)cd62e5eserve: a split's stage-0 GPU profile line keeps its text (#848); later stages say which stage📊 Changes
1 file changed (+8 additions, -1 deletions)
View changed files
📝
src/program/generate.cpp(+8 -1)📄 Description
Replaces #591. 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 (
8ef64e6), opened from a new fork; the discussion and the measurements are in #591.The range check from #407, alone on 0.1.38, as offered there. 0.1.38's
--adapt-decayaccepts any value.What goes wrong at 1 or more.
usageis multiplied by the decay after every adaptation, so with 1 or more the counts never shrink. At 2, an expert routed early in the conversation passesFLT_MAXafter 128 adaptations, which is about 128 verify rounds with--adapt-every 1or ~500 with the default 4. Then, inadapt:cand[i].first < vict[i].first + 1.5fis false for inf against inf, so the pair is pushed withgain = inf - inf = NaN.std::sort(swaps, gain > gain)then compares NaNs. That breaks the strict weak orderingstd::sortrequires, which is undefined behaviour.Measured on v0.1.38 (RTX 5090, IQ2_XS, fixed
--expert-cache 14900, a 1,000-token chat,--adapt-every 1, two runs each):--adapt-decayAt 2 the tier swapped 3.2x as many experts. Nothing visible broke in a run this short (same output both times, no crash), so the case for refusing is the undefined sort, not a measured failure.
The change: the flag parse refuses values outside (0, 1) with "--adapt-decay must be between 0 and 1 (exclusive)" and exit code 2 (checked with 1.5). Values inside the range behave as before.
🤖 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.