What problem does it solve?
Choosing a model, GPU, or TP/EP layout for LLM serving requires knowing how the per-rank GEMM and fused-MoE kernels perform under BF16, FP8, and NVFP4, but deriving those shapes normally means loading full checkpoints and hand-computing sharding. This Skill inspects a Hugging Face model on meta tensors (no weights loaded), derives the fused QKV, gate/up, Mamba, GatedDeltaNet, and routed-expert shapes for a given TP/EP, and runs FlashInfer kernel microbenchmarks for a chosen M sweep.
Core Features & Use Cases
- Shape derivation without checkpoints: Builds the model on meta tensors from config alone, applies vLLM-style TP/EP sharding rules, and prints a preview of every per-rank GEMM and MoE shape before any GPU work.
- FlashInfer kernel benchmarking: Runs BF16, FP8, and NVFP4 GEMM and fused-MoE cases through a local FlashInfer source checkout, including activation-quantization timing and vLLM-equivalent physical padding.
- Audited coverage: Detects unsupported decoder Linear layouts and reports them explicitly, with a manual-supplement path via benchmark_via_builtin.py for missing shapes.
- Use Case: Before deploying a 550B MoE model with NVFP4 on 8 GPUs, preview the per-rank shapes with TP=8/EP=8, then benchmark M values 1, 8, 64, 512 to compare CUTLASS, trtllm-gen, and CuteDSL MoE backends.
Quick Start
Ask the assistant to benchmark the per-rank kernels of a Hugging Face model such as 'meta-llama/Llama-3.1-8B' with TP=1, EP=1, and the default M sweep, starting with the shape preview.