To fit a big model on a small chip, each weight is stored as one byte: a whole number from −127 to 127, times a scale shared by a group of group_size neighbouring weights. A weight is stored as round(weight / scale) and comes back as stored × scale. Write quantize(weights, group_size): the weights as they come back out of storage.
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|
| 0.314 | −0.771 | 0.12 | 0.586 | 1.904 | −0.442 | 0.074 | −1.233 |