Skip to main content

Overview

SGLang provides an alternative high-performance serving solution for Qwen3-VL models. You can start an SGLang server to serve models efficiently with an OpenAI-style API.

Starting the SGLang Server

Launch the SGLang server with the following command:

Server Parameters

  • --model-path: Path to the model (local path or HuggingFace model ID)
  • --host: Server host address (default: 0.0.0.0)
  • --port: Server port (default: 22002)
  • --tp: Tensor parallelism size for multi-GPU deployment

Making Requests

Once the server is running, you can make requests using the OpenAI-compatible API.

Image Request Example

Video Request Example

Offline Inference

You can also use SGLang for local offline inference without running a server:

Engine Configuration

The SGLang Engine supports various configuration options:
  • model_path: Path to the model checkpoint
  • enable_multimodal: Enable multimodal support (required for Qwen3-VL)
  • mem_fraction_static: GPU memory fraction for static allocation (0.0-1.0)
  • tp_size: Tensor parallelism size for multi-GPU deployment
  • attention_backend: Attention implementation (e.g., “fa3” for FlashAttention 3)
  • context_length: Maximum context length
  • disable_cuda_graph: Disable CUDA graph optimization (may be needed for stability)

Next Steps