Skip to main content
SGLang supports a wide range of multimodal models that process images, videos, and audio alongside text inputs.

Overview

Multimodal models extend language models with specialized encoders for:
  • Vision - Image understanding and analysis
  • Video - Temporal reasoning and video QA
  • Audio - Speech and audio processing
  • Omnimodal - Combined modalities

Quick Start

Basic Vision Model

Image Request Example

Vision-Language Models

Qwen-VL Family

Alibaba’s vision-language models with strong image and video understanding.

Launch Qwen3-VL

Hardware Recommendations

  • H100 with FP8: Use FP8 checkpoint for best memory efficiency
  • A100/H100 with BF16: Use --mm-max-concurrent-calls to control memory
  • H200 & B200: Full context + concurrent image/video processing

Qwen-VL Video Support

Qwen-VL Optimization Flags

Key flags:
  • --mm-attention-backend fa3 - Use FlashAttention 3 for multimodal
  • --mm-max-concurrent-calls <N> - Control concurrent multimodal processing
  • --mm-per-request-timeout <seconds> - Timeout for large videos
  • --keep-mm-feature-on-device - Keep features on GPU (lower latency, higher memory)
  • SGLANG_USE_CUDA_IPC_TRANSPORT=1 - Shared memory pool for multimodal data

DeepSeek Vision Models

DeepSeek-VL2

Vision-language variant with advanced multimodal reasoning:

DeepSeek-OCR / OCR-2

Specialized for document understanding:
Recommended prompts:

DeepSeek-Janus-Pro

Image understanding AND generation:

Llama Vision

Meta’s vision-enabled Llama models:

LLaVA Family

Open vision-chat models:

Other Vision Models

Audio Models

Qwen3-Omni

Omni-modal model supporting audio input:
Note: Currently supports Thinker component (audio understanding) only. Audio generation (Talker) not yet supported.

Qwen2-Audio

Audio-specific model:

Phi-4-multimodal (Audio)

Supports text, vision, and audio:

Gemma3n-Audio

Google’s audio-enabled Gemma variant:

Video Understanding

Many vision models support video input through frame sampling:

Supported Video Models

Video Request Example

See the Image Request Example above, but replace image_url with video_url:

NVILA EVS Pruning

NVILA uses Embedded Video Sparsity (EVS) to remove redundant tokens:

Performance Optimization

Keep Features on Device

Trade GPU memory for lower latency:
Default behavior: Features moved to CPU after processing (saves GPU memory) With flag: Features stay on GPU (faster inference, more memory)

Multimodal Input Limits

Control memory usage and speed:
Note: Currently only qwen_vl processors support this config.

Concurrent Processing Control

Attention Backend Selection

Special Considerations

Gemma 3 Bidirectional Attention

Gemma 3 multimodal uses bidirectional attention between image tokens during prefill. Limitation: Only supported with Triton backend, incompatible with CUDA Graph and Chunked Prefill.
For better performance with some accuracy loss, use other backends (falls back to causal attention).

MiniCPM-o Audio/Video

MiniCPM-o adds audio/video support to MiniCPM-V:

GLM Models Chat Template

Some GLM vision models require specific chat templates:

NVILA Mamba Cache Size

NVILA uses hybrid Mamba-Transformer architecture:

Specialized Multimodal Models

OCR Models

Image Generation

Enterprise Models

Supported Model Architectures

SGLang supports 30+ multimodal model architectures. To verify support for a specific architecture, search GitHub:
Example:

Resources

Troubleshooting

Out of Memory with Images

Reduce max pixels:

Timeout on Large Videos

Increase timeout:

Slow Multimodal Latency

Keep features on device:

High GPU Memory with Videos

Limit concurrent processing:
Or reduce video frames: