Hugging Face Kernels is a system that lets Python libraries and applications load compute kernels directly from the Hugging Face Hub. It is used by Python and PyTorch developers who need portable kernels that can support multiple versions and build configurations. The catalogue skills help agents work with the kernels system and its kernel-building tools.
Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/huggingface/kernelsnpx agentmods add skills/huggingface/kernels/rocm-kernelsWrote 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/huggingface/kernels/rocm-kernels)<a href="https://agentmods.dev/skills/huggingface/kernels/rocm-kernels"><img src="https://agentmods.dev/badge/skills/huggingface/kernels/rocm-kernels/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/huggingface/kernels/rocm-kernels"><img src="https://agentmods.dev/badge/skills/huggingface/kernels/rocm-kernels.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00093 | $0.06420 |
| Opus 5.5 | $0.00037 | $0.02568 |
| Sonnet 5.5 | $0.00019 | $0.01284 |
| Haiku 4.5 | $0.00009 | $0.00642 |
Grade A, and why
rocm-kernels 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 509 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ROCm Triton Kernels for Diffusers & Transformers
This skill provides patterns and guidance for developing optimized Triton kernels targeting AMD GPUs (MI355X, R9700) on ROCm, for use with HuggingFace diffusers (LTX-Video, SD3, FLUX) and transformers libraries.
Quick Start
Diffusers (LTX-Video)
Inject optimized kernels into LTX-Video pipeline:
import os
os.environ['TRITON_HIP_USE_BLOCK_PINGPONG'] = '1'
os.environ['TRITON_HIP_USE_ASYNC_COPY'] = '1'
from diffusers import LTXPipeline
pipe = LTXPipeline.from_pretrained("Lightricks/LTX-Video", torch_dtype=torch.bfloat16)
pipe.to("cuda") # ROCm uses same API via HIP
inject_optimized_kernels(pipe) # BEFORE CPU offloading
pipe.enable_model_cpu_offload()
For a minimal integration example (~150 lines):
python scripts/ltx_kernel_injection_example.py
Isolated Kernel Micro-benchmarks
# All 4 kernels: correctness + performance + bandwidth
python scripts/benchmark_kernels.py
# Single kernel
python scripts/benchmark_kernels.py --kernel rmsnorm
python scripts/benchmark_kernels.py --kernel rope
python scripts/benchmark_kernels.py --kernel geglu
python scripts/benchmark_kernels.py --kernel adaln
End-to-End Pipeline Benchmark
# Compare baseline vs Triton vs torch.compile
python scripts/benchmark_e2e.py --mode all
# Quick test
python scripts/benchmark_e2e.py --mode triton --num-frames 9 --steps 5
# Save results for comparison
python scripts/benchmark_e2e.py --mode all --output-json results.json
Target Model: LTX-Video
Architecture Overview
| Component | Class | Has Weight | Count | Kernel |
|---|---|---|---|---|
transformer_blocks.*.norm1 |
RMSNorm | No (elementwise_affine=False) | 56 | RMSNorm |
transformer_blocks.*.norm2 |
RMSNorm | No | 56 | RMSNorm |
transformer_blocks.*.attn1.norm_q |
torch.nn.RMSNorm | Yes | 28 | RMSNorm |
transformer_blocks.*.attn1.norm_k |
torch.nn.RMSNorm | Yes | 28 | RMSNorm |
transformer_blocks.*.ff |
FeedForward | - | 28 | GELU (not GEGLU!) |
| Rotary position encoding | LTXVideoRotaryPosEmbed | - | 1 | RoPE 3D |
What ships with it
18 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.
- CHANGELOG.md 3.6 KB
- examples/ltx-video-benchmark/README.md 2.2 KB
- examples/ltx-video-benchmark/trace/opencode_live/opencode_trace_result.json 1.2 KB
- examples/ltx-video-benchmark/trace/opencode_live/results.json 437 B
- manifest.txt 744 B
- references/diffusers-integration.md 9.4 KB
- references/huggingface-kernels-integration.md 10 KB
- references/kernel-templates.md 16 KB
- references/kernelbench-classification.md 7.1 KB
- references/mi355x-optimization-guide.md 7.1 KB
- references/r9700-optimization-guide.md 4.9 KB
- references/transformers-integration.md 9.7 KB
- references/troubleshooting.md 8.2 KB
- scripts/benchmark_e2e.py 11 KB runs code
- scripts/benchmark_kernels.py 18 KB runs code
- scripts/huggingface_kernels_example.py 11 KB runs code
- scripts/requirements.txt 106 B
- scripts/transformers_injection_example.py 6.1 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.
- 1mo ago First seen · 509 lines · 93 tokens per session scan A 4abfad8e0ef0
rocm-kernels is a skill published in the GitHub repository huggingface/kernels (774 stars, last pushed yesterday), licensed Apache-2.0. It adds 93 tokens to every session and 6,420 once invoked, about $0.0004 per session on Opus 5.5. 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-08-30.
Other skills, from other repositories
jupyter-notebook
Iterative Python via live Jupyter kernel (hamelnb).
matlab
Builds, reviews, migrates, and plans MATLAB or GNU Octave numerical workflows. Use for arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.
pennylane
Builds and differentiates PennyLane quantum circuits, hybrid PyTorch or JAX models, molecular VQE and QAOA workflows. Use for variational quantum algorithms, quantum machine learning, simulator validation, and moving validated circuits to provider plugins. For hardware-specific compilation use qiskit or cirq; for…
cuopt-numerical-optimization-api
LP, MILP, and QP (beta) with cuOpt — Python, C, and CLI. Use when the user is solving LP, MILP, or QP with any cuOpt interface.
gh-address-comments
Help address review/issue comments on the open GitHub PR for the current branch using gh CLI; verify gh auth first and prompt the user to authenticate if not logged in.
pymatgen-materials
Materials science computation with pymatgen. Use when: (1) crystal structure creation and manipulation, (2) phase diagram construction, (3) electronic structure analysis, (4) symmetry and space group operations, (5) VASP input/output parsing. NOT for: molecular chemistry (use rdkit-chemistry), protein structure (use…