Skip to content

common: record NaN logits instead of only aborting, with opt-in continuation (engine#315) -> pinned line - #94

Merged
bong-water-water-bong merged 3 commits into
1bit/hrx-vulkan-patchedfrom
1bit/cxx26-ci
Oct 6, 2026
Merged

bong-water-water-bong merged 3 commits into
1bit/hrx-vulkan-patchedfrom
1bit/cxx26-ci

Conversation

@bong-water-water-bong

Copy link
Copy Markdown

Brings the engine#315 fix onto 1bit/hrx-vulkan-patched, the branch the engine pins (third_party/llama.cpp), following the same cxx26-ci -> patched route as #92.

#93 merged the fix into 1bit/cxx26-ci, but the engine pins hrx-vulkan-patched, and hrx-vulkan-patched ... 4d13516f is diverged (ahead=1, behind=2) — so the fix was not on the pinned line and could not have reached a release.

Contents: exactly one file, common/sampling.cpp +34/-2 — record the NaN count/index-range/contiguity instead of only aborting, plus opt-in GGML_HRX_NAN_CONTINUE (substitutes -inf) so long generation runs survive instead of dying. Off by default; no behaviour change unless the env var is set.

Root cause is not closed by #90 — the pin already contained #90 and ZAYA1-8B still lost an entire Markovian evaluation (0/30 recorded) to this. Refs engine#315.

bong-water-water-bong and others added 3 commits October 5, 2026 21:54
…nuation

engine#315 measured 1 fault in 5 runs on GLM-4.7-Flash and killed a full
ZAYA1-8B evaluation with 0 of 30 problems recorded. The guard below refuses to
sample a silently-wrong token, which is correct, but it aborts on the FIRST NaN
-- so the run and the evidence die together, and every recorded occurrence so
far reports only 'vocab index 0'.

Measure the corruption before acting on it: count, index range, and whether the
run is contiguous. That is the discriminator between a migrated/torn page and a
single bad element, and it is the fact an earlier probe could not obtain.

With GGML_HRX_NAN_CONTINUE set, substitute -inf for the NaN entries and
continue. -inf makes those entries unsampleable -- exactly what masking already
uses -- while leaving the rest of the distribution intact, so a long evaluation
completes instead of dying at the first fault. Off by default, so the guard's
existing behaviour is unchanged unless an operator asks for it.
common: record NaN logits instead of only aborting, with opt-in continuation (engine#315)
@bong-water-water-bong
bong-water-water-bong merged commit b04c4e9 into 1bit/hrx-vulkan-patched Oct 6, 2026
6 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant