Meta’s 8B KernelLLM beat GPT-4o and DeepSeek V3 at writing Triton GPU kernels
Made by Zacharias V. Fisches and 10 co-authors
The result
The story
From PyTorch to Triton
AI models run on GPU kernels: small programs that tell the chip how to do one operation, such as a convolution. Meta’s team writes that demand for fast kernels keeps growing as workloads grow and new accelerators appear, and built KernelLLM to make writing them in Triton, a GPU programming language, more accessible.

The task is narrow. The model gets one PyTorch module and must return an equivalent Triton kernel and the code that calls it. A candidate counts only if it passes unit tests that run it on random inputs and compare the result with PyTorch’s.
Data
PyTorch-Triton training pairs
About 25,000 pairs plus synthetic samples (number not given)
Filtered code from The Stack and synthetic examples made with torch.compile() and prompting; the card links GPU MODE’s KernelBook (18,162 pairs)
The card’s metadata also lists KernelBench among the model’s datasets, without explanation.
Small model
KernelLLM
8B · Meta
Supervised fine-tuning on PyTorch-Triton pairs, with the same prompt template, including a format example, in training and evaluation
- Base
- Llama 3.1 8B Instruct
Meta fine-tuned Llama 3.1 8B Instruct on these pairs. The card contrasts this with work that tunes on solutions to KernelBench problems and says that, to its knowledge, KernelLLM is the first model fine-tuned on external PyTorch-Triton pairs. It also says the reported numbers are the results of the best checkpoint on validation.
Training
Supervised fine-tuning (full or LoRA not stated)
10 epochs, batch size 32, hyperparameters chosen by perplexity on held-out training data
- Time
- About 12 hours (192 GPU-hours; the hardware section says 250 hours in total)
Not reported: cost.
Scored on one benchmark level
Large model
DeepSeek R1
671B · DeepSeek
Used as released; prompt and sampling not described
- Base
- DeepSeek’s reasoning model (January 2025 release)
Evaluation
100 problems (KernelBench dataset)
- Test set
- KernelBench-Triton Level 1: Meta’s Triton variant of KernelBench’s single-operator problems
- Metric
- pass@1: share of problems solved by a single generated kernel (the card doesn’t state the unit)
- How it was compared
- KernelLLM sampled at temperature 1.0 and top_p 0.97; the baselines’ prompts and settings aren’t described. All measurements on
NVIDIA H100 GPUs.
In one attempt, KernelLLM scored 20.2, ahead of DeepSeek V3 (16), GPT-4o (15), Qwen2.5 32B (15) and Llama 3.3 70B (13). DeepSeek R1, a reasoning model, scored 30, the best in the table. The card’s claim that KernelLLM outperforms R1 compares KernelLLM given 10 or 20 attempts (51.8 and 57.1) with R1’s single attempt.
Those KernelLLM numbers were revised on 14 May 2025, up from 15.5, 34.7 and 39.8 four days earlier, without an explanation. The card measures correctness only, not the speed of the kernels, and gives no cost or latency.
All the numbers
Show all numbersHide all numbersEvery model · Cost, latency and energy · 7 more results
Every model on the headline test
Cost, latency and energy, as reported
- Cost
- Not reported
- Latency
- Not reported
- Energy
- Not reported
- No figure. The card says training emissions were offset by Meta’s sustainability programme.
More from the source
pass@1
Small model 20.2DeepSeek V3 (671B) 16 score
Model card table
pass@1
Small model 20.2Qwen2.5 32B 15 score
Model card table
pass@1
Small model 20.2Llama 3.3 70B 13 score
Model card table
pass@1
Small model 20.2DeepSeek R1 (671B, reasoning model) 30 score
DeepSeek R1 is ahead in a single attempt. The card says KernelLLM overtakes R1 with multiple attempts (pass@10 51.8, pass@20 57.1), which compares different numbers of tries.
Model card table
pass@1
Small model 20.2Llama R1 Distill 70B (reasoning) 11 score
Model card table
pass@1, before fine-tuning
Llama 3.1 8B Instruct (the untuned base) 6 score
The same base model scores 14 at pass@20.
Model card table
pass@10 / pass@20
KernelLLM 51.8 / 57.1 score
No large model is reported at pass@10 or pass@20.
Model card table
Worth knowing
- DeepSeek R1, a reasoning model, scores higher in a single attempt (30 vs 20.2). The win is over non-reasoning models: GPT-4o (15) and DeepSeek V3 (16).
- Meta built both the model and the benchmark variant, and ran all the baselines; no independent replication.
- The card’s KernelLLM numbers were revised: on 10 May 2025 the table showed 15.5 (pass@1), 34.7 (pass@10) and 39.8 (pass@20), below DeepSeek V3’s 16 at pass@1; on 14 May 2025 they became 20.2, 51.8 and 57.1, with new charts and a re-upload of repo files the same day. The card doesn’t explain the change (Hugging Face commit history).
- Baseline prompting and sampling settings are not described; GPT-4o’s size (~200B) is Meta’s estimate.
2 more caveats
- The score’s unit is not stated, and the margin over GPT-4o is about five points on a single benchmark level.
- Correctness only: no speed-up of the generated kernels is reported.
Weights on Hugging Face
Verified 03 Oct 2026 (Hugging Face API: 8.03B parameters, base_model meta-llama/Llama-3.1-8B-Instruct, licence ‘other’, not gated).
- facebook/KernelLLMKernelLLM
Sources
- KernelLLM model card, Meta, Hugging Face (Model Performance table)
- Model card edit history (results revised 14 May 2025)
- KernelBench-Triton, pull request #35 on ScalingIntelligence/KernelBench
- KernelBook training dataset, Hugging Face
- Hugging Face repo created 14 Apr 2025; the results table has its current numbers since the card edit of 14 May 2025; the card’s citation block says June 2025.

