Worked: Reuse the recipe you already trust. We train a tiny FP32 linear policy (softmax, plain gradient descent) that maps an 8-dim sensor vector to one of 3 actions, then QAT-ternarize it with the non-learnable BitNet absmean scale. Recall from module 2 why non-learnable: a learnable scale drives the zero-ratio to ~90% and blows up the loss, while a fixed absmean self-regulates near a ~26% zero equilibrium. The absmean scale is literally s = mean(|W|) — the average magnitude of the weights. Ternarize with Wt = clip(round(W/s), -1, 1); every weight is now -1, 0, or +1.
Your turn: Fill the one gap: compute s. Watch what W/s does — dividing by the mean magnitude puts a typical weight near +/-1, so round snaps it to a trit and clip guards the rare outlier. If you leave s as a wrong constant (say 1.0), the round collapses most weights to 0 and accuracy falls off a cliff — that is the zero-ratio failure, made visible.
Independent: Now read the inference loop and the tax counter without touching them, and be able to defend both. The ternary MAC uses only += (weight +1, add), -= (weight -1, subtract), and skip (weight 0) — there is no * on the hot path. The policy also omits the scale s and the bias b, and it is worth stating precisely WHY each drop is safe: scaling every logit by the same positive s is monotonic, so it can NEVER change an argmax — that part is a theorem, not luck. The bias is different — dropping a bias CAN flip an argmax in general — but this trained bias is tiny (|b|~0.07, near zero), so it flips no decision here, and the bench verifies exactly that (ternary_acc holds). That is why multiplies == 0 is exact, not a rounding of "almost zero." Then the tax counter: a naive binary-assuming stack pays store->pack, wire->decode, compute->unpack = 3 re-encodings; the end-to-end trit pays 0, so taxes_removed == 3.