Archived
sample_topk walked the whole vocabulary top_k times with one work-group a row (2.3 ms at 8 rows); each 4096-logit chunk now takes its own top k from registers and a row's merge takes the top k of those -- the same keys, the order being total. narrow and sample_pick stage a row's 1024 candidates (mostly pads) in local memory and compute the exps a lane each before the serial walk; logit_rerank spreads a candidate over up to 16 sub-groups (290 -> 72 us). Outputs unchanged (kbench; the same draft trajectory). Coupled MTP decode of a seeded code prompt 90.5 -> 98.3 tok/s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>