Skip to content

fix(fp8): per-row dynamic FP8 activation scales - #99

Open
gdevenyi wants to merge 2 commits into
5080/52-qsa-score-rowsfrom
5080/54-fp8-rowscale
Open

gdevenyi wants to merge 2 commits into
5080/52-qsa-score-rowsfrom
5080/54-fp8-rowscale

Conversation

@gdevenyi

Copy link
Copy Markdown
Owner

Per-row dynamic FP8 activation scales (fixes fork #94): a sequence's FP8 grid no longer depends on the other rows in its batch. M=1 keeps the old per-tensor path. Stacked on #98.

Results at the production config (8K prefill chunks, 1780 slots; 2 interleaved rounds)

base 8K per-row 8K
NLL vs base 8K – -0.0194 [-0.0299, -0.0104] (back to the 4K level: -0.0012 vs 4K)
cold TTFT 249K / 127K / 32K 53.5 / 27.6 / 7.0 s 54.8 / 28.3 / 7.2 s (+2.3-2.6%)
bs=1 decode, copybench no change (same code path) no change
255K + side call, torch allocated peak 14817.8 MiB 14817.8 MiB, 0 OOMs
quality 15/15 14/15
  • The bs=2 decode cost is estimated from a microbenchmark at about 1% (+3-7 us per FP8 linear at M=2). It is not measured.
  • New cold fingerprints: code aac73792b47737f4, ctx 30393af9660b7190, think 5013d791e5d3dc91.
  • tests/models/qwen4_exp/test_fp8_dense.py: 20/20 pass. The row-independence test fails on base.
  • Data: ~/projects/FreeToken-bench/fp8row/.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Td2gieja9Da2rPTN17Z846

gdevenyi and others added 2 commits October 21, 2026 18:37
… batch

Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Td2gieja9Da2rPTN17Z846
…stay independent

Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Td2gieja9Da2rPTN17Z846
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant