FP8 Sol-Attn with Examples of Dense&Sol-sparse Wan2.1 and Minimax-H3 - #30
Open
Uxito-Ada wants to merge 16 commits into
Open
FP8 Sol-Attn with Examples of Dense&Sol-sparse Wan2.1 and Minimax-H3#30Uxito-Ada wants to merge 16 commits into
Uxito-Ada wants to merge 16 commits into
Conversation
Add tf-kernel and TorchAO online FP8 choices for Wan2.1 transformer blocks, with dense and Sol-Attn runnable examples. Keep active Sol-Attn Q/K/V in BF16 while preserving Wan residual dtypes, and cover the quantization and attention interaction with focused tests. Document the H100 ablation setup and results, including a peak-memory bar and throughput line benchmark chart. Verified with 18 focused pytest cases (including the H100 Sol-Attn kernel), both example --help entry points, pre-commit hooks, and git diff --check.
Mock the FP8 wrapping entry points so the Wan quantization unit test validates filter and option wiring without requiring the optional tf-kernel package. Remove the benchmark PNG asset and its README reference while retaining the benchmark table and reproduction details. Verified the previously failing test, the 18-test focused suite, Ruff, pre-commit, and staged diff checks.
Replace the separate dense FP8 and Sol-Attn FP8 scripts with one Wan2.1 example that independently selects attention and quantization from CLI configuration. Document Dense/SOL and BF16/tf-kernel FP8/TorchAO FP8/NF4 combinations, and rename the focused tests around the consolidated interface. Verified the direct --help entry point, 18 focused tests including the H100 SOL kernel, pre-commit hooks, PR-scope diff checks, and stale-reference audit.
Uxito-Ada
marked this pull request as draft
August 13, 2026 10:12
Uxito-Ada
marked this pull request as ready for review
August 17, 2026 02:57
Add sparse runtime state and packed-sequence sink handling for MiniMax H3, with FP8 QKV dispatch on active Sol layers and dense FA4 guards for protected steps and layers. Reuse tf-kernel FP8 Linear GEMMs, expose unified example flags, and extend the benchmark matrix and documentation. Verification: ruff format and lint checks passed; the full unit suite passed with 1639 tests and 11 skips; the H100 BF16/FP8 Dense/Sol generation matrix completed.
Uxito-Ada
force-pushed
the
fp8_quant_and_sol
branch
from
August 19, 2026 03:03
94a8063 to
b649f0e
Compare
Collaborator
Author
|
Appended Minimax-H3 support @lzx1413 |
Document the FP8 Linear and attention ownership boundary, post-RoPE QKV quantization, SM90 CuTe routed/exact mainloop, model-specific quality guards, and validated Wan and MiniMax-H3 ablations. Add English and Chinese pages, indexes, navigation, and attention-guide cross-links. Verification: bilingual MkDocs build passed; git diff --check passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add (1) FP8-Dense and (2) FP8-Sol sparse Wan 2.1, built on (a) optimized FP8 QKV and (c) FP8 fused Sol-attn kernels.
Implementation
FP8Linear.forward()callstf_kernel.tf_per_token_quant_fp8independently, namely, input activation needs to be quanted three times for Q, K and V seperately. Here it is optimized to be quanted only once and reused.Benchmark
Environment and parameters:
costs
It is seen that :
The performance of Minimax-H3 shows that:
Video Generation Comparsion
Wan2.1:
Prompt:
Minimax-H3:
Prompt: Official 768p T2VA's long prompt
Testing
Commands and results:
Checklist
pre-commit run --all-filespasses:[TYPE] Brief descriptionconventionRelated Issues
N/A
GPU Architecture Support
Performance Impact
See the benchmark section.