[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f1dktr0hjxqdud":3},{"slug":4,"category":5,"publishedAt":6,"titleZh":7,"titleEn":8,"summaryZh":9,"summaryEn":10,"models":11,"hardwares":12,"bodyZh":13,"bodyEn":14,"sourceName":15,"sourceUrl":16,"updatedAt":17},"llamacpp-b12208-topk-tie-determinism-2026-11-09","RUNTIME","2026-11-08T23:05:25.932Z","llama.cpp 修复 CUDA\u002FMetal Top-K 并列选择：可重复不等于跨后端一致","llama.cpp fixes tied Top-K selection on CUDA and Metal, not cross-backend equivalence","11月8日合并的 #31084 进入 b12208，处理并列阈值下线程调度影响选择的问题。修复有明确路径边界，不能据此承诺所有后端或整模型输出完全一致。","Merged November 8 and shipped in b12208, #31084 addresses scheduling-dependent selection at tied thresholds. Its scope does not guarantee identical whole-model output across backends.",[],[],"llama.cpp 于 11 月 8 日合并 #31084，并在当日发布的 b12208 中纳入 CUDA\u002FMetal radix Top-K 并列选择修复。本次新闻事件是合并与发版；PR 创建于更早时间，讨论里的旧测试也不冒充今日新实测。\n\n1. 同一模型重复运行不一致，不一定是采样。Top-K 需要从候选中选出指定数量。当最后几个名额对应的分数完全相等，旧实现可能由线程执行时序决定留下哪些位置。它影响的是内部选择算子，不能只靠固定随机种子解释或排除。对于依赖该选择的注意力索引路径，这会干扰改动前后的数值对照。\n\n2. 修复的是指定路径，不是全部推理。PR 将并列候选按列顺序处理，但正文仍明确：超过阈值部分的排列并非全部确定。CCCL 3.4.3 及更新版本下，一两行输入仍可能走 DeviceTopK，其并列选择仍不确定，测试会跳过该组合。不能把标题中的“确定性”扩写成所有后端、所有形状、所有输出都逐位相同。\n\n3. 同后端可重复，也不等于跨后端一致。讨论指出，接近但不相等的分数仍会受到舍入影响；不同后端选中项可能不同。作者与贡献者提供的算子测试、模型对照，各有自己的构建和范围。本文不转录旧速度表，不将局部算子耗时变化当成整模型吞吐提升，也不把贡献者验证当本站独立复现。\n\n部署判断很直接：升级后先在相同权重、模板、上下文和后端上重复运行，保留构建号与输出；重复性稳定后再做版本 A\u002FB。出现差异时，先区分采样、算子并列选择和后端数值变化。llama.cpp 的 MIT 许可不替代模型权重许可。当前确认的是一项有边界的复现性修复，而不是普遍的质量或速度保证。\n\n来源：https:\u002F\u002Fgithub.com\u002Fggml-org\u002Fllama.cpp\u002Fpull\u002F31084\n发布：https:\u002F\u002Fgithub.com\u002Fggml-org\u002Fllama.cpp\u002Freleases\u002Ftag\u002Fb12208","llama.cpp merged #31084 on November 8 and included it in b12208 that day. The new event is the merge and release; earlier discussion and measurements are not presented as new tests.\n\n1. Run-to-run variation is not always sampling. When more equal-valued candidates sit at a Top-K threshold than there are slots, thread scheduling can decide which positions survive. This concerns an internal selection operator, including attention-indexing use cases, rather than simply a random seed.\n\n2. The guarantee is path-specific. The change handles tied candidates in column order, but the PR explicitly does not make every ordering above the threshold deterministic. With CCCL 3.4.3 or newer, one or two input rows may still use DeviceTopK, whose tied selection remains nondeterministic; that combination is skipped by the test. This is not a promise of byte-identical whole-model output for every backend and shape.\n\n3. Repeatability within one backend is not equivalence across backends. Near ties can still be resolved differently because of rounding. Contributor checks and operator measurements have their own configurations. We do not turn historical operator timings into current model throughput, or describe contributor results as AraoAI replication.\n\nFor an upgrade, repeat the same workload with fixed weights, template, context and backend, retaining the exact build and outputs before comparing versions. Separate sampling, tied selection and numerical backend differences. The runtime's MIT license does not replace the model license. This release supplies a bounded repeatability fix, not a universal speed or quality guarantee.\n\nSource: https:\u002F\u002Fgithub.com\u002Fggml-org\u002Fllama.cpp\u002Fpull\u002F31084\nRelease: https:\u002F\u002Fgithub.com\u002Fggml-org\u002Fllama.cpp\u002Freleases\u002Ftag\u002Fb12208","llama.cpp GitHub PR 与发布页","https:\u002F\u002Fgithub.com\u002Fggml-org\u002Fllama.cpp\u002Fpull\u002F31084","2026-11-08T23:05:25.933Z"]