AI Grounds
Open AI Grounds on a desktop
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
AI Grounds
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
Guided discovery
Share a scale. Round a value. Inspect the cost.
Synthetic blocks, not trained-model measurements. This toy uses unsigned 4-bit codes 0–15 (uint4); signed int4 uses −8..7. Reconstructed real values can be negative through the zero-point offset.
Auto is a fixed demonstration preset, not an automatic sample-min/max estimate. All presets round calibration endpoints to 0.001. Clamping limits a code to 0–15 by choosing the closest boundary.
Calibration min
Calibration max
Scale s
Zero point z
16 codes = 15 gaps · s = (max − min) / 15 · z = clamp(round(−min/s), 0, 15)
Probe bounds -0.223 to +0.203 stay fixed across this block’s presets. The probe does not change the 102 fixed block samples. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
Three rows share the same real-number scale, including sources beyond the levels. The top row has all 16 reconstructed levels; code 8 represents zero. The dot is x, the square is x̂. Exact positions have no minimum drawn error.
Reconstructed endpoints: code 0 = -0.16000 · code 15 = +0.14000
These can differ from calibration min/max after the zero point rounds to an integer. Each unclamped rounded code has an error bound s/2 = 0.01000. The bound does not apply to clamped values.
q = clamp(round(x/s) + z, 0, 15) · x̂ = s(q − z) · error = x̂ − x
Raw code was not clamped. Round nearest, with half ties toward +∞ (for example −2.5 → −2). Authored decimal inputs are treated exactly for this tie decision; ONNX uses ties-to-even instead.
Input cell after clamping: +0.05000 ≤ x < +0.07000. Endpoint codes include arbitrarily far tails; not every input assigned an endpoint code was clamped. This describes the mathematical decimal rule, beyond the bounded inspector.
Average |x̂ − x| across the 102 fixed samples, including clamped samples.
0.00560
Σ absolute error / sample count
Changing only the separate probe leaves this unchanged.
Samples whose rounded raw code falls below 0 or above 15.
3 / 102
2.94%
This is different from merely lying outside calibration endpoints, or being assigned code 0/15.
A nibble is 4 bits; a byte is 8. The first code occupies the high nibble, the fixed second code 6 the low nibble. This pair is a packing demonstration, not two selected block samples.
11 = 1011 · fixed 6 = 0110 → 0xB6 (10110110, one byte)
Codes alone: 32-bit FP32 → 4-bit payload = 8× reduction. Illustrative block format: 51 payload bytes + 4-byte FP32 scale + 1-byte zero point = 56 bytes, versus 408 FP32 bytes (7.29×). An odd sample count pads the last half-byte; real formats can add alignment, containers or other metadata. This does not measure model accuracy or speed.
Bars use a common 0–100% scale of all 102 samples. Zero-count codes have zero width. The final column counts genuinely clamped samples, not every boundary assignment.
| Code | Reconstructed level | Count / share of block | Clamped count |
|---|---|---|---|
| 0 | -0.16000 | 2 / 1.96% | 2 |
| 1 | -0.14000 | 0 / 0.00% | 0 |
| 2 | -0.12000 | 2 / 1.96% | 0 |
| 3 | -0.10000 | 4 / 3.92% | 0 |
| 4 | -0.08000 | 4 / 3.92% | 0 |
| 5 | -0.06000 | 5 / 4.90% | 0 |
| 6 | -0.04000 | 9 / 8.82% | 0 |
| 7 | -0.02000 | 20 / 19.61% | 0 |
| 8 | 0.00000 | 20 / 19.61% | 0 |
| 9 | +0.02000 | 15 / 14.71% | 0 |
| 10 | +0.04000 | 9 / 8.82% | 0 |
| 11 · Probe code | +0.06000 | 4 / 3.92% | 0 |
| 12 | +0.08000 | 2 / 1.96% | 0 |
| 13 | +0.10000 | 4 / 3.92% | 0 |
| 14 | +0.12000 | 0 / 0.00% | 0 |
| 15 | +0.14000 | 2 / 1.96% | 1 |
Every original occurrence is retained, including repeated synthetic values. This is the fixed dataset used by the block error summaries.
| Sample | Original x | Rounded offset | Raw code | Stored q | Reconstructed | Error | Clamped? |
|---|---|---|---|---|---|---|---|
| 1 | -0.19000 | -9 | -1 | 0 | -0.16000 | +0.03000 | Yes |
| 2 | -0.17480 | -9 | -1 | 0 | -0.16000 | +0.01480 | Yes |
| 3 | -0.12040 | -6 | 2 | 2 | -0.12000 | +0.00040 | No |
| 4 | -0.12040 | -6 | 2 | 2 | -0.12000 | +0.00040 | No |
| 5 | -0.10530 | -5 | 3 | 3 | -0.10000 | +0.00530 | No |
| 6 | -0.10530 | -5 | 3 | 3 | -0.10000 | +0.00530 | No |
| 7 | -0.09030 | -5 | 3 | 3 | -0.10000 | -0.00970 | No |
| 8 | -0.09030 | -5 | 3 | 3 | -0.10000 | -0.00970 | No |
| 9 | -0.07950 | -4 | 4 | 4 | -0.08000 | -0.00050 | No |
| 10 | -0.07950 | -4 | 4 | 4 | -0.08000 | -0.00050 | No |
| 11 | -0.07090 | -4 | 4 | 4 | -0.08000 | -0.00910 | No |
| 12 | -0.07090 | -4 | 4 | 4 | -0.08000 | -0.00910 | No |
| 13 | -0.06230 | -3 | 5 | 5 | -0.06000 | +0.00230 | No |
| 14 | -0.06230 | -3 | 5 | 5 | -0.06000 | +0.00230 | No |
| 15 | -0.05370 | -3 | 5 | 5 | -0.06000 | -0.00630 | No |
| 16 | -0.05370 | -3 | 5 | 5 | -0.06000 | -0.00630 | No |
| 17 | -0.05370 | -3 | 5 | 5 | -0.06000 | -0.00630 | No |
| 18 | -0.04510 | -2 | 6 | 6 | -0.04000 | +0.00510 | No |
| 19 | -0.04510 | -2 | 6 | 6 | -0.04000 | +0.00510 | No |
| 20 | -0.04510 | -2 | 6 | 6 | -0.04000 | +0.00510 | No |
| 21 | -0.03870 | -2 | 6 | 6 | -0.04000 | -0.00130 | No |
| 22 | -0.03870 | -2 | 6 | 6 | -0.04000 | -0.00130 | No |
| 23 | -0.03870 | -2 | 6 | 6 | -0.04000 | -0.00130 | No |
| 24 | -0.03350 | -2 | 6 | 6 | -0.04000 | -0.00650 | No |
| 25 | -0.03350 | -2 | 6 | 6 | -0.04000 | -0.00650 | No |
| 26 | -0.03350 | -2 | 6 | 6 | -0.04000 | -0.00650 | No |
| 27 | -0.02840 | -1 | 7 | 7 | -0.02000 | +0.00840 | No |
| 28 | -0.02840 | -1 | 7 | 7 | -0.02000 | +0.00840 | No |
| 29 | -0.02840 | -1 | 7 | 7 | -0.02000 | +0.00840 | No |
| 30 | -0.02840 | -1 | 7 | 7 | -0.02000 | +0.00840 | No |
| 31 | -0.02370 | -1 | 7 | 7 | -0.02000 | +0.00370 | No |
| 32 | -0.02370 | -1 | 7 | 7 | -0.02000 | +0.00370 | No |
| 33 | -0.02370 | -1 | 7 | 7 | -0.02000 | +0.00370 | No |
| 34 | -0.02370 | -1 | 7 | 7 | -0.02000 | +0.00370 | No |
| 35 | -0.01890 | -1 | 7 | 7 | -0.02000 | -0.00110 | No |
| 36 | -0.01890 | -1 | 7 | 7 | -0.02000 | -0.00110 | No |
| 37 | -0.01890 | -1 | 7 | 7 | -0.02000 | -0.00110 | No |
| 38 | -0.01890 | -1 | 7 | 7 | -0.02000 | -0.00110 | No |
| 39 | -0.01460 | -1 | 7 | 7 | -0.02000 | -0.00540 | No |
| 40 | -0.01460 | -1 | 7 | 7 | -0.02000 | -0.00540 | No |
| 41 | -0.01460 | -1 | 7 | 7 | -0.02000 | -0.00540 | No |
| 42 | -0.01460 | -1 | 7 | 7 | -0.02000 | -0.00540 | No |
| 43 | -0.01030 | -1 | 7 | 7 | -0.02000 | -0.00970 | No |
| 44 | -0.01030 | -1 | 7 | 7 | -0.02000 | -0.00970 | No |
| 45 | -0.01030 | -1 | 7 | 7 | -0.02000 | -0.00970 | No |
| 46 | -0.01030 | -1 | 7 | 7 | -0.02000 | -0.00970 | No |
| 47 | -0.00640 | 0 | 8 | 8 | 0.00000 | +0.00640 | No |
| 48 | -0.00640 | 0 | 8 | 8 | 0.00000 | +0.00640 | No |
| 49 | -0.00640 | 0 | 8 | 8 | 0.00000 | +0.00640 | No |
| 50 | -0.00640 | 0 | 8 | 8 | 0.00000 | +0.00640 | No |
| 51 | -0.00340 | 0 | 8 | 8 | 0.00000 | +0.00340 | No |
| 52 | -0.00340 | 0 | 8 | 8 | 0.00000 | +0.00340 | No |
| 53 | -0.00340 | 0 | 8 | 8 | 0.00000 | +0.00340 | No |
| 54 | -0.00340 | 0 | 8 | 8 | 0.00000 | +0.00340 | No |
| 55 | 0.00000 | 0 | 8 | 8 | 0.00000 | 0.00000 | No |
| 56 | 0.00000 | 0 | 8 | 8 | 0.00000 | 0.00000 | No |
| 57 | 0.00000 | 0 | 8 | 8 | 0.00000 | 0.00000 | No |
| 58 | 0.00000 | 0 | 8 | 8 | 0.00000 | 0.00000 | No |
| 59 | +0.00340 | 0 | 8 | 8 | 0.00000 | -0.00340 | No |
| 60 | +0.00340 | 0 | 8 | 8 | 0.00000 | -0.00340 | No |
| 61 | +0.00340 | 0 | 8 | 8 | 0.00000 | -0.00340 | No |
| 62 | +0.00340 | 0 | 8 | 8 | 0.00000 | -0.00340 | No |
| 63 | +0.00690 | 0 | 8 | 8 | 0.00000 | -0.00690 | No |
| 64 | +0.00690 | 0 | 8 | 8 | 0.00000 | -0.00690 | No |
| 65 | +0.00690 | 0 | 8 | 8 | 0.00000 | -0.00690 | No |
| 66 | +0.00690 | 0 | 8 | 8 | 0.00000 | -0.00690 | No |
| 67 | +0.01070 | 1 | 9 | 9 | +0.02000 | +0.00930 | No |
| 68 | +0.01070 | 1 | 9 | 9 | +0.02000 | +0.00930 | No |
| 69 | +0.01070 | 1 | 9 | 9 | +0.02000 | +0.00930 | No |
| 70 | +0.01070 | 1 | 9 | 9 | +0.02000 | +0.00930 | No |
| 71 | +0.01500 | 1 | 9 | 9 | +0.02000 | +0.00500 | No |
| 72 | +0.01500 | 1 | 9 | 9 | +0.02000 | +0.00500 | No |
| 73 | +0.01500 | 1 | 9 | 9 | +0.02000 | +0.00500 | No |
| 74 | +0.01500 | 1 | 9 | 9 | +0.02000 | +0.00500 | No |
| 75 | +0.01980 | 1 | 9 | 9 | +0.02000 | +0.00020 | No |
| 76 | +0.01980 | 1 | 9 | 9 | +0.02000 | +0.00020 | No |
| 77 | +0.01980 | 1 | 9 | 9 | +0.02000 | +0.00020 | No |
| 78 | +0.01980 | 1 | 9 | 9 | +0.02000 | +0.00020 | No |
| 79 | +0.02490 | 1 | 9 | 9 | +0.02000 | -0.00490 | No |
| 80 | +0.02490 | 1 | 9 | 9 | +0.02000 | -0.00490 | No |
| 81 | +0.02490 | 1 | 9 | 9 | +0.02000 | -0.00490 | No |
| 82 | +0.03100 | 2 | 10 | 10 | +0.04000 | +0.00900 | No |
| 83 | +0.03100 | 2 | 10 | 10 | +0.04000 | +0.00900 | No |
| 84 | +0.03100 | 2 | 10 | 10 | +0.04000 | +0.00900 | No |
| 85 | +0.03780 | 2 | 10 | 10 | +0.04000 | +0.00220 | No |
| 86 | +0.03780 | 2 | 10 | 10 | +0.04000 | +0.00220 | No |
| 87 | +0.03780 | 2 | 10 | 10 | +0.04000 | +0.00220 | No |
| 88 | +0.04560 | 2 | 10 | 10 | +0.04000 | -0.00560 | No |
| 89 | +0.04560 | 2 | 10 | 10 | +0.04000 | -0.00560 | No |
| 90 | +0.04560 | 2 | 10 | 10 | +0.04000 | -0.00560 | No |
| 91 | +0.05500 | 3 | 11 | 11 | +0.06000 | +0.00500 | No |
| 92 | +0.05500 | 3 | 11 | 11 | +0.06000 | +0.00500 | No |
| 93 | +0.06540 | 3 | 11 | 11 | +0.06000 | -0.00540 | No |
| 94 | +0.06540 | 3 | 11 | 11 | +0.06000 | -0.00540 | No |
| 95 | +0.07740 | 4 | 12 | 12 | +0.08000 | +0.00260 | No |
| 96 | +0.07740 | 4 | 12 | 12 | +0.08000 | +0.00260 | No |
| 97 | +0.09240 | 5 | 13 | 13 | +0.10000 | +0.00760 | No |
| 98 | +0.09240 | 5 | 13 | 13 | +0.10000 | +0.00760 | No |
| 99 | +0.10840 | 5 | 13 | 13 | +0.10000 | -0.00840 | No |
| 100 | +0.10840 | 5 | 13 | 13 | +0.10000 | -0.00840 | No |
| 101 | +0.14960 | 7 | 15 | 15 | +0.14000 | -0.00960 | No |
| 102 | +0.17000 | 9 | 17 | 15 | +0.14000 | -0.03000 | Yes |
Twenty-four calibration bins use [start, end), with the final right endpoint included. Explicit underflow/overflow counts retain out-of-range samples; these counts are not code-clamping counts.
| Source interval | Count | Share of block |
|---|---|---|
| Below -0.16000 | 2 | 1.96% |
| [-0.16000, -0.14750) | 0 | 0.00% |
| [-0.14750, -0.13500) | 0 | 0.00% |
| [-0.13500, -0.12250) | 0 | 0.00% |
| [-0.12250, -0.11000) | 2 | 1.96% |
| [-0.11000, -0.09750) | 2 | 1.96% |
| [-0.09750, -0.08500) | 2 | 1.96% |
| [-0.08500, -0.07250) | 2 | 1.96% |
| [-0.07250, -0.06000) | 4 | 3.92% |
| [-0.06000, -0.04750) | 3 | 2.94% |
| [-0.04750, -0.03500) | 6 | 5.88% |
| [-0.03500, -0.02250) | 11 | 10.78% |
| [-0.02250, -0.01000) | 12 | 11.76% |
| [-0.01000, +0.00250) | 12 | 11.76% |
| [+0.00250, +0.01500) | 12 | 11.76% |
| [+0.01500, +0.02750) | 11 | 10.78% |
| [+0.02750, +0.04000) | 6 | 5.88% |
| [+0.04000, +0.05250) | 3 | 2.94% |
| [+0.05250, +0.06500) | 2 | 1.96% |
| [+0.06500, +0.07750) | 4 | 3.92% |
| [+0.07750, +0.09000) | 0 | 0.00% |
| [+0.09000, +0.10250) | 2 | 1.96% |
| [+0.10250, +0.11500) | 2 | 1.96% |
| [+0.11500, +0.12750) | 0 | 0.00% |
| [+0.12750, +0.14000] | 0 | 0.00% |
| Above +0.14000 | 2 | 1.96% |
LLM weights, auto range. Probe +0.05300, rounded offset 3, raw code 11, stored code 11, reconstructed +0.06000, error +0.00700. Not clamped. Block mean absolute error 0.00560, 3 clamped samples of 102. Packed byte 0xB6.