FlashInfer is a library and kernel generator that supplies GPU operations used to run large language model inference, including attention, matrix multiplication, and mixture-of-experts computations. It helps engineers build and optimize LLM serving systems across supported GPU hardware and backend implementations. Its catalogue add-ons provide skills and instructions for working with FlashInfer.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add flashinfer-ai/flashinfer --skill sm120_swapabgit clone --depth 1 https://github.com/flashinfer-ai/flashinferWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/flashinfer-ai/flashinfer/sm120_swapab)<a href="https://agentmods.dev/skills/flashinfer-ai/flashinfer/sm120_swapab"><img src="https://agentmods.dev/badge/skills/flashinfer-ai/flashinfer/sm120_swapab/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/flashinfer-ai/flashinfer/sm120_swapab"><img src="https://agentmods.dev/badge/skills/flashinfer-ai/flashinfer/sm120_swapab.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00481 |
| Opus 5.5 | $0.00000 | $0.00192 |
| Sonnet 5.5 | $0.00000 | $0.00096 |
| Haiku 4.5 | $0.00000 | $0.00048 |
Grade A, and why
sm120_swapab scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Updating the SM120 swap-AB sources
sm120_swapab/
├── common/
├── src/ # original communication package name
├── moe_sm120_mxfp8_swapab/
├── moe_mxfp8_glu/
└── moe_nvfp4_swapab/
The adapter lives at flashinfer/moe_ep/shims/sm120/swapab_cutedsl/.
Backends import its package exports. The adapter owns path setup, communication,
workspace allocation and launch binding; kernel_helpers.py lazily exposes
provider helpers and references. This legacy drop shares raw module names with
SM90 and SM100, so those implementations require separate processes.
Replace the five source packages from the pinned release-prepared branch drop, then reapply the changes recorded in VENDOR.md. Preserve the adapters and vendoring records. Do not format generated sources or copy provider test and benchmark scaffolding.
Check Sm120MegaMoEMxfp8SwapABKernel.__init__ and .__call__ against the
adapter's constructor and launch arguments. Compare the provider's
moe_sm120_mxfp8_swapab/mega_runner.py for workspace allocation, combine-output
shape, the separate top-k reducer and local-counter reset. Keep the reset until
the selected kernel revision provides the corresponding tail reset.
Check _MXFP8_BLOCK_SIZE, _SF_PADDING_BLOCK, _CTA_TOKEN_TILE and
_SWAP_AB_INTERLEAVE in the adapter. _assert_mirrored_constants() catches
value drift at compile time; renamed symbols still need an import update.
Verify the reference and quantizer imports in kernel_helpers.py, including
their dependencies on common, src and the two helper kernel packages.
Run host import/configuration checks, then the numerical and graph cases on SM120:
torchrun --standalone --nproc_per_node=4 -m pytest \
tests/moe_ep/test_moe_ep_sm120_mxfp8_cutedsl_mega_multirank.py -x -v
Backend dispatch remains under
backends/mega/kernel/sm120/mxfp8_mxfp8_bf16_cutedsl/ and is maintained
separately from the provider snapshot.
What ships with it
60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- common/__init__.py 144 B runs code
- common/host_utils.py 8.6 KB runs code
- common/megamoe_constants.py 948 B runs code
- common/moe_utils.py 17 KB runs code
- moe_mxfp8_glu/__init__.py 160 B runs code
- moe_mxfp8_glu/custom_ext.py 16 KB runs code
- moe_mxfp8_glu/epilogue_mxfp8.py 62 KB runs code
- moe_mxfp8_glu/kernel_mxfp8_glu_fc12.py 103 KB runs code
- moe_mxfp8_glu/mega_reference_mxfp8.py 11 KB runs code
- moe_mxfp8_glu/mega_runner.py 39 KB runs code
- moe_mxfp8_glu/megamoe_kernel_mxfp8.py 45 KB runs code
- moe_mxfp8_glu/run_functional_tests.sh 8.4 KB runs code
- moe_mxfp8_glu/run_mega_tests.sh 18 KB runs code
- moe_mxfp8_glu/runner_common.py 2.6 KB runs code
- moe_mxfp8_glu/runner_fc12.py 17 KB runs code
- moe_nvfp4_swapab/__init__.py 58 B runs code
- moe_nvfp4_swapab/benchmark_p2p.py 24 KB runs code
- moe_nvfp4_swapab/contract.py 16 KB runs code
- moe_nvfp4_swapab/custom_ext.py 19 KB runs code
- moe_nvfp4_swapab/cute_ref_ops.py 9.6 KB runs code
- moe_nvfp4_swapab/dynamic_mainloop.py 13 KB runs code
- moe_nvfp4_swapab/epilogue_refactor.py 127 KB runs code
- moe_nvfp4_swapab/epilogue.py 144 KB runs code
- moe_nvfp4_swapab/fc1_fc2_fuse_sched.py 65 KB runs code
- moe_nvfp4_swapab/kernel_fc12.py 103 KB runs code
- moe_nvfp4_swapab/mega_reference.py 102 KB runs code
- moe_nvfp4_swapab/mega_runner.py 118 KB runs code
- moe_nvfp4_swapab/megamoe_kernel.py 65 KB runs code
- moe_nvfp4_swapab/moe_persistent_scheduler.py 82 KB runs code
- moe_nvfp4_swapab/moe_utils.py 39 KB runs code
- moe_nvfp4_swapab/run_functional_tests.sh 12 KB runs code
- moe_nvfp4_swapab/run_mega_tests.sh 17 KB runs code
- moe_nvfp4_swapab/runner_common.py 20 KB runs code
- moe_nvfp4_swapab/runner_fc12_common.py 83 KB runs code
- moe_nvfp4_swapab/runner_fc12.py 16 KB runs code
- moe_nvfp4_swapab/simulate_fc1_fc2_sched.py 15 KB runs code
- moe_nvfp4_swapab/topk_reduce.py 28 KB runs code
- moe_sm120_mxfp8_swapab/__init__.py 64 B runs code
- moe_sm120_mxfp8_swapab/custom_ext.py 20 KB runs code
- moe_sm120_mxfp8_swapab/fc1_fc2_fuse_sched.py 67 KB runs code
- moe_sm120_mxfp8_swapab/kernel_fc12.py 210 KB runs code
- moe_sm120_mxfp8_swapab/mega_reference.py 5.6 KB runs code
- moe_sm120_mxfp8_swapab/mega_runner.py 103 KB runs code
- moe_sm120_mxfp8_swapab/megamoe_kernel.py 45 KB runs code
- moe_sm120_mxfp8_swapab/moe_persistent_scheduler.py 82 KB runs code
- moe_sm120_mxfp8_swapab/moe_utils.py 40 KB runs code
- moe_sm120_mxfp8_swapab/run_functional_tests.sh 1.5 KB runs code
- moe_sm120_mxfp8_swapab/run_mega_tests.sh 2.3 KB runs code
- moe_sm120_mxfp8_swapab/runner_common.py 12 KB runs code
- moe_sm120_mxfp8_swapab/runner_fc12_common.py 72 KB runs code
- moe_sm120_mxfp8_swapab/runner_fc12.py 9.9 KB runs code
- moe_sm120_mxfp8_swapab/sm120_mma.py 12 KB runs code
- moe_sm120_mxfp8_swapab/sm120_ptx_helpers.py 1.4 KB runs code
- moe_sm120_mxfp8_swapab/token_comm.py 70 KB runs code
- moe_sm120_mxfp8_swapab/topk_reduce.py 10 KB runs code
- src/__init__.py 0 B runs code
- src/bootstrap.py 20 KB runs code
- src/cleanup_kernel.py 6.7 KB runs code
- src/config.py 6.3 KB runs code
- src/dispatch_kernel.py 4.8 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 46 lines · 0 tokens per session scan A 2c54bd0aeb66
sm120_swapab is a skill published in the GitHub repository flashinfer-ai/flashinfer (7,037 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 481 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-21.
sm120_swapab compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| sm120_swapabflashinfer-ai/flashinfer | Skill | 7.0k | today | Apache-2.0 | A | 0 | Claude Code, Codex |
| gpu-server-setupEvilFreelancer/gpu-server-setup | Skill | 15 | 28d ago | MIT | B | 223 | Claude Code |
| trtllm-modeling-v2-featuresNVIDIA/TensorRT-LLM | Skill | 15k | today | none | A | 194 | Claude Code, Codex |
| trtllm-modeling-v2-entryNVIDIA/TensorRT-LLM | Skill | 15k | today | none | A | 76 | Claude Code, Codex |
| trtllm-serve-config-guideNVIDIA/TensorRT-LLM | Skill | 15k | today | none | A | 74 | Claude Code, Codex |
| atc-model-converterascend-ai-coding/awesome-ascend-skills | Skill | 187 | yesterday | none | A | 142 | Claude Code |
| ai-for-science-ai4s-basicascend-ai-coding/awesome-ascend-skills | Skill | 187 | yesterday | none | A | 96 | Claude Code |