FA-98376 / Token sampling filters / Open access
Token sampling: Presence penalty scales with repeated history count · case 01
Presence penalty scales with repeated history count.
ROOT CAUSE
Penalty magnitude is multiplied by occurrence count instead of recording a one-time presence.
THE FAILURE
Penalty magnitude is multiplied by occurrence count instead of recording a one-time presence.
Unsuccessful approach: Dropping tokens whose history count exceeds one loses valid scored candidates.
Case contract
Subtract penalty exactly once from each scored token appearing at least once in history; other scores are unchanged.
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(scores, history, penalty):
from collections import Counter
c=Counter(history)
return {t:v-penalty*c[t] for t,v in scores.items()}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('duplicate history',solve({'a':5.0,'b':2.0},['a']*(N+1),1.5),{'a':3.5,'b':2.0})
check('single occurrence',solve({'a':N},['a'],2),{'a':N-2})
check('empty history',solve({'a':N},[],2),{'a':N})
check('unknown history token',solve({'a':2.0},['z','z'],1),{'a':2.0})
check('negative penalty',solve({'a':1.0},['a'], -2),{'a':3.0})
check('multiple ids',solve({'a':4.0,'b':3.0},['b','b','a'],1),{'a':3.0,'b':2.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 |
|---|---|---|---|
| duplicate history | {'a': 2.0, 'b': 2.0} | {'a': 3.5, 'b': 2.0} | Failed |
| single occurrence | {'a': -1} | {'a': -1} | Passed |
| empty history | {'a': 1} | {'a': 1} | Passed |
| unknown history token | {'a': 2.0} | {'a': 2.0} | Passed |
| negative penalty | {'a': 3.0} | {'a': 3.0} | Passed |
| multiple ids | {'a': 3.0, 'b': 1.0} | {'a': 3.0, 'b': 2.0} | Failed |
SHA-256 / 12d646bb57c3bf57a395d295cad8afeb32505390dcf9d201778d4464d22fe2e3
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(scores, history, penalty):
return {t:v-(penalty if t in history else 0) for t,v in scores.items() if t not in history or history.count(t)==1}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('duplicate history',solve({'a':5.0,'b':2.0},['a']*(N+1),1.5),{'a':3.5,'b':2.0})
check('single occurrence',solve({'a':N},['a'],2),{'a':N-2})
check('empty history',solve({'a':N},[],2),{'a':N})
check('unknown history token',solve({'a':2.0},['z','z'],1),{'a':2.0})
check('negative penalty',solve({'a':1.0},['a'], -2),{'a':3.0})
check('multiple ids',solve({'a':4.0,'b':3.0},['b','b','a'],1),{'a':3.0,'b':2.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 |
|---|---|---|---|
| duplicate history | {'b': 2.0} | {'a': 3.5, 'b': 2.0} | Failed |
| single occurrence | {'a': -1} | {'a': -1} | Passed |
| empty history | {'a': 1} | {'a': 1} | Passed |
| unknown history token | {'a': 2.0} | {'a': 2.0} | Passed |
| negative penalty | {'a': 3.0} | {'a': 3.0} | Passed |
| multiple ids | {'a': 3.0} | {'a': 3.0, 'b': 2.0} | Failed |
SHA-256 / ded05def9377e8cef083c0034a25bb402aed79a57da9059393dc0e8f886f9555
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.371227+00:00.
Case digest / efe85056d1b9a98cf0200681e7ace12146a5ae6edec22593f9053690c864d8dc