FAILURE MAP
← Case archive

FA-98421 / Token sampling filters / Open access

Token sampling: Eta cutoff compares log probability to a probability threshold · case 01

Eta cutoff compares log probability to a probability threshold.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Candidate log probability is compared directly with the positive probability cutoff.

THE FAILURE

Candidate log probability is compared directly with the positive probability cutoff.

Unsuccessful approach: The attempted repair uses only the absolute eta floor and omits the entropy-dependent cutoff term.

Case contract

Keep candidates with probability at least max(eta, sqrt(eta)*exp(-H)), where H is entropy; omit zero-mass tokens.

Why this case matters

A finite, deterministic token-selection contract isolates one decoding operation from model inference and runtime behavior.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(probabilities, eta):
    import math
    H=-sum(p*math.log(p) for p in probabilities.values() if p>0)
    threshold=max(eta,math.sqrt(eta)*math.exp(-H))
    return sorted(t for t,p in probabilities.items() if p>0 and math.log(p)>=threshold)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('eta floor',solve({'a':.7,'b':.2,'c':.1},.15),['a','b'])
check('equality retained',solve({'a':.5,'b':.5},.5),['a','b'])
check('empty',solve({},.2),[])
check('zero mass ignored',solve({'a':1.0,'z':0.0},.2),['a'])
check('one candidate',solve({'a':1.0},.9),['a'])
check('uniform candidates',solve({'a':.25,'b':.25,'c':.25,'d':.25},.01),['a','b','c','d'])
check('entropy cutoff active',solve({'a':.8,'b':.15,'c':.05},.01),['a','b'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
eta floor[]['a', 'b']Failed
equality retained[]['a', 'b']Failed
empty[][]Passed
zero mass ignored[]['a']Failed
one candidate[]['a']Failed
uniform candidates[]['a', 'b', 'c', 'd']Failed
entropy cutoff active[]['a', 'b']Failed

SHA-256 / 9ddf6066a113593e03ce111b10922e760d8cc9a526e359bc3af35318cce2cf57

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(probabilities, eta):
    import math
    H=-sum(p*math.log(p) for p in probabilities.values() if p>0)
    threshold=eta
    return sorted(t for t,p in probabilities.items() if p>=threshold and p>0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('eta floor',solve({'a':.7,'b':.2,'c':.1},.15),['a','b'])
check('equality retained',solve({'a':.5,'b':.5},.5),['a','b'])
check('empty',solve({},.2),[])
check('zero mass ignored',solve({'a':1.0,'z':0.0},.2),['a'])
check('one candidate',solve({'a':1.0},.9),['a'])
check('uniform candidates',solve({'a':.25,'b':.25,'c':.25,'d':.25},.01),['a','b','c','d'])
check('entropy cutoff active',solve({'a':.8,'b':.15,'c':.05},.01),['a','b'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
eta floor['a', 'b']['a', 'b']Passed
equality retained['a', 'b']['a', 'b']Passed
empty[][]Passed
zero mass ignored['a']['a']Passed
one candidate['a']['a']Passed
uniform candidates['a', 'b', 'c', 'd']['a', 'b', 'c', 'd']Passed
entropy cutoff active['a', 'b', 'c']['a', 'b']Failed

SHA-256 / 49bf05f1edb23e2dee4b25f904837d871a50a72c8ba17f434d8771ebde41680b

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

These are toy finite-vocabulary contracts with supplied scores, histories, and draws; they do not claim production model quality or compatibility. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-30T16:48:12.803713+00:00.

Case digest / 4ab3cdfe6f5d4f3a9edf8ef7b5c977a5f75623ed85b82c19e91b7cc5d2c4d6a3