Qwen3.8-27B-DFlux - draft model for acceleration of generation
2 min readupdated
The Qwen3.8-27B-DFlux model was created by researchers from SJTU-DAI-Sys as a draft model (speculative draft) to accelerate the base language model Qwen/Qwen3.8-27B. It is trained using the LEGOSpec framework and uses a hybrid architecture that allows generating text significantly faster without loss of quality through token verification by the target model. Useful for developers and engineers who optimize large language model inference and look for efficient methods to speed up services.
Key features
- Hybrid backbone: combines sliding-window attention layers with block-local convolution for working with long contexts.
- Residual Corrector (R-Corrector): calculates parallel corrections for top candidates while preserving the exact distribution of the target model.
- Training on quality dataset: trained on 1.45 million samples from open and multimodal sources (Open-PerfectBlend, WildChat, etc.).
- High speedup rate: shows speedup factors from 3.6 to 6.7 on various benchmarks (GSM8K, MATH500, MBPP).
What you can do
- Accelerate Qwen inference: connect the model as a draft alongside Qwen/Qwen3.8-27B for fast response generation.
- Deploy in SGLang: use scripts from the LEGOSpec repository to set up efficient serving.
- Test on coding and math tasks: apply in scenarios where high token generation speed for complex reasoning is essential.
Example
import torch
from legospec import LegoSpecConfig, LegoSpecModel
checkpoint = "SJTU-DAI-Sys/Qwen3.8-27B-DFlux"
config = LegoSpecConfig.from_pretrained(checkpoint)
draft = LegoSpecModel.from_pretrained(
checkpoint, config=config, dtype=torch.bfloat16
).cuda().eval()Read more
DetailsAcceleration benchmarks (τ): GSM8K - 6.70, MBPP - 5.73, MATH500 - 5.28.
Training: 16 NVIDIA H800 graphics processors with a total batch size of 128, Adam and Muon optimizers.
Limitations: requires target model Qwen/Qwen3.8-27B to share embeddings, output head, and verification.










Comments