ml_inference_optimization

ml_inference_optimization is a skill for Claude Code, Codex from Leeroo-AI/leeroopedia-mcp. It costs 0 tokens per session (723 once invoked), scanned A, original, MIT.

A reference guide for using a knowledge base of CUDA and Triton GPU kernel implementations. CUDA is NVIDIA's GPU programming platform, while Triton is a language for writing GPU kernels.

In plain words
What is it for?
Use it when solving GPU performance problems involving tensor operations, kernel design, block sizes, or target hardware.
Why use it?
It tells an agent to look up tested implementation patterns instead of relying only on memory when optimizing machine-learning operations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when solving GPU performance problems involving tensor operations, kernel design, block sizes, or target hardware.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leeroo-ai/leeroopedia-mcp/ml_inference_optimization
Install

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.

Any agent
npx skills add Leeroo-AI/leeroopedia-mcp --skill ml_inference_optimization
Clone the repo
git clone --depth 1 https://github.com/Leeroo-AI/leeroopedia-mcp

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for ml_inference_optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/leeroo-ai/leeroopedia-mcp/ml_inference_optimization/github.svg)](https://agentmods.dev/skills/leeroo-ai/leeroopedia-mcp/ml_inference_optimization)
Your own site
<a href="https://agentmods.dev/skills/leeroo-ai/leeroopedia-mcp/ml_inference_optimization"><img src="https://agentmods.dev/badge/skills/leeroo-ai/leeroopedia-mcp/ml_inference_optimization/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.

agentmods 80×15 button for ml_inference_optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/leeroo-ai/leeroopedia-mcp/ml_inference_optimization"><img src="https://agentmods.dev/badge/skills/leeroo-ai/leeroopedia-mcp/ml_inference_optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 723 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00723
Opus 5 $0.00000 $0.00362
Sonnet 5 $0.00000 $0.00145
Haiku 4.5 $0.00000 $0.00072

Measured 10d ago against content hash 3c0f40562d41, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ml_inference_optimization 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 10d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (generate_kernelbench_fixtures.py, run_benchmark.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

examples/ml_inference_optimization/SKILL.md · 56 lines

How it starts

The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Leeroopedia Knowledge Base — Tool Usage Reference

This document describes the Leeroopedia MCP tools available during the with-KB benchmark run. It is a standalone reference and is not fed to the agents automatically.


Leeroopedia Knowledge Base (MANDATORY)

You have access to the Leeroopedia MCP tools. The KB contains production-grade CUDA and Triton kernel implementations from TransformerEngine, DeepSpeed, vLLM, Bitsandbytes, ggml, Ncnn, and MNN.

You MUST use these tools as part of your workflow for every problem. Do not rely solely on your training knowledge — the KB contains hardware-specific optimization patterns, tested block sizes, and proven kernel designs that will produce better results than writing kernels from scratch.

Required Per-Problem Workflow

For each of the 10 problems, follow this sequence:

  1. Search — Call search_knowledge with the problem's operation, tensor shapes, and target GPU. Example:

    search_knowledge("fused LayerNorm + GELU kernel for 5D tensor (32, 64, 32, 64, 64), reducing over last dim=64, NVIDIA L4 Ada Lovelace")
    
  2. Hypothesize — Call propose_hypothesis with 2-3 candidate approaches and the reference timing. Let the KB rank them before you commit.

  3. Plan — Call build_plan with your chosen approach and exact dimensions to get concrete thread block sizes, shared memory layout, and reduction strategy.

  4. Write — Implement the kernel using the plan from step 3.

  5. Review — Call review_plan with your kernel code before running evaluation. Fix any issues it identifies (wrong indexing, missing sync barriers, race conditions).

  6. On failure — If evaluation fails (compile error or incorrect results), call diagnose_failure with the exact error message and your kernel code. If numerical correctness fails, also call verify_code_math with the tensor shapes and reduction dimensions.

Tool Quick Reference

Tool Purpose
search_knowledge Find relevant kernel implementations and optimization patterns
propose_hypothesis Rank candidate optimization approaches
build_plan Get concrete implementation plan (block dims, shared mem, reductions)
review_plan Review kernel code for correctness bugs before testing
verify_code_math Check numerical correctness (softmax stability, normalization, etc.)
diagnose_failure Diagnose compilation errors or incorrect results
get_page Retrieve full KB page when a tool response cites a [PageID]

Read the full file on GitHub · 56 lines

Files

What ships with it

5 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.

Changes

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.

  1. 10d ago First seen · 56 lines · 0 tokens per session scan A 3c0f40562d41

Subscribe to this mod's changes

ml_inference_optimization is a skill published in the GitHub repository Leeroo-AI/leeroopedia-mcp (14 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 723 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-08-30.

Related

Other skills, from other repositories

ml-research-lab

Machine-learning research loop for dataset curation, fine-tuning, evaluation, inference deployment, experiment tracking, and model explainability. Use when working on ML experiments, training data, model benchmarks, RunPod/GPU runs, classifier quality, vLLM/GGUF serving, SHAP-style model explanations, or…

AnastasiyaW/codex-claude-code-config · 96 tokens

saelens

Train sparse autoencoders to interpret model features.

NousResearch/hermes-agent · 14 tokens

physicsnemo-discover

Official NVIDIA-authored guidance for navigating PhysicsNeMo — pick the model, datapipe, or example for a SciML/AI4Science task (surrogates, forecasting, downscaling, physics-informed, inverse, generative). Points at existing files via live repo search; never writes code. Do NOT use for installation or environment…

NVIDIA/physicsnemo · 124 tokens

batch-processing-clinical-text

Run large-scale batch NER, PII extraction, or de-identification over many clinical notes on-device with OpenMed, with sharding, checkpointing, resumability, and append-only JSONL output. Use when the user needs to process a corpus or folder of notes, de-identify a dataset, run NER over thousands of documents, build a…

maziyarpanahi/openmed · 161 tokens

choosing-openmed-models

Discover and pick the right OpenMed model for a clinical or biomedical task, domain, or language. Use when the user asks which OpenMed model to use, wants to list model categories, find a Disease vs Oncology vs Privacy/PII model, get a PII model for a specific language, search models by size or task, or inspect a…

maziyarpanahi/openmed · 134 tokens

extracting-clinical-entities

Run clinical and biomedical named-entity recognition on medical text with OpenMed's analyzetext. Use when the user wants to extract diseases, drugs, anatomy, genes, or other biomedical entities from notes; needs NER output as dict/json/html/csv; wants to filter by confidence, group entities, toggle sentence detection…

maziyarpanahi/openmed · 118 tokens