vLLM

Active
GitHub Python Apache-2.0

Description

A high-throughput and memory-efficient inference and serving engine for LLMs, featuring PagedAttention, continuous batching, and optimized KV cache management for production deployments.

Key Features

  • PagedAttention memory management - Efficiently manages attention KV cache via paging, dramatically reducing memory usage
  • Continuous batching and chunked prefill - Supports continuous batching, chunked prefill, and prefix caching for high-throughput inference
  • Multi-quantization support - Covers FP8, INT8, INT4, GPTQ/AWQ, GGUF, compressed-tensors, and more quantization formats
  • 200+ model architecture compatibility - Seamlessly supports decoder-only, MoE, hybrid attention, and multi-modal models on HuggingFace
  • Distributed inference - Supports tensor, pipeline, data, expert, and context parallelism for scaling across devices
  • OpenAI-compatible API - Provides OpenAI-compatible server with Anthropic Messages API and gRPC protocol support

Use Cases

💡 Production LLM inference serving, providing high-throughput low-latency model APIs for AI applications
💡 Multi-GPU parallel inference for running large parameter models across distributed devices
💡 Quantized model deployment using INT8/INT4/FP8 to run large models within limited GPU memory
💡 Building RAG system inference backends for efficient text generation in retrieval-augmented scenarios
💡 Multi-modal model serving for deploying vision-language models that understand both text and images

Quick Start

# Install vLLM
pip install vllm

# Start OpenAI-compatible API server
python -m vllm.entrypoints.openai.api_server \
    --model meta-llama/Llama-3-8B-Instruct

# Or use Python API for direct inference
from vllm import LLM
llm = LLM(model="meta-llama/Llama-3-8B-Instruct")
output = llm.generate("Hello, what is AI?")
print(output[0].outputs[0].text)

Related Projects