Back to services

vLLM

A high-throughput and memory-efficient inference and serving engine for LLMs

View alternatives to vLLM
Suggest edit
Open source
Self-hostable
Apache-2.0
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Note: Fetching the official website failed, so the content below is compiled from what is known about the vLLM project. Please refer to the official website and documentation for version details, supported hardware and the list of supported models.

Introduction

vLLM is a high-performance library for large language model inference and serving. It was originally developed at the Sky Computing Lab at UC Berkeley and is now a community-driven open-source project released under the Apache 2.0 license. Its goal is to make LLM inference easier, faster and cheaper, and it has become one of the most widely used inference engines for self-hosting open-source large models.

Key Features

  • PagedAttention: Borrows paged memory management from operating systems to manage the attention KV cache, significantly reducing GPU memory fragmentation and waste.
  • Continuous Batching: Dynamically merges incoming requests to improve GPU utilization and overall throughput.
  • OpenAI-compatible API server: Start an HTTP server with a single command; existing applications built on the OpenAI SDK can connect with little to no code changes.
  • Quantization support: Supports GPTQ, AWQ, INT8, FP8 and other quantization methods to reduce GPU memory requirements.
  • Distributed inference: Supports tensor parallelism and pipeline parallelism, so large models can be split across multiple GPUs or multiple machines.
  • Inference acceleration techniques: Speculative Decoding, Prefix Caching, chunked prefill and more.
  • Multi-LoRA serving: Serve multiple LoRA adapters on top of the same base model at the same time.
  • Broad model ecosystem: Integrates seamlessly with Hugging Face models and supports mainstream open-source LLMs, MoE models, multimodal models and embedding models.

Target Users and Use Cases

  • Companies and teams that need to deploy open-source large models on their own GPU clusters
  • Building private ChatGPT-style services or internal AI platforms
  • Large-scale offline batch inference, such as data labeling and synthetic data generation
  • AI application developers who need high-concurrency, low-latency inference services
  • Researchers working on model evaluation and inference optimization

Core Strengths

  • Much higher throughput than traditional Hugging Face Transformers inference
  • Simple deployment and good compatibility with the API ecosystem
  • Active community; new models are usually supported quickly
  • Supports multiple hardware backends: besides NVIDIA GPUs, it also supports platforms such as AMD GPUs, CPUs and TPUs to varying degrees

Installation and Usage

Install with pip:

pip install vllm

Start an OpenAI-compatible server:

vllm serve <model name or path>

Offline inference in Python:

from vllm import LLM, SamplingParams
llm = LLM(model="<model name>")
outputs = llm.generate(["你好"], SamplingParams(temperature=0.8))

Official Docker images are also provided, making it easy to deploy in containers or run on Kubernetes.

Technical Requirements

  • Requires a Linux and Python environment
  • NVIDIA GPUs (CUDA) are recommended; for the specific requirements of other hardware backends, consult the official documentation
  • The required GPU memory depends on the model size and quantization method

Notable Characteristics

  • Open source under the Apache 2.0 license, and can be used commercially
  • Common alternatives and comparable solutions include Hugging Face TGI, SGLang, TensorRT-LLM, llama.cpp and Ollama. Of these, llama.cpp and Ollama are better suited to lightweight personal or local use