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
npu: the int8 outlier split covers ffn_down only; CodeLlama-7b loses EOS at the gate/up input (host f32 there restores it) #2576
amd/CodeLlama-7b-Instruct-hf_rai_1.7.1_hybrid on --device npu (kernels kernels-h4096-mha-b8, main with #2552's outlier split on by default) answers correctly and then never emits </s>: ' Sure! 12 times 7 is 84. package.\n\n\n…' runs to the length cap, so a 3-prompt chat times out at ~1 tok/s.
It is the int8 activations again, at the gate/up input this time
Measured at the failing position (chat prompt + ' Sure! 12 times 7 is 84.', token ids, greedy). The device-mode rows use a local per-projection host-f32 diagnostic (the #2536 instrument), under NPU_NO_WCACHE=1 NPU_FFN_CACHE=0:
#2552 split the outlier channels of the ffn_down input, which is where Qwen2.5-3B lost its token. CodeLlama loses it in the gate/up input, the post-attention norm output, which the split did not cover.
Fix (PR follows)
The same split applied to ffn_gate_up (fused: outputs [gate | up] along N, the order q4nx_assemble_B lays down) and to the split ffn_gate / ffn_up designs, with the columns taken from the layer's gate_proj / up_proj.
Measured on the same container at default tau 40: the prefix ends with EOS, and chat answers 'The capital of France is Paris.' (stop), 'Sure! 12 times 7 is 84.' (stop, 14 tokens), and '… Neil Armstrong … Apollo 11 mission in 1969 …' (stop).
Activity
bong-water-water-bong commentedon Nov 15, 2026
Taking this (cl-npuperf); the fix is measured, PR follows.
npu forward: outlier split default tau 20 (refs #2576) (#2585)
docs/npu: state the tau/kmax env contract and that no measured model …
act_outliers: assert the tau/kmax defaults in a test (Refs #2576) (#2587