FAILURE MAP
← Case archive

FA-98726 / Model quantization arithmetic / Open access

Quantization: Symmetric quantization retains nonzero zero point · case 01

Symmetric quantization retains nonzero zero point.

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

ROOT CAUSE

Symmetric quantization uses signed range [-qmax,qmax], fixed zero point 0, and round-to-even after scale division.

THE FAILURE

Symmetric quantization uses signed range [-qmax,qmax], fixed zero point 0, and round-to-even after scale division.

Unsuccessful approach: The attempted code removes the nonzero zero point but truncates scaled values, so fractional codes remain wrong.

Case contract

Symmetric quantization uses signed range [-qmax,qmax], fixed zero point 0, and round-to-even after scale division. 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, zero, qmax):
    return [max(-qmax,min(qmax,round(x/scale)+zero)) for x in values]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('positive',solve([2*N],2,7,8),[N])
check('negative',solve([-2*N],2,7,8),[-N])
check('empty',solve([],1,4,8),[])
check('saturate high',solve([100],1,0,8),[8])
check('saturate low',solve([-100],1,0,8),[-8])
check('scale fraction',solve([3],2,0,8),[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 fixtureActualExpectedOutcome
positive[8][1]Failed
negative[6][-1]Failed
empty[][]Passed
saturate high[8][8]Passed
saturate low[-8][-8]Passed
scale fraction[2][2]Passed

SHA-256 / a63032ac32396643827b47104eb76d75e046060c1bd2cba9f105c6c6781c5e28

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(values, scale, zero, qmax):
    return [max(-qmax,min(qmax,int(x/scale))) for x in values]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('positive',solve([2*N],2,7,8),[N])
check('negative',solve([-2*N],2,7,8),[-N])
check('empty',solve([],1,4,8),[])
check('saturate high',solve([100],1,0,8),[8])
check('saturate low',solve([-100],1,0,8),[-8])
check('scale fraction',solve([3],2,0,8),[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 fixtureActualExpectedOutcome
positive[1][1]Passed
negative[-1][-1]Passed
empty[][]Passed
saturate high[8][8]Passed
saturate low[-8][-8]Passed
scale fraction[1][2]Failed

SHA-256 / b26e2168034dfce85d88dad81d175247955a4934d7fa9681ec6d6faa7af5e4f3

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.278129+00:00.

Case digest / 89d0417c78a1b5fb394bbf12491fc70462ee03374aab0aca654c2558728a4cf9