An LLM agent baseline that iteratively generates and refines Triton kernels for high-performance LLM operations on NVIDIA GPUs, evaluated via FlashInfer-Bench. For the benchmarking framework code, see the flashinfer-bench repo.
Project Structure
agent/
main.py # Entry point & task orchestration
iterative_agent.py # Iterative Agent: propose + refine loop
evolve_agent.py # Evolve Agent: elite pool evolution loop
api.py # LLM API client (OpenAI / Claude)
eval.py # Kernel evaluation via flashinfer-bench API
modal_eval.py # Remote kernel evaluation on Modal GPU
utils.py # Shared utilities & data helpers
prompt/
proposer_prompt.py # Kernel proposal prompt
tuner_prompt.py # Kernel tuning prompt (str_replace edits)
config/
config_iterative.yaml # Iterative agent config
config_evolve.yaml # Evolve agent config
config_mini_test.yaml # Quick smoke test config
tasks_default.txt # Default task list
tasks_mini.txt # Minimal task list for smoke test
datasets/ # FlashInfer-Trace / MLSys contest datasets
requirements.txt # Python dependencies
MLSys 2026 FlashInfer AI Kernel Generation Contest: Agent Baseline
An LLM agent baseline for the MLSys 2026 FlashInfer AI Kernel Generation Contest. See the flashinfer-bench-starter-kit to get started.
An LLM agent baseline that iteratively generates and refines Triton kernels for high-performance LLM operations on NVIDIA GPUs, evaluated via FlashInfer-Bench. For the benchmarking framework code, see the flashinfer-bench repo.
Project Structure
Quick Start
0. Install Dependencies
1. Download the Dataset
2. Set API Key
3. Run the Agent
Local GPU:
Remote GPU via Modal (no local GPU needed):
The dataset is automatically uploaded to a Modal Volume on first run and cached for subsequent runs.
Agent Types
Config
Example (
config/config_iterative.yaml):Available configs:
config_iterative.yamlconfig_evolve.yamlconfig_mini_test.yamlKey parameters:
test_source:mlsys26-contestorflashinfer-traceagent_type:iterativeorevolvetasks_path: file listing op types / problem IDs to solvetotal_steps: number of iterations per taskapi_type:openaiorclaudemodel_name: LLM model to useeval_backend:local(default) ormodalfor remote GPU evaluationmodal_gpu: GPU type on Modal (e.g.B200)Task List Format
One op type per line. Optionally specify kernel definition IDs after the op type:
If no kernel definition IDs are given, all kernel definitions under that op type are loaded.
Output
Results are saved under
outputs/:Resume
Tasks with existing results are skipped; incomplete tasks continue from where they left off.
License
See LICENSE.