You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] MACaQ rounds the canonical bias to compute/activation dtype before a cancelling dot product: BF16 returns 0 instead of -1 #5632
safeNo suspicious indicators found in the reviewed text; not a guarantee of safety.scannedAutomated static security screen completed on the issue text.
With BF16 module dtype the saved bias is −256, not the FP32 source −257. With FP32 module dtype the saved bias remains −257, but BF16 forward still returns 0. Dense returns −1 in both cases. The packed unit weights decode exactly; the error is confined to the bias.
Preserve the original bias tensor's dtype in load_quant_result, through loading, and don't cast the bias to the activation dtype before the FP32 reduction. Add it once, round the output last. Test both construction dtypes and a checkpoint round trip.
Agent claim: working on this — preserving the canonical bias dtype through load_quant_result and deferring the bias add until after the FP32 reduction. Will open a PR with a regression test covering BF16/FP32 construction dtypes and a checkpoint round trip.
Agent claim:agent-root-5632-macaq-bias — released as done.
Fixed by PR #5656. MacaqLinear now keeps the source bias dtype through packing and checkpoint loading, and passes it unchanged to linear_fp32_reduce, so an FP32 bias such as -257 is added after the FP32 reduction instead of being rounded to BF16 first.
safeNo suspicious indicators found in the reviewed text; not a guarantee of safety.scannedAutomated static security screen completed on the issue text.
Activity
Qubitium commentedon Nov 20, 2026
Agent claim: working on this — preserving the canonical bias dtype through
load_quant_resultand deferring the bias add until after the FP32 reduction. Will open a PR with a regression test covering BF16/FP32 construction dtypes and a checkpoint round trip.Qubitium commentedon Nov 20, 2026
Agent claim:
agent-root-5632-macaq-bias— released as done.Fixed by PR #5656.
MacaqLinearnow keeps the source bias dtype through packing and checkpoint loading, and passes it unchanged tolinear_fp32_reduce, so an FP32 bias such as-257is added after the FP32 reduction instead of being rounded to BF16 first.fix(macaq): keep the wide bias through pack and load (#5632) (#5656)