FAILURE MAP
← Case archive

FA-100651 / Speculative decoding bookkeeping / Open access

Decoding: Rejected draft tokens inflate the accepted token total · case 01

Rejected draft tokens inflate the accepted token total.

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

ROOT CAUSE

The whole proposal is charged as accepted.

THE FAILURE

The whole proposal is charged as accepted.

Unsuccessful approach: Clamping only to the draft length still accepts tokens beyond the verified prefix.

Case contract

For a proposed draft and reported accepted-prefix count k, clamp k to [0, len(draft)] and return that normalized committed count.

Why this case matters

A self-contained bookkeeping model makes prefix and token-count semantics observable without a model runtime.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(draft, k):
    return len(draft)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('partial prefix', solve(list(range(N+3)),N),N)
check('none accepted', solve([1,2],0),0)
check('all accepted', solve([1,2],2),2)
check('empty proposal', solve([],0),0)
check('clamp oversized count', solve([1],N+4),1)
check('negative count clamps', solve([1,2],-2),0)
check('singleton accepted', solve([N],1),1)
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
partial prefix41Failed
none accepted20Failed
all accepted22Passed
empty proposal00Passed
clamp oversized count11Passed
negative count clamps20Failed
singleton accepted11Passed

SHA-256 / 502ea815a53199fabe675d5757743a8247c0c19043ac546cd5ad0b728fa99ab4

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(draft, k):
    return min(k+1,len(draft))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('partial prefix', solve(list(range(N+3)),N),N)
check('none accepted', solve([1,2],0),0)
check('all accepted', solve([1,2],2),2)
check('empty proposal', solve([],0),0)
check('clamp oversized count', solve([1],N+4),1)
check('negative count clamps', solve([1,2],-2),0)
check('singleton accepted', solve([N],1),1)
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
partial prefix21Failed
none accepted10Failed
all accepted22Passed
empty proposal00Passed
clamp oversized count11Passed
negative count clamps-10Failed
singleton accepted11Passed

SHA-256 / 3fd989102235b7af43357a2b11745504d666e2028b9456a45b77efc54b7fd59a

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 finite toy sequences with explicit contracts; they make no claim about production decoder behavior or model quality. 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:38.099274+00:00.

Case digest / 7a334ba09ed185e28c36c93a17a5539017661e7ef1258def50499c364a2fcb02