Extended context with Qwen3.8-27B-DFlash2

#8
by GizzmoShifu - opened

I've been running Qwen3.8-27B-DFlash2 with Qwen3.8-27B under vLLM on an NVIDIA GB10 and noticed that the DFlash2 config.json currently declares a 262,144-token context with the default RoPE configuration:

"max_position_embeddings": 262144,
"rope_parameters": {
  "rope_theta": 10000000,
  "rope_type": "default"
}

This appears to match the native 262K context of the Qwen3.8 target model. Qwen's documentation provides an --hf-overrides configuration for extending the target model to 1M tokens using YaRN, but I'm not aware of a straightforward way to apply the equivalent override specifically to the speculative draft model through vLLM's speculative configuration

A friend, @bilabong007 , and I found that applying the equivalent YaRN configuration directly to the DFlash2 draft model's config.json appears to work:

"max_position_embeddings": 1048576,
"rope_parameters": {
  "rope_type": "yarn",
  "rope_theta": 10000000,
  "factor": 4.0,
  "original_max_position_embeddings": 262144
}

With this change, I've now successfully run DFlash2 to 539K tokens in a real-world VS Code coding session, using 4 speculative tokens. Draft acceptance has remained reasonably healthy, averaging around 47% / ~1.9 accepted tokens per draft over the extended run when the number of spec tokens is set to 6

So I'm curious:

Is the 262K DFlash2 configuration simply inherited from Qwen3.8's native context limit?
Is there a supported vLLM mechanism for applying hf_overrides / RoPE configuration to the draft model independently?
If not, would it be useful to document the YaRN configuration above as an extended-context option for DFlash2?

I'm not claiming 1M DFlash2 support based on this yet... 539K is the furthest I've validated it in a real workload so far.

Sign up or log in to comment