AIAny
AI Deploy2024
Icon for item

FlashInfer

GPU kernel library for LLM inference attention, sampling, and KV-cache, built on block-sparse formats with JIT-compiled customizable templates. Reports 29-69% inter-token-latency cuts vs compiler backends; powers SGLang, vLLM, and MLC-Engine.

Introduction

Inference servers spend most of their time not in the model weights but in attention and KV-cache movement, and those kernels have to handle wildly different request shapes at once. FlashInfer's bet is that a single attention engine, specialized at runtime, can beat hand-tuned kernels across all of them — and the numbers back it up.

Key Findings
  • A block-sparse plus composable KV-cache format lets one kernel serve prefill, decode, shared-prefix batches, and ragged batches without separate code paths, cutting redundant memory traffic.
  • JIT compilation generates an attention variant tailored to each workload, so customization doesn't cost the usual performance penalty of generic kernels.
  • A load-balanced scheduler adapts to request dynamism while staying CUDAGraph-compatible, the part most ad-hoc kernels break on.
  • Measured gains: 29-69% inter-token-latency reduction vs compiler backends, 28-30% for long-context, 13-17% for parallel generation on H100.
Who It's For

Great fit if you build or operate an LLM serving stack and want attention kernels that already feed SGLang, vLLM, and MLC-Engine rather than rolling your own. Look elsewhere if you only run small batches on consumer GPUs, where the scheduling and format machinery adds complexity without paying off, or if you need kernels outside the attention/sampling path.

Information

  • Websiteflashinfer.ai
  • OrganizationsNVIDIA, University of Washington, Carnegie Mellon University, Perplexity AI
  • AuthorsFlashInfer team
  • Published date2024/02/02

Categories

More Items

Hugging Face
AI Model2026

Packages Inkling 2 Mini for local inference with Strata in three sizes for different memory budgets. The largest pack matched the original model’s next-token predictions in the reported tests.

GitHub
AI Infra2026

Runs and serves language models locally on Apple Silicon and GPUs using native Metal, CUDA, and other backends. Its Zig engine performs inference without requiring Python or MLX.

Hugging Face
AI Model2026

Provides GGUF quantizations of DeepSeek-V4.1-Flash-1017 for local inference, with swappable Engram n-gram tables. Even the smallest quant requires about 128 GB of memory; SSD offloading can reduce the amount kept resident.