Qwen3.8-Flash-Next Large Context?

I’m newish to running a 2 spark cluster and am using EUGR’s Recipe: Qwen3.8-Flash-Next-NVFP4 (dual-node cluster) Two-node configuration using the B12X-optimized serving stack. However, context is limited to 264k context window. I’d like to get at least double that or even 1m, but any fiddling with the recipe has resulted in crashing.

Can some kind soul point me to a good recipe or the good changes to this recipe that gets a large context?

Since I’m running only a single Spark, my experience is based on the sister recipe. Depending on what you want to achieve you could override some of recipe’s parameters without modifying the recipe itself, but rather by adding command arguments, setting env variables and/or passing vllm options after a leading double dash (–) which stops bash from interpreting the following options as arguments for the launched command (so they are passed further down the line to vllm).

Just as an example, here is how I’m launching the qwen3.8-flash-next-nvfp4-solo.yaml recipe:

./run-recipe.sh qwen3.8-flash-next-nvfp4-solo \
--apply-mod mods/install-fastokens \
-e VLLM_MARLIN_USE_ATOMIC_ADD=1 \
-e VLLM_USE_FASTOKENS=1 \
--solo \
--earlyoom \
-- \
--gpu-memory-utilization 0.87 \
--max-num-batched-tokens 5920 \
--max-num-seqs 16 \
--speculative-config 'null' \
--compilation-config '{"mode": 3, "pass_config": {"fuse_act_quant": true, "fuse_norm_quant": true}}'

You might want to override the recipe’s --max-model-len and --gpu-memory-utilization while making sure you have enough memory room for the chosen settings values.

Please note that--speculative-config 'null' disables speculative decoding and frees several additional gigabytes of memory that could be used (e.g.) for a larger KV-cache (use this at your own discretion when/if needed).

Last but not least, in some cases having a context size of “just” 256K tokens per thread could be desirable, since a larger context size typically entails slower throughput. Some harnesses support launching (concurrent) subagents for suitable parts of the task at hand and this helps avoiding the need for context compaction in any of them while the overall throughput remains largely unaffected or even becomes higher when concurrency helps.

The native context length is 262k. If you want to go beyond that, you need to use YaRN.
See the official model card: Qwen/Qwen3.8-Flash-Next · Hugging Face

Quality and coherence degrade hard. Max workable stretching level I tested is about 1.5 scaling factor, 390k. 2 - 500k is already a severe degradation. And it’s uniform across the context ladder: degrades at 390k, degrades at 3.9k.

The recipe pins local-inference-lab/Qwen3.8-Flash-Next-NVFP4, whose config carries text_config.max_position_embeddings 262144 with rope_type "default". That is where the 262144 comes from.

What follows is config validation only: vLLM 0.28.1rc1, ModelConfig construction with no weights loaded, run against RadixArk/Qwen3.8-Flash-Next-NVFP4 because it is identical to the pinned repo in the two fields that set this ceiling. It says nothing about whether a server comes up.

--max-model-len 1048576 on its own is refused:

Value error, User-specified max_model_len (1048576) is greater than the derived
max_model_len (max_position_embeddings=262144.0 or model_max_length=None in
model's config.json).

For rope_type "yarn" specifically, the ceiling becomes original_max_position_embeddings * factor. This passed the check:

--hf-overrides '{"text_config":{"rope_parameters":{"rope_type":"yarn","factor":4.0,"original_max_position_embeddings":262144}}}' \
--max-model-len 1048576

Using max model len 1048576, with VLLM_ALLOW_LONG_MAX_MODEL_LEN unset. With factor 2.0, 1048576 failed instead, naming a derived maximum of 524288.

A top-level rope_parameters override, not nested under text_config, lands on the outer config, which the length check never reads, so you get the identical error. Omitting original_max_position_embeddings raises KeyError: 'original_max_position_embeddings'. The override merges into the existing rope config rather than replacing it, so mrope_section, mrope_interleaved, partial_rotary_factor and rope_theta were preserved.

This is not only a validation knob, which is the part I would want to know before keeping it. Since mrope_section is present, get_rope builds MRotaryEmbedding with scaling_factor=4.0, and that routes _compute_inv_freq and _compute_cos_sin_cache to the YaRN versions. The frequency basis becomes the NTK-by-parts blend and the cos/sin cache is multiplied by 0.1*ln(4)+1 = 1.1386. Both apply at position 0 as much as at 900,000, and this checkpoint ships rope_type "default", so it was not trained on that basis. Requests well inside 262144 change too, with nothing in the log to say so. layer_types here is 36 linear_attention and 12 full_attention, and a rope factor reaches the 12.

VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 with no rope override also passed the check at 1048576. That leaves rope_type "default" and vLLM logs a warning about nan past the native window.

The gate after this one is memory, and it has its own message: To serve at least one request with the model's max seq len (1048576), (X GiB KV cache is needed, which is larger than the available KV cache memory (Y GiB). At the recipe’s gpu_memory_utilization: 0.7 and four times the length, that is the likely next stop.

Luke just published a QAD NVFP4 checkpoint which I’m very excited to try. An extensive dataset was used to distill the BF16 version into the quant, and the claimed result is better performance across the board with less tokens used.

I think it’s a direct drop in for his earlier NVFP4.

It’s faster and still works on 2 Sparks with disk off-loading. Vision also still works.

A data point on one Spark, in case it helps: on 2026-11-09 I measured NVIDIA’s Qwen3.8-Flash-Next-FP4-Local (vLLM, b12x build) with YaRN at a factor of 4 over the native 262,144, keeping the model’s multimodal RoPE (mrope_section and mrope_interleaved as the checkpoint has them), and --max-model-len 1048576, on a 128 GB GX10:

  • the KV pool held about 1.06M tokens, room for one request of 1,048,576
  • a passphrase hidden in filler was retrieved 8 times of 8 at 131K, 262K, 524K and 1,036,576 tokens (608 s to the first token at the last)
  • GSM8K, 250 questions: 96.8 % at the native window, 97.6 % with YaRN, the same within the noise, so no loss I can see on short prompts
  • what I have not measured: the coherence of long generations, which is what @0rand describes above

The recipe and the numbers are in alzeo/docs/flash-local-lane.md at main · hasso5703/alzeo · GitHub, and Alzeo v1.45.2 turns it on as an option of that lane.