FA-98736 / Model quantization arithmetic / Open access
Quantization: Tensor scale is selected from the first value · case 01
Tensor scale is selected from the first value.
ROOT CAUSE
All values in one tensor share the supplied positive scalar scale; divide and round-to-even.
THE FAILURE
All values in one tensor share the supplied positive scalar scale; divide and round-to-even.
Unsuccessful approach: The attempted code uses the supplied shared scale but truncates fractional results instead of rounding to nearest-even.
Case contract
All values in one tensor share the supplied positive scalar scale; divide and round-to-even. Inputs follow this explicit integer toy contract; ties use Python round-to-even where rounding is required.
Why this case matters
This deterministic model isolates one quantization arithmetic contract from tensor storage and runtime kernels.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(values, scale):
return [round(x/values[0]) for x in values] if values else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('same scale applied',solve([2*N,4*N],2),[N,2*N])
check('empty',solve([],3),[])
check('singleton',solve([6],3),[2])
check('different magnitudes',solve([3,9],3),[1,3])
check('negative',solve([-6,3],3),[-2,1])
check('fraction rounding',solve([3,5],2),[2,2])
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 |
|---|---|---|---|
| same scale applied | [1, 2] | [1, 2] | Passed |
| empty | [] | [] | Passed |
| singleton | [1] | [2] | Failed |
| different magnitudes | [1, 3] | [1, 3] | Passed |
| negative | [1, 0] | [-2, 1] | Failed |
| fraction rounding | [1, 2] | [2, 2] | Failed |
SHA-256 / d1a73868d24316d22f45a779189f6c4ca87c313b47b16dbb08e036563a179961
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(values, scale):
return [int(x/scale) for x in values]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('same scale applied',solve([2*N,4*N],2),[N,2*N])
check('empty',solve([],3),[])
check('singleton',solve([6],3),[2])
check('different magnitudes',solve([3,9],3),[1,3])
check('negative',solve([-6,3],3),[-2,1])
check('fraction rounding',solve([3,5],2),[2,2])
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 |
|---|---|---|---|
| same scale applied | [1, 2] | [1, 2] | Passed |
| empty | [] | [] | Passed |
| singleton | [2] | [2] | Passed |
| different magnitudes | [1, 3] | [1, 3] | Passed |
| negative | [-2, 1] | [-2, 1] | Passed |
| fraction rounding | [1, 2] | [2, 2] | Failed |
SHA-256 / 5045c2bcfbf3efe586dfbd91e16560ef10a294a220dc40bba37da589bd87e5a3
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
Toy scalar/list arithmetic only; it does not model a production quantizer, hardware instruction, or accuracy/performance gain. 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:16.277514+00:00.
Case digest / b51de4a3bee545504d2d3c2c01c2722d31ac16f9e730069a20612eab227ef5a6