mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #131] [CLOSED] sampler92: the radix sampled path as one cheaper kernel pair, picks unchanged #356
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#356
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/mw00/project-maya/pull/131
Author: @handmade0octopus
Created: 10/12/2026
Status: ❌ Closed
Base:
main← Head:pr/sampler92📝 Commits (1)
21dda14sampler92: the radix sampled path as one cheaper kernel pair, picks unchanged📊 Changes
2 files changed (+315 additions, -34 deletions)
View changed files
📝
src/kernels/cuda/sampler.cu(+184 -34)➕
src/kernels/cuda/sampler_legacy.inc(+131 -0)📄 Description
What
The sampled chain ran as two kernels: one pass to pick the top-k, then a second pass applying top_p/temperature over a partial sort of the k survivors. Both passes re-read the whole vocabulary. This replaces the pair with cheaper kernels that keep the picks identical, and makes the fast path the default (
STRATA_GLM_SAMPLER92=0falls back to the old pair for an A/B).Numbers (Maya-S-v2-IQ2_XXS, one 4090 D, RAM-resident tiers)
Campaign protocol: 32,755-token prompt, 128 warm-up tokens, 2,048 measured on the fully cached prefix, temp 1.0 / top_p 0.95 / seed 734621, thinking max.
The gain is kernel-only, not stream luck: both builds produced the identical token stream (same seed; 2,048-token server generations and 256-token CLI generations match token for token), same tier attribution, same VRAM hit. Teacher-forced scoring (2,047 positions): nll 0.16356 / top-1 97.61% both before and after.
Verification
STRATA_GLM_SAMPLER92=0restores the old kernel pair (the fork's legacy kernel, kept assampler_legacy.inc, also picks identically to the fast path).Bench context: Ryzen 5 3600 CPU lane, 128 GB RAM, engine args
--glm-ram-resident --max-context 262144, no prefetch, PROMOTE_MIN=6, CPU plan000111222.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.