FA-98386 / Token sampling filters / Open access
Token sampling: Allowed probabilities sum below one when disallowed logits remain in the denominator · case 01
Allowed probabilities sum below one when disallowed logits remain in the denominator.
ROOT CAUSE
Normalization includes excluded vocabulary items before the allowlist is applied.
THE FAILURE
Normalization includes excluded vocabulary items before the allowlist is applied.
Unsuccessful approach: Selecting the allowed support but returning shifted exponentials without dividing by their sum leaves values unnormalized.
Case contract
Return normalized probabilities over only allowed tokens using a stable softmax; empty allowed support returns an empty mapping.
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(logits, allowed):
import math
m=max((logits[t] for t in allowed if t in logits),default=0); ex={t:math.exp(v-m) for t,v in logits.items()}; z=sum(ex.values())
return {t:ex[t]/z for t in allowed if t in ex}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('excluded mass removed',solve({'a':0.0,'b':0.0,'x':10.0},['a','b']),{'a':.5,'b':.5})
check('single allowed',solve({'a':N,'b':0.0},['b']),{'b':1.0})
check('no allowed',solve({'a':1.0},[]),{})
check('unknown allowlist',solve({'a':1.0},['z']),{})
check('stable large logits',solve({'a':1000.0,'b':1000.0},['a','b']),{'a':.5,'b':.5})
check('one candidate',solve({'x':-100.0},['x']),{'x':1.0})
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| excluded mass removed | {'a': 4.539580782951091e-05, 'b': 4.539580782951091e-05} | {'a': 0.5, 'b': 0.5} | Failed |
| single allowed | {'b': 0.2689414213699951} | {'b': 1.0} | Failed |
| no allowed | {} | {} | Passed |
| unknown allowlist | {} | {} | Passed |
| stable large logits | {'a': 0.5, 'b': 0.5} | {'a': 0.5, 'b': 0.5} | Passed |
| one candidate | {'x': 1.0} | {'x': 1.0} | Passed |
SHA-256 / fe86b1dd9ac8a7ed4558caac22cec8b6b57af94fb8e9e1f2620e39aa587df8a8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(logits, allowed):
import math
xs={t:v for t,v in logits.items() if t in allowed}
if not xs:return {}
m=max(xs.values()); ex={t:math.exp(v-m) for t,v in xs.items()}
return ex
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('excluded mass removed',solve({'a':0.0,'b':0.0,'x':10.0},['a','b']),{'a':.5,'b':.5})
check('single allowed',solve({'a':N,'b':0.0},['b']),{'b':1.0})
check('no allowed',solve({'a':1.0},[]),{})
check('unknown allowlist',solve({'a':1.0},['z']),{})
check('stable large logits',solve({'a':1000.0,'b':1000.0},['a','b']),{'a':.5,'b':.5})
check('one candidate',solve({'x':-100.0},['x']),{'x':1.0})
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| excluded mass removed | {'a': 1.0, 'b': 1.0} | {'a': 0.5, 'b': 0.5} | Failed |
| single allowed | {'b': 1.0} | {'b': 1.0} | Passed |
| no allowed | {} | {} | Passed |
| unknown allowlist | {} | {} | Passed |
| stable large logits | {'a': 1.0, 'b': 1.0} | {'a': 0.5, 'b': 0.5} | Failed |
| one candidate | {'x': 1.0} | {'x': 1.0} | Passed |
SHA-256 / 6055ee4240dacead91ecee5fc295f0abb3accc6134a4b9142ea7b9a4efc77a5e
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 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.370674+00:00.
Case digest / 5c1977239ef6d4add390b012d78ab7fd4647c33ac624fce0502576186a15989a