SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2501.01005 · 2025

FlashInfer: Efficient and Customizable Attention Engine for LLM Inference Serving

arXiv · PDF · Open in the Atlas

Code that ran

5 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 11 no recorded run), measured 2026-11-21; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2501.01005.json · badge: /api/ran/2501.01005.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
flashinfer-ai/flashinfer canonical (classifier label)
classifier basis not recorded on the link
5 ran · 11 no recorded run
FunctionStatusWhere it lives
min_block_table_width Ran
ran on a synthesized input
flashinfer-ai/flashinfer/flashinfer/attn_scores/attn_scores.py
code served (permissive licence) · get_code("42cb35beca6e09b0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

torch.manual_seed(0)

# The function min_block_table_width takes two integer parameters:
# seq_len: the sequence length
# block_size: the size of each block
# It returns ceil(seq_len / block_size), which is the minimum number of columns
# needed in block_tables to accommodate a sequence of that length.

ARGS = {
    "seq_len": 1024,
    "block_size": 16,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
normalize_cuda_architecture Ran
ran on a synthesized input
flashinfer-ai/flashinfer/flashinfer-jit-cache-provider/package_config.py
code served (permissive licence) · get_code("97b676335b993413")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def normalize_cuda_architecture(architecture: str) -> tuple[str, str]:
    """Return ``(nvcc_arch, provider_tag)`` for a CUDA architecture spelling."""
    normalized = architecture.strip().lower()
    for prefix in ('compute_', 'sm_', 'sm'):
        if normalized.startswith(prefix):
            normalized = normalized[len(prefix):]
            break
    dotted_match = re.fullmatch('(\\d{1,2})\\.(\\d)([af]?)', normalized)
    compact_match = re.fullmatch('(\\d{2,3})([af]?)', normalized)
    if dotted_match is not None:
        major = int(dotted_match.group(1))
        minor = int(dotted_match.group(2))
        suffix = dotted_match.group(3)
    elif compact_match is not None:
        digits, suffix = compact_match.groups()
        major = int(digits[:-1])
        minor = int(digits[-1])
    else:
        raise ValueError(f"Invalid FLASHINFER_JIT_CACHE_PROVIDER_ARCH={architecture!r}; use a value such as '8.0', '9.0a', or 'sm120f'")
    nvcc_arch = f'{major}.{minor}{suffix}'
    provider_tag = f'sm{major}{minor}{suffix}'
    return (nvcc_arch, provider_tag)

ARGS = {
    "architecture": "8.0"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
padded_seq_len Ran
ran on a synthesized input
flashinfer-ai/flashinfer/flashinfer/attn_scores/attn_scores.py
code served (permissive licence) · get_code("96eca989be463f73")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function padded_seq_len takes a single parameter: max_seq_len (int)
# It performs arithmetic operations on this integer to round it up to a granularity
# No complex objects needed, just an integer value

ARGS = {
    "max_seq_len": 256
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_bool Ran
ran on a synthesized input
flashinfer-ai/flashinfer/flashinfer/aot.py
code served (permissive licence) · get_code("c6baeb0a93584501")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

ARGS = {
    's': 'true'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_head_dim Ran
ran on a synthesized input
flashinfer-ai/flashinfer/flashinfer/aot.py
code served (permissive licence) · get_code("3ea5257687b4a413")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function parse_head_dim takes a string parameter 'head_dim'
# It splits the string by comma, converts each part to int, and returns a tuple
# Example: "128,64" -> (128, 64)

ARGS = {
    "head_dim": "128,64"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_editable Not yet run
unverified (harvested, no recorded run)
flashinfer-ai/flashinfer/flashinfer-cubin/build_backend.py
code served (permissive licence) · get_code("44a0c38fcf791070")
How it ran

no invocation recorded.

build_wheel Not yet run
unverified (harvested, no recorded run)
flashinfer-ai/flashinfer/flashinfer-cubin/build_backend.py
code served (permissive licence) · get_code("8b66f8de9a6161fa")
How it ran

no invocation recorded.

flush_graph_dumps Not yet run
unverified (harvested, no recorded run)
flashinfer-ai/flashinfer/flashinfer/api_logging.py
code served (permissive licence) · get_code("4d8db70f7a999b76")
How it ran

no invocation recorded.

get_act_and_mul_module Not yet run
unverified (harvested, no recorded run)
flashinfer-ai/flashinfer/flashinfer/activation.py
code served (permissive licence) · get_code("3abbd9a8cd490c7a")
How it ran

no invocation recorded.

get_available_cubin_files Not yet run
unverified (harvested, no recorded run)
flashinfer-ai/flashinfer/flashinfer/artifacts.py
code served (permissive licence) · get_code("6438bbe2fa20b253")
How it ran

no invocation recorded.

get_available_header_files Not yet run
unverified (harvested, no recorded run)
flashinfer-ai/flashinfer/flashinfer/artifacts.py
code served (permissive licence) · get_code("7de81a2e3fa334d6")
How it ran

no invocation recorded.

get_checksums Not yet run
unverified (harvested, no recorded run)
flashinfer-ai/flashinfer/flashinfer/artifacts.py
code served (permissive licence) · get_code("67f1e79951ba168d")
How it ran

no invocation recorded.

prepare_metadata_for_build_wheel Not yet run
unverified (harvested, no recorded run)
flashinfer-ai/flashinfer/flashinfer-jit-cache-provider/build_backend.py
code served (permissive licence) · get_code("21affb9cd865c03b")
How it ran

no invocation recorded.

prepare_metadata_for_build_wheel Not yet run
unverified (harvested, no recorded run)
flashinfer-ai/flashinfer/flashinfer-jit-cache/build_backend.py
code served (permissive licence) · get_code("80e22b335608272d")
How it ran

no invocation recorded.

replay_from_dump Not yet run
unverified (harvested, no recorded run)
flashinfer-ai/flashinfer/flashinfer/api_logging.py
code served (permissive licence) · get_code("85b3d4c658379be0")
How it ran

no invocation recorded.

replay_sequence Not yet run
unverified (harvested, no recorded run)
flashinfer-ai/flashinfer/flashinfer/api_logging.py
code served (permissive licence) · get_code("3671383ef718172c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 15 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Transformers, driven by attention mechanisms, form the foundation of large language models (LLMs). As these models scale up, efficient GPU attention kernels become essential for high-throughput and low-latency inference. Diverse LLM applications demand flexible and high-performance attention solutions. We present FlashInfer: a customizable and efficient attention engine for LLM serving. FlashInfer tackles KV-cache storage heterogeneity using block-sparse format and composable formats to optimize memory access and reduce redundancy. It also offers a customizable attention template, enabling adaptation to various settings through Just-In-Time (JIT) compilation. Additionally, FlashInfer's load-balanced scheduling algorithm adjusts to dynamism of user requests while maintaining compatibility with CUDAGraph which requires static configuration. FlashInfer have been integrated into leading LLM serving frameworks like SGLang, vLLM and MLC-Engine. Comprehensive kernel-level and end-to-end evaluations demonstrate FlashInfer's ability to significantly boost kernel performance across diverse inference scenarios: compared to state-of-the-art LLM serving solutions, FlashInfer achieve 29-69% inter-token-latency reduction compared to compiler backends for LLM serving benchmark, 28-30% latency reduction for long-context inference, and 13-17% speedup for LLM serving with parallel generation.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2501.01005")
get_code_for_paper("2501.01005")
have("2501.01005")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2501.01005.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2501.01005.svg)](https://syntology.ai/paper/2501.01005)

Connect an agent — have() is free.