| 1 | # MLA prefill FP8-output microbenchmark (FA4). |
| 2 | # Compares the fused FP8 write against bf16 attention + a standalone static-FP8 |
| 3 | # quant; the delta is the post-quant kernel the fused path removes. |
| 4 | # DeepSeek-Coder-V2-Lite dims; FA4 needs SM100/110. |
| 5 | # |
| 6 | # Usage: |
| 7 | # python benchmark.py --config configs/mla_fa4_fp8_output.yaml |
| 8 | |
| 9 | description: "MLA prefill FA4 fused-FP8 output vs post-quant" |
| 10 | |
| 11 | model: |
| 12 | name: "deepseek-v2-lite" |
| 13 | num_layers: 27 |
| 14 | num_q_heads: 16 |
| 15 | num_kv_heads: 1 |
| 16 | head_dim: 576 |
| 17 | kv_lora_rank: 512 |
| 18 | qk_nope_head_dim: 128 |
| 19 | qk_rope_head_dim: 64 |
| 20 | v_head_dim: 128 |
| 21 | block_size: 128 |
| 22 | |
| 23 | # Pure prefill (q_len == kv_len) so every token goes through forward_mha. |
| 24 | batch_specs: |
| 25 | - "q512" |
| 26 | - "q1k" |
| 27 | - "q2k" |
| 28 | - "q4k" |
| 29 | - "q8k" |
| 30 | - "2q4k" |
| 31 | - "4q4k" |
| 32 | - "8q4k" |
| 33 | |
| 34 | # Only used to construct the MLA impl; the pure-prefill specs skip decode. |
| 35 | decode_backends: |
| 36 | - CUTLASS_MLA |
| 37 | |
| 38 | # Sweep the two FP8 write paths (prefill backend is fixed to fa4). |
| 39 | fp8_output_scale: 0.1 |
| 40 | fuse_quant_op: [false, true] |
| 41 | |
| 42 | device: "cuda:0" |
| 43 | repeats: 50 |
| 44 | warmup_iters: 10 |