FA-98121 / Sequence batch packing / Open access
Loss mask includes prompt tokens · case 01
Loss mask includes prompt tokens.
ROOT CAUSE
The mask treats every concatenated token as a prediction target.
THE FAILURE
The mask treats every concatenated token as a prediction target.
Unsuccessful approach: Shifting one boundary token from prompt to response corrupts supervision ownership.
Case contract
Concatenate prompt and response tokens; return a mask of zero for prompt positions and one for response positions.
Why this case matters
This deterministic toy packing rule models a common boundary in preparing bounded training sequences.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(prompt, response):
return prompt+response, [1]*(len(prompt)+len(response))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
p=[N,2*N]; r=[3*N]
check('one response', solve(p,r), (p+r,[0,0,1]))
check('long prompt', solve(list(range(N)),[9]), (list(range(N))+[9],[0]*N+[1]))
check('empty prompt', solve([],[N]), ([N],[1]))
check('empty response', solve([N],[]), ([N],[0]))
check('both empty', solve([],[]), ([],[]))
check('multiple response', solve([1],[2,3]), ([1,2,3],[0,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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| one response | [[1, 2, 3], [1, 1, 1]] | [[1, 2, 3], [0, 0, 1]] | Failed |
| long prompt | [[0, 9], [1, 1]] | [[0, 9], [0, 1]] | Failed |
| empty prompt | [[1], [1]] | [[1], [1]] | Passed |
| empty response | [[1], [1]] | [[1], [0]] | Failed |
| both empty | [[], []] | [[], []] | Passed |
| multiple response | [[1, 2, 3], [1, 1, 1]] | [[1, 2, 3], [0, 1, 1]] | Failed |
SHA-256 / 8f22aa2f58964e55daad627e7ddc530bf54e359216f0d77ebc98943135e83614
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(prompt, response):
return prompt+response, [0]*max(0,len(prompt)-1)+[1]*(len(response)+1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
p=[N,2*N]; r=[3*N]
check('one response', solve(p,r), (p+r,[0,0,1]))
check('long prompt', solve(list(range(N)),[9]), (list(range(N))+[9],[0]*N+[1]))
check('empty prompt', solve([],[N]), ([N],[1]))
check('empty response', solve([N],[]), ([N],[0]))
check('both empty', solve([],[]), ([],[]))
check('multiple response', solve([1],[2,3]), ([1,2,3],[0,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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| one response | [[1, 2, 3], [0, 1, 1]] | [[1, 2, 3], [0, 0, 1]] | Failed |
| long prompt | [[0, 9], [1, 1]] | [[0, 9], [0, 1]] | Failed |
| empty prompt | [[1], [1, 1]] | [[1], [1]] | Failed |
| empty response | [[1], [1]] | [[1], [0]] | Failed |
| both empty | [[], [1]] | [[], []] | Failed |
| multiple response | [[1, 2, 3], [1, 1, 1]] | [[1, 2, 3], [0, 1, 1]] | Failed |
SHA-256 / bb5ee3f6a30ff4c2dc06353c3591284bcd7ecdad9c67733f3c60745e8edd2a04
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
Inputs are short integer-token lists under the stated toy contract; results do not claim compatibility with a specific training framework. 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:09.757875+00:00.
Case digest / 427a1d5c4a59e6befce95c64dc69bc32cd304e5cde9965ff07f77f4eca2e7cf3