← All projectsGitHub
LLM chip design loops

Can per-channel power-of-two scales make the per-neuron quantiser an integer-exact MAC lane, and what accuracy does it keep at 2 to 4 weight bits?

research/chip-digits-pot

Giving each neuron of the digits MLP its own power-of-two weight scale turns the per-channel rescale into one or two shift stages and keeps the lane integer-exact: at W2A4 the MSE-chosen exponents reach 70.5% (against 62% for per-tensor clipping), but at W3A4 they give 87.9%, below clipping's 90.8%.

4 tests

What it found

Follow-up to chip-digits-qat, whose per-channel quantiser rescaled each accumulator in float and so was not a hardware lane. Here each output channel gets a scale 2e; the rescale becomes a left shift of the layer-1 accumulator to a common unit followed by one common right shift, and a left shift of each layer-2 logit. The forward pass is pure integer and a test compares it with a float64 recomputation (exact for powers of two). Two exponent rules are compared with chip-digits max scaling, chip-digits-qat MSE clipping and the float per-channel reference on the same 64-16-10 MLP and five scikit-learn digits splits: smallest non-clipping exponent (pot_max), and the exponent within three of that minimising each column's squared weight error (pot_mse). At W2A4, pot_mse reaches 70.5% (baseline 33.9%, per-tensor clip 61.9%); at W3A4 87.9% (clip 90.8%, float-scale per-channel 91.5%, so rounding scales to powers of two costs about 3.5 points there); at W4A4 94.4% (float 96.8%). The shifts are small: at most 4 distinct net shifts in layer 1 and 2 in layer 2 over the five splits, i.e. two and one mux2 stages per channel. Limitations: one small network and dataset, five splits with spreads of several points at W≤3, no QAT, gate cost counted as shifter stages only and not synthesised, exponent search window of four values. All inputs are measured on the dataset; none is assumed.

A figure from its own output

Figure produced by research/chip-digits-pot: accuracy_by_method
chip-digits-pot/experiments/accuracy_by_method.svg, written by the project's own experiment code.

Paper, code and results

More in LLM chip design loops

All 40 LLM chip design loops projects →

Other research topics

Proper scoring & elicitation28Effort & peer prediction9Verification games & slashing19Detection & tolerances14Markets as routers13Prediction-market design9Paying contributors8Decentralised training systems23Digital twins & sim-to-real164LLM chip design loops40Robot manufacturing loops53Ambient AI assistant46Self-replicating manufacturing34Simulation-first design64Engineered clothing45Task-specific AI accelerators40Algorithmic chip-design loops42Open-source purpose-built robots44The software-engineering loop43Adversarial human imitation41Open-source residential construction41Autonomous multi-angle capture34Sensing, imaging and 3D31Energy supply and dense energy storage39Robot societies among people31Agentic co-design of low-cost robots27Laundry-hanging robots25Machine learning on qualitative data23Robots on the building site27Civilizations & group psychology1History & human sciences1

Produced with AI assistance (Claude). Results are from the code in this repository and are simulated or stylised unless the abstract says otherwise; nothing here implies affiliation with or endorsement by any lab, researcher or company cited. MIT licensed.