Instructions to use incoai/Qwen3.8-27B-DFlash2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use incoai/Qwen3.8-27B-DFlash2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="incoai/Qwen3.8-27B-DFlash2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("incoai/Qwen3.8-27B-DFlash2") model = AutoModel.from_pretrained("incoai/Qwen3.8-27B-DFlash2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use incoai/Qwen3.8-27B-DFlash2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "incoai/Qwen3.8-27B-DFlash2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "incoai/Qwen3.8-27B-DFlash2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/incoai/Qwen3.8-27B-DFlash2
- SGLang
How to use incoai/Qwen3.8-27B-DFlash2 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 "incoai/Qwen3.8-27B-DFlash2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "incoai/Qwen3.8-27B-DFlash2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "incoai/Qwen3.8-27B-DFlash2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "incoai/Qwen3.8-27B-DFlash2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use incoai/Qwen3.8-27B-DFlash2 with Docker Model Runner:
docker model run hf.co/incoai/Qwen3.8-27B-DFlash2
Extended context with Qwen3.8-27B-DFlash2
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.