docs/cookbook/autoregressive/Qwen/Qwen3.8-Flash-Next.mdx
For all methods and hardware platforms, see the official SGLang installation guide. The two paths below match the Python / Docker toggle in the command panel.
<Tabs> <Tab title="Python (pip / uv)">Qwen3.8-Flash-Next support is not in a tagged release yet, so build the model-support PR rather than installing from PyPI:
pip install -U uv
uv venv --python 3.12 && source .venv/bin/activate
# Qwen3.8-Flash-Next model support:
# https://github.com/sgl-project/sglang/pull/36497
git clone https://github.com/sgl-project/sglang.git
cd sglang
git fetch origin pull/36497/head && git checkout FETCH_HEAD
uv pip install -e python
Then run the Python output of the command panel below in that environment.
</Tab> <Tab title="Docker">NVIDIA GPUs (H200 / B200 / B300 / GB300) — the launch image, since this is a day-0 model with no release cut yet:
docker pull lmsysorg/sglang:qwen38flashnext
AMD GPUs (MI350X / MI355X) — the matching ROCm build. It targets CDNA4 (gfx950) and is not interchangeable with the CUDA image above:
docker pull lmsysorg/sglang-rocm:qwen38flashnext
For how to launch either image, see Install → Method 3: Using Docker. Substitute the inner sglang serve ... with whatever the command generator below produces.
Pick your hardware + quantization to generate the launch command.
import { Deployment } from "/src/snippets/_deployment.jsx"; import { config } from "/src/snippets/configs/Qwen/qwen3.8-flash-next.jsx"; import { benchmarks } from "/src/snippets/configs/Qwen/qwen3.8-flash-next-benchmarks.jsx";
<Deployment config={config} benchmarks={benchmarks} />The Playground is where you experiment with SGLang features beyond the verified matrix. The Deploy panel above only emits combinations the SGLang team has signed off on; the Playground lets you turn on additional knobs on top of whichever cell the Deploy panel is currently showing.
import { Playground } from "/src/snippets/_playground.jsx";
<Playground config={config} />Qwen3.8-Flash-Next is a multimodal Mixture-of-Experts model released as an early preview of the architecture Qwen4 is being built on — the same role Qwen3-Next played for Qwen3.5, whose hybrid Gated DeltaNet + Gated Attention design then carried through the Qwen3.5, Qwen3.6, Qwen3.7 and Qwen3.8 series. Qwen is publishing the architectural changes ahead of the full Qwen4 family so the community can evaluate them independently.
It has 176B total parameters — 51B of which is an N-gram embedding table — and 6B active per token. Against Qwen3.7-Plus it cuts both training and inference cost substantially (training takes roughly 1/9 as much) while holding comparable overall quality. It takes text and images in, and the hosted production variant is served as qwen3.8-flash on QwenCloud.
The upgrades span four axes:
Carried over from Qwen3-Next and refined through the Qwen3.5–Qwen3.8 series: an ultra-sparse MoE (large expert pool, few routed experts per token plus one shared expert) with global load balancing; a multi-step-trained MTP module, whose own full-attention layers are QSA as well, which is what keeps speculative acceptance high in practice; and the training-stability set of zero-centered RMSNorm with weight decay on norm weights, attention output gating, and normalized MoE router initialization.
Context length: 262,144 native, extensible to 1,000,000 tokens with YaRN. License: see the model card's LICENSE.
Recommended generation: Qwen has not published sampling recommendations for this preview. SGLang applies the checkpoint's own generation_config.json, so leave temperature / top_p unset unless you have a measured reason not to.
Each precision is its own repository:
<table style={{width: "100%", borderCollapse: "collapse", tableLayout: "fixed"}}> <colgroup> <col style={{width: "18%"}} /> <col style={{width: "44%"}} /> <col style={{width: "38%"}} /> </colgroup> <thead> <tr style={{borderBottom: "2px solid #d55816"}}> <th style={{textAlign: "left", padding: "10px 12px", fontWeight: 700}}>Precision</th> <th style={{textAlign: "left", padding: "10px 12px", fontWeight: 700}}>Repository</th> <th style={{textAlign: "left", padding: "10px 12px", fontWeight: 700}}>Where it runs</th> </tr> </thead> <tbody> <tr style={{background: "rgba(255,255,255,0.02)"}}> <td style={{padding: "9px 12px"}}><strong>BF16</strong></td> <td style={{padding: "9px 12px"}}><a href="https://huggingface.co/Qwen/Qwen3.8-Flash-Next">Qwen/Qwen3.8-Flash-Next</a></td> <td style={{padding: "9px 12px"}}>H200, B200, B300, GB300, MI350X, MI355X</td> </tr> <tr> <td style={{padding: "9px 12px"}}><strong>FP8</strong></td> <td style={{padding: "9px 12px"}}><a href="https://huggingface.co/Qwen/Qwen3.8-Flash-Next-FP8">Qwen/Qwen3.8-Flash-Next-FP8</a></td> <td style={{padding: "9px 12px"}}>H200, B200, B300, GB300, MI350X, MI355X</td> </tr> <tr style={{background: "rgba(255,255,255,0.02)"}}> <td style={{padding: "9px 12px"}}><strong>NVFP4</strong></td> <td style={{padding: "9px 12px"}}><a href="https://huggingface.co/RadixArk/Qwen3.8-Flash-Next-NVFP4">RadixArk/Qwen3.8-Flash-Next-NVFP4</a></td> <td style={{padding: "9px 12px"}}>B200, B300, GB300 (Blackwell only)</td> </tr> </tbody> </table>Resources: Qwen's announcement.
Qwen3.8-Flash-Next always reasons — thinking cannot be turned off. --reasoning-parser auto (toggle Reasoning Parser in the Parsers card of the Playground above) lets SGLang pick the matching parser from the checkpoint's chat template, and splits the thinking into reasoning_content, leaving content as the answer alone. The resolved name is logged at startup if you want to pin it explicitly later.
Depth is requested with reasoning_effort. Qwen documents xhigh (the default), medium and low for the hosted model; SGLang forwards whatever you pass into the checkpoint's chat template.
from openai import OpenAI
client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY")
resp = client.chat.completions.create(
model="Qwen/Qwen3.8-Flash-Next",
messages=[{"role": "user", "content": "What is 15% of 240?"}],
reasoning_effort="xhigh", # xhigh (default) | medium | low
)
msg = resp.choices[0].message
print("Reasoning:", getattr(msg, "reasoning_content", None))
print("Answer:", msg.content)
Pending update — a sample transcript will be added here once the weights are public.
Add --tool-call-parser auto (toggle Tool Call Parser in the Parsers card of the Playground above) to surface structured tool calls via message.tool_calls. As with the reasoning parser, SGLang resolves the concrete detector from the chat template at startup. No Deploy cell sets it, so this is an opt-in: add the flag to the generated command, or flip the chip in the Playground.
Because this model always thinks, the final assistant turn can put text in reasoning_content rather than content — print both so a bare None doesn't mislead you.
from openai import OpenAI
client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY")
tools = [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather for a location",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string", "description": "The city name"},
"unit": {"type": "string", "enum": ["celsius", "fahrenheit"]},
},
"required": ["location"],
},
},
}
]
resp = client.chat.completions.create(
model="Qwen/Qwen3.8-Flash-Next",
messages=[{"role": "user", "content": "What's the weather in Beijing?"}],
tools=tools,
)
msg = resp.choices[0].message
print("Reasoning:", getattr(msg, "reasoning_content", None))
print("Content:", msg.content)
print("Tool calls:", msg.tool_calls)
Pending update — a sample transcript will be added here once the weights are public.