Instructions to use Qwen/Qwen3.8-Flash-Next with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/Qwen3.8-Flash-Next with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Qwen/Qwen3.8-Flash-Next") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Qwen/Qwen3.8-Flash-Next") model = AutoModelForMultimodalLM.from_pretrained("Qwen/Qwen3.8-Flash-Next", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Qwen/Qwen3.8-Flash-Next with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Qwen/Qwen3.8-Flash-Next" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/Qwen3.8-Flash-Next", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Qwen/Qwen3.8-Flash-Next
- SGLang
How to use Qwen/Qwen3.8-Flash-Next with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Qwen/Qwen3.8-Flash-Next" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/Qwen3.8-Flash-Next", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Qwen/Qwen3.8-Flash-Next" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/Qwen3.8-Flash-Next", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use Qwen/Qwen3.8-Flash-Next with Docker Model Runner:
docker model run hf.co/Qwen/Qwen3.8-Flash-Next
Qwen3.8-Flash-Next at 57.6 GB: 80.5 tok/s on 2× 7900 XT, with only 32 GB of RAM
Hello,
I wanted to post a Flash-Next build I got running, because there's lots of threads here about vRAM and sysRAM. It's a 57.62 GB build at 2.60 bpw, quantized from the FP8 release, text only. The 125B language model and the 51.2B-parameter n-gram table are both in the file, so nothing is pruned out.
Model: SkyIsNotGreen/Scion-FlashNext-176B-A6B
The default file is 57.62 GB: 26.42 GB of ternary experts, 26.24 GB of Q4X160 n-gram table, and 4.95 GB of body, corrections and headers. It is 3.2x smaller than the 185.6 GB FP8 release.
How I got it running on my box
The model card says 64 GB+ host RAM, which is the safe number for the llama.cpp --cpu-moe path; there the experts and the PLE table stay on the host. My box is smaller:
- GPU: 2x RX 7900 XT 20 GB (40 GB VRAM total), layers split 26/22
- RAM: 32 GB system RAM
- Engine: Strata fork, with the local engine work I wrote, with the expert caches across both cards
- File: 60.17 GB Q4_0-table file, 4,096 context, greedy
Measured: 80.5-80.8 tok/s generation, about 12.4 ms/token, 2.3-2.4 tokens per pipeline window (--pipeline-windows 2, which is +62-68% over the same engine without it on this workload). These deltas suggest there might be unrealized performance gains in the direction of expert streaming, cross-system GPU/CPU bandwidth (pcie gen), and possibly sticky hot-experts, mostly engine work, more testing is needed.
The same run as the numbers above: 60.17 GB Q4_0-table file, 4,096 context, greedy.
The 64 GB note is for that --cpu-moe path. The two-card path is why 32 GB works here: 40 GB of vRAM plus 32 GB of sysRAM is 72 GB of memory in the box for a 60 GB file, and the hot experts sit in the caches on the two cards. I would not assume every 32 GB box will do the same, so watch the RSS. The 57.62 GB default is smaller than the file I measured and should be the easier fit; I have not measured that one on this box yet.
What's in the file
- Language model: 125B total, 6B activated per token, 512 experts top-10 routed plus 1 shared, 48 layers, 3:1 GatedDeltaNet / indexed full attention, 262,144-token context.
- N-gram table: 51.2B parameters (320,001,536 rows x 160), in per-row Q4X160: 26.24 GB instead of 28.8 GB at Q4_0. The measured cost of that container is +0.41% PPL, with HellaSwag 0.00 and Winogrande +0.25 on the 400-task paired gate; that is noise-level.
- Experts: ternary PTQ1_0 at 1.75 bpw, 5 trits per byte plus a 2-trit field and one fp16 scale per 128 weights.
- Body: Q6_K + Q8_0, norms stay F32.
- Corrections: rank-512 branches on the attention output and the MoE block output, plus router deltas, trained by output-KD with the deployed quantizer in the loop. They are merged into the file, so there is no
--lora, no sidecar and no shards. - Not included: the base's 4B MTP head and the vision tensors. Text only. (i forgor)
Where it sits
The official FP8 release is 185.6 GB. The comparison builds I have sizes for:
| Build | Size |
|---|---|
| FP8 release | 185.6 GB |
| ggml-org IQ4_NL | 102.0 GB |
| Mooney PQ2_0 | 92.0 GB |
| GSQ-RCO IQ3_S | 83.6 GB |
| GSQ-RCO IQ3_XXS | 75.8 GB |
| GSQ-RCO IQ2_XS | 68.0 GB |
| GSQ-RCO Q2_0 | 66.4 GB |
| Scion F16 body | 65.80 GB |
| Scion Q4_0 table | 60.17 GB |
| Pruned coder IQ1_M | 58.4 GB |
| Scion default | 57.62 GB |
The pruned coder IQ1_M is the next smallest file I can see. As far as I know this is the smallest unpruned build of the model; if I missed one, I would like the link.
The measured trade
A/B against ISTA's GSQ-RCO Q2_0, one harness, same 400 tasks. PPL is wikitext-2:
| Variant | Size | PPL | HellaSwag 400 | Winogrande 400 |
|---|---|---|---|---|
| Scion (Q6_K body, Q4_0 table) | 60.17 GB | 5.457 | 82.00 | 77.50 |
| ISTA GSQ-RCO Q2_0 | 66.4 GB | 5.240 | 81.50 | 74.75 |
The trade is size for likelihood: the 1.75 bpw experts trail ISTA on likelihood by about 4%, HellaSwag is a tie on the paired test (12 vs 10 discordant, p = 0.83), and Winogrande looks positive but is not conclusive (38 vs 27, p = 0.22). On the project's 20-task capability screen the Q6_K body scores 15/20 with 0 harness errors.
KLD is still the weak part: the 48-layer gate gives mean 0.5800, and 92.9% of that mass is the top-512 support. The step-4000 extension was trained, gated at 0.5880 (flat/worse), and is not shipped. The 664-task reasoning/code run is a floor, not a capability test: the harness caps generation at 700/2048 tokens, and this model's thinking trace is long. On think-harder, 175 of the 178 cap-hit records emitted no final answer because the 2048-token cap stopped the trace; the 67.6% headline includes those records, while the 91.8% is only the records that completed inside the cap. A fair number needs a larger thinking budget.
The headline is a floor, not a capability number. "Completed" means the record finished inside the fixed token cap; the gen arm hit the 700-token cap on 16% of records but left no record without an answer.
What I did not test
- Only this 32 GB box, so I have no CUDA or Metal numbers for the two-card path.
- The 80.5-80.8 tok/s is the 60.17 GB Q4_0-table file; I have not measured the 57.62 GB default here.
- Only greedy at 4,096 context, so no long-context or sampling numbers.
- The 664-task result is cap-truncated and should be read as a floor.
- Text only; no vision, no MTP head. (i forgor)
Try it
The runtime is sky-is-green/prism-ml-llama.cpp, branch qwen4exp-proto. Stock llama.cpp will throw invalid ggml type 143 or 146, and the qwen4exp architecture is not upstream either. CPU, ROCm/gfx1100 and CUDA (sm_80 A100, sm_120 RTX PRO 6000) are verified; Metal is untested. On a single 48 GB card, this keeps the experts and the PLE table on the host:
./build/bin/llama-server -m Scion-FlashNext-176B-A6B-Q6_K-Q4X160.gguf -ngl 99 \
--cpu-moe -ot per_layer_token_embd.weight=CPU -fa on --numa distribute \
-c 512 --port 8080
My work is primarily aiming at local-first, but any results would be nice to see! CUDA and ROCm: tok/s, context, peak RSS/VRAM, and the exact launch command. If you have a 2x 20 GB card box, I would like to know if the 32 GB result holds on your machine. If you have an ISTA Q2_0 number on the same harness, that is more useful than another synthetic benchmark. The harness, the per-stage scripts, the KLD gates and the negative register are in sky-is-green/scion; the model card has the full tables and the caveats.


