Running Qwen3.8-Flash-Next-AWQ-INT4

#1
by cpatonn - opened
cyankiwi org

Running Qwen3.8-Flash-Next-AWQ-INT4

Support for this architecture is not in vLLM main yet — build from the PR.

1. Build vLLM from source (PR #53899 = model support + PLE offload)

git clone https://github.com/vllm-project/vllm.git && cd vllm
git fetch origin pull/53899/head:qwen38 && git checkout qwen38   # includes PR #53896

pip install torch torchvision torchaudio
pip install "setuptools-scm>=8" "setuptools-rust>=1.9" cmake ninja
VLLM_USE_PRECOMPILED=1 pip install -e . --no-build-isolation

2. Serve — MTP + PLE offloaded

VLLM_PLE_CPU_OFFLOAD=1 \
VLLM_GDN_DECODE_KERNEL=triton \
vllm serve cyankiwi/Qwen3.8-Flash-Next-AWQ-INT4 \
  --mamba-cache-mode align \
  --speculative-config '{"method":"mtp","num_speculative_tokens":3}' \
  --max-model-len 32768 \
  --enable-prefix-caching

VLLM_PLE_CPU_OFFLOAD=1 keeps the 95 GiB bf16 PLE n-gram embedding on CPU (54 % of the
checkpoint); without it you need ≈176 GiB of VRAM for weights alone.

3. Query

curl http://localhost:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{
  "model": "cyankiwi/Qwen3.8-Flash-Next-AWQ-INT4 ",
  "messages": [{"role":"user","content":[
      {"type":"image_url","image_url":{"url":"https://example.com/cat.jpg"}},
      {"type":"text","text":"What is in this image?"}]}],
  "max_tokens": 256}'

Is there any way to run the PLE n-gram embeddings at FP8? (I got 64 RAM without the option to upgrade and a single Pro 6000)

Is there any way to run the PLE n-gram embeddings at FP8? (I got 64 RAM without the option to upgrade and a single Pro 6000)

yes here https://huggingface.co/primitive-ai/Qwen3.8-Flash-Next-NVFP4

This worked for me so I had an LLM put it on git. Thanks for the quant!!

this how to is for vllm + patch + container + pipeline parallel + mtp + PLE offload to ram
https://github.com/vektorprime/qwen38-flash-next-pp2

edit: Just wanted to let you all know this release is working very well now, all bugs ironed out and I'm using it daily

Patiently waiting for Sglang + FP8 PLE n-gram RAM support to use those awesome quants

This worked for me so I had an LLM put it on git. Thanks for the quant!!

this how to is for vllm + patch + container + pipeline parallel + mtp + PLE offload to ram
https://github.com/vektorprime/qwen38-flash-next-pp2

Any way to easily expand this to 4x 24GB GPUs instead of 2x 48GB? Im trying to max out context or at least reach 200+ with 4x3090 and 256 system RAM.

This worked for me so I had an LLM put it on git. Thanks for the quant!!

this how to is for vllm + patch + container + pipeline parallel + mtp + PLE offload to ram
https://github.com/vektorprime/qwen38-flash-next-pp2

Any way to easily expand this to 4x 24GB GPUs instead of 2x 48GB? Im trying to max out context or at least reach 200+ with 4x3090 and 256 system RAM.

I have not personally tested this fork but I did speak to the guy who made it. He said it runs well. It works with PP > 3. https://github.com/zebgop-ops/qwen38-flashnext-pp

If that fails for you let me know

@cpatonn
There is an official image; I don't know about the current status but maybe it's easier than messing around with forks:

https://hub.docker.com/r/vllm/vllm-openai/tags?name=qwen38-flash
vllm/vllm-openai:qwen38-flash-next
vllm/vllm-openai:qwen38-flash-next-arm64-cu130
vllm/vllm-openai:qwen38-flash-next-x86_64-cu130
vllm/vllm-openai:qwen38-flash-next-arm64-cu129
vllm/vllm-openai:qwen38-flash-next-x86_64-cu129

What speeds are to be expected on 4x 3090 and PLE offloading?

@cpatonn
There is an official image; I don't know about the current status but maybe it's easier than messing around with forks:

https://hub.docker.com/r/vllm/vllm-openai/tags?name=qwen38-flash
vllm/vllm-openai:qwen38-flash-next
vllm/vllm-openai:qwen38-flash-next-arm64-cu130
vllm/vllm-openai:qwen38-flash-next-x86_64-cu130
vllm/vllm-openai:qwen38-flash-next-arm64-cu129
vllm/vllm-openai:qwen38-flash-next-x86_64-cu129

What speeds are to be expected on 4x 3090 and PLE offloading?

I don't believe the official fork will actually work for us. It can't run this image. However, I've done some testing on the AI slop fork I linked earlier and it's working quite well. I provided all the patches there so you can vet them yourself.

Is there any way to run the PLE n-gram embeddings at FP8? (I got 64 RAM without the option to upgrade and a single Pro 6000)

I have been daily driving this branch of the repo I have - https://github.com/vektorprime/qwen38-flash-next-pp2/tree/ple-fp8
The PLE embeddings are FP8 here and save space. They now take up about ~50GB of RAM.

Is there any way to run the PLE n-gram embeddings at FP8? (I got 64 RAM without the option to upgrade and a single Pro 6000)

https://github.com/DominikBucko/qwen38-flash-next-2x3090.

Why is the INT4 quantized version almost the same size as the official FP8 version? Is there a mistake?

Why is the INT4 quantized version almost the same size as the official FP8 version? Is there a mistake?

If I had to guess it's probably because the ngrams here are left in BF16. They take about 100GB in RAM (if you offload), and you can of course use FP8 on them to make it 50GB.

Sign up or log in to comment