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

GitHub
AI Deploy2018

Serves machine learning and deep learning models for cloud, data center, edge and embedded environments. Supports multiple frameworks and backends, dynamic and sequence batching, HTTP/gRPC APIs, Docker deployment and NVIDIA-optimized runtimes.

GitHub
AI Deploy2026

Pools multiple ChatGPT/Codex accounts behind a local OpenAI-compatible proxy and dashboard — provides request load balancing, per-account usage/cost tracking, API-key management, and configurable routing strategies.

GitHub
AI Video2025

Automatically transfers YouTube videos to AcFun and bilibili with an end-to-end pipeline: downloading, ASR, subtitle translation and QC, AI-generated metadata, content moderation, and automated uploads; includes a web dashboard and monitoring.