The same trained Go1 policy, quantized several ways, walking in real MuJoCo physics compiled to WebAssembly. Everything on this page runs in your browser: the simulation, the neural network, and the timing.
All ONNX files are the same size. Quantization here is simulated — weights are rounded to the target grid and stored back as float32 — because the question is what precision does to control, not what it does to a file. A deployment would pack the weights and get the storage win too.
starting…
From runs that completed on the reference machine (RTX 3050 Laptop, 4 GB): 100 episodes × 5 seeds, deterministic policy, paired bootstrap 95% intervals. Nothing on this page is estimated.
| scheme | bits/weight | Δreturn vs fp32 |
|---|---|---|
| fp32 | 32.00 | — |
| fp16 | 16.00 | no measurable loss |
| int8-tensor | 8.00 | no measurable loss |
| int8-channel | 8.00 | no measurable loss |
| int8-act | 8.00 | no measurable loss |
| int4-group32 | 4.00 | −0.73% [−0.88, −0.45] |
| mixed-head-fp16 | 4.19 | −0.90% [−1.26, −0.70] |
| int4-channel | 4.00 | −2.34% [−2.79, −1.95] |
| ternary | 1.58 | −90.7% [−92.1, −89.1] |
| scheme | friction × lower is better | obs noise σ higher is better |
|---|---|---|
| fp32 | 0.189 [0.178, 0.206] | 0.142 [0.138, 0.145] |
| int8-channel | 0.205 [0.188, 0.224] | 0.142 [0.138, 0.146] |
| int4-group32 | 0.207 [0.190, 0.225] | 0.140 [0.135, 0.144] |
| int4-channel | 0.241 [0.230, 0.252] | 0.127 [0.122, 0.134] |
int4-channel costs only 2.3% of return on flat ground, yet its friction and observation-noise frontiers separate from fp32 with non-overlapping intervals. int4-group32, at the same 4 bits, does not. Finer grouping, not more bits, is what buys the margin back.
The recommender's answer on this data: at a 90% retention bar, the cheapest
qualifying scheme is int4-group32 at 4.00 bits; raising the bar to
99% moves it to int8-act at 8.00 bits.
100 warmup iterations discarded, then 1000 timed. Measured here, in this browser, on this machine — a latency measured in Python would not describe what this page does.
not measured yet