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
This pull request adds SM90 FP8 GEMM support with FP32 accumulation, integrates the new quantization mode into MiniMax-H3, and adds an H100 realtime configuration. It also adds a fused QKV cache path that applies RoPE during rolling-cache storage and reads.
Makes the NVIDIA kernel architecture selectable and adds SM90 FP16- and FP32-accumulation GEMM operators, declarations, Python wrappers, and operator facts.
Accumulation-aware linear dispatch lightx2v/common/ops/mm/*, lightx2v/models/input_encoders/hf/q_linear.py
Selects GEMM implementations by accumulation dtype and passes the selected callable through FP8 linear operations.
MiniMax-H3 integration and H100 configuration lightx2v/models/networks/*, lightx2v/models/video_encoders/hf/minimax_h3/video_vae.py, configs/minimax_h3_causal/h100/realtime_768p_fp8_sp8.json, lightx2v_kernel/nvidia/README.md, tools/benchmarks/operator_backends.py
Accepts fp8-f32-accum in MiniMax-H3 model, checkpoint, weight, and VAE paths. Adds an H100 realtime configuration and documents the mode and operator requirements.
Fused QKV cache and RoPE
Layer / File(s)
Summary
Rolling-cache mapping and fused store/read operation lightx2v/models/networks/minimax_h3/causal/kv_cache.py
Adds shared rolling-cache position and FP32 RoPE helpers, plus a fused method that stores and reads Q, K, and V while applying RoPE.
sequenceDiagram
participant Transformer as MiniMaxH3CausalTransformerInfer
participant Cache as FP8StepRollingKVCachePool
participant Kernel as _store_read_rope
Transformer->>Cache: Submit Q, K, V and rotary frequencies
Cache->>Kernel: Launch fused cache and RoPE operation
Kernel-->>Cache: Return Q, K, V outputs
Cache-->>Transformer: Return Q, K, V outputs
Loading
Possibly related issues
ModelTC/LightX2V#1445 — This pull request adds MiniMax-H3 FP8-F32 execution support and an H100 configuration that references quantized H3 checkpoints, but does not add checkpoint files.
Possibly related PRs
ModelTC/LightX2V#1650 — Adds the MiniMax-H3 causal FP8 rolling KV cache and fused-QKV inference path extended here with fused QKV RoPE storage and reads.
ModelTC/LightX2V#1656 — Adds the operator profiling framework extended here with SM90 FP8 GEMM operators and precision contracts.
FP8 inference can fail on an unsupported kernel or in multi-rank fused-cache execution. Fix those paths and clarify the H100 launch configuration before merging.
Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
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
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 by CodeRabbit