Supported Models
All LFM model types are supported as of SGLang v0.5.10.
Installation
Install SGLang following the official installation guide. The recommended method is (requiressglang>=0.5.10):
Launching the Server
By default the model runs in bfloat16. To use float16 instead, add
--dtype float16 and set export SGLANG_MAMBA_CONV_DTYPE=float16 before launching.- Python
- Docker
Usage
SGLang exposes an OpenAI-compatible API.Vision Models
Launch a vision-language model:Curl request example
Curl request example
Offline Inference
SGLang’sEngine class provides a simple interface for offline inference without launching a server. This is useful for scripts, notebooks, and batch processing.
In Jupyter notebooks, you must apply
nest_asyncio before creating the engine, because SGLang uses an async event loop internally.Text Generation
Vision Models
Low Latency on Blackwell (B300)
Running a 1.2B model on a B300 may sound counterintuitive, but combining--enable-torch-compile with Blackwell’s architecture unlocks extremely low latency — ideal for latency-sensitive workloads like RAG, search, and real-time chat.
Key flags for low latency:
--enable-torch-compile: Compiles the model with Torch for faster execution. Adds startup time but significantly reduces per-token latency.--chunked-prefill-size -1: Disables chunked prefill, processing the full prompt in one pass. This lowers TTFT at the cost of slightly reduced throughput under high concurrency.
Benchmark command
Benchmark command