z-lab / gpt-oss-20b-DFlash

huggingface.co
Total runs: 812
24-hour runs: 0
7-day runs: 32
30-day runs: -1.2K
Model's Last Updated: April 07 2026
text-generation

Introduction of gpt-oss-20b-DFlash

Model Details of gpt-oss-20b-DFlash

gpt-oss-20b-DFlash

Paper | GitHub | Blog

DFlash is a novel speculative decoding method that utilizes a lightweight block diffusion model for drafting. It enables efficient, high-quality parallel drafting that pushes the limits of inference speed.

This model serves as the drafter component and contains 0.8B parameters . It must be used in conjunction with the target model openai/gpt-oss-20b .

DFlash Architecture
📊 Training Data

gpt-oss-20b-DFlash is trained on 800K samples , drawn from:

For all samples, the response portion was regenerated using the target model openai/gpt-oss-20b .

🚀 Quick Start
SGLang

DFlash is now supported on SGLang. And vLLM integration is currently in progress.

Installation
uv pip install "git+https://github.com/sgl-project/sglang.git@refs/pull/16818/head#subdirectory=python"
Inference
python -m sglang.launch_server \
    --model-path openai/gpt-oss-20b \
    --speculative-algorithm DFLASH \
    --speculative-draft-model-path z-lab/gpt-oss-20b-DFlash \
    --tp-size 1 \
    --dtype bfloat16 \
    --attention-backend fa3 \
    --mem-fraction-static 0.75 \
    --trust-remote-code
Transformers
Installation
pip install transformers==4.57.3 torch==2.9.1 accelerate
Inference
from transformers import AutoModel, AutoModelForCausalLM, AutoTokenizer

model = AutoModel.from_pretrained(
    "z-lab/gpt-oss-20b-DFlash", 
    trust_remote_code=True, 
    dtype="auto", 
    device_map="cuda:0"
).eval()

target = AutoModelForCausalLM.from_pretrained(
    "openai/gpt-oss-20b", 
    dtype="auto", 
    device_map="cuda:0"
).eval()

tokenizer = AutoTokenizer.from_pretrained("openai/gpt-oss-20b")
prompt = "How many positive whole-number divisors does 196 have?"
messages = [
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
    reasoning_effort="medium"
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

generate_ids = model.spec_generate(
    input_ids=model_inputs["input_ids"], 
    max_new_tokens=2048, 
    temperature=0.0, 
    target=target, 
    stop_token_ids=[tokenizer.eos_token_id]
)

print(tokenizer.decode(generate_ids[0], skip_special_tokens=False))
Evaluation

We use a block size of 8 (7 draft tokens) during speculation. DFlash consistently achieves high acceptance lengths and speedups across different concurrency levels. All experiments are conducted using SGLang on a single H200 GPU .

The numbers reported are end-to-end speedup (including prefill time). You can specify different block size during inference by passing --speculative-num-draft-tokens arguments when launch the server.

The reasoning effort is set to medium for all tasks. Low reasoning effort will give even higher acceptance length.

Math500 GSM8K HumanEval MT-Bench
Accept Len 5.1 4.7 4.3 4.2
conc=1 2.2× 2.0× 2.0× 1.9×
conc=4 2.1× 2.0× 2.1× 2.0×
conc=8 2.2× 2.0× 2.2× 2.0×
conc=16 1.9× 1.8× 2.1× 1.9×
conc=32 1.8× 1.7× 1.9× 1.7×
Acknowledgement

We are grateful to Yotta Labs for their compute support in training this draft model.

Citation

If you find DFlash useful for your research or applications, please cite our project.

@misc{chen2026dflash,
  title         = {DFlash: Block Diffusion for Flash Speculative Decoding},
  author        = {Chen, Jian and Liang, Yesheng and Liu, Zhijian},
  year          = {2026},
  eprint        = {2602.06036},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CL},
  url           = {https://arxiv.org/abs/2602.06036}
}

Runs of z-lab gpt-oss-20b-DFlash on huggingface.co

812
Total runs
0
24-hour runs
9
3-day runs
32
7-day runs
-1.2K
30-day runs

More Information About gpt-oss-20b-DFlash huggingface.co Model

More gpt-oss-20b-DFlash license Visit here:

https://choosealicense.com/licenses/mit

gpt-oss-20b-DFlash huggingface.co

gpt-oss-20b-DFlash huggingface.co is an AI model on huggingface.co that provides gpt-oss-20b-DFlash's model effect (), which can be used instantly with this z-lab gpt-oss-20b-DFlash model. huggingface.co supports a free trial of the gpt-oss-20b-DFlash model, and also provides paid use of the gpt-oss-20b-DFlash. Support call gpt-oss-20b-DFlash model through api, including Node.js, Python, http.

gpt-oss-20b-DFlash huggingface.co Url

https://huggingface.co/z-lab/gpt-oss-20b-DFlash

z-lab gpt-oss-20b-DFlash online free

gpt-oss-20b-DFlash huggingface.co is an online trial and call api platform, which integrates gpt-oss-20b-DFlash's modeling effects, including api services, and provides a free online trial of gpt-oss-20b-DFlash, you can try gpt-oss-20b-DFlash online for free by clicking the link below.

z-lab gpt-oss-20b-DFlash online free url in huggingface.co:

https://huggingface.co/z-lab/gpt-oss-20b-DFlash

gpt-oss-20b-DFlash install

gpt-oss-20b-DFlash is an open source model from GitHub that offers a free installation service, and any user can find gpt-oss-20b-DFlash on GitHub to install. At the same time, huggingface.co provides the effect of gpt-oss-20b-DFlash install, users can directly use gpt-oss-20b-DFlash installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

gpt-oss-20b-DFlash install url in huggingface.co:

https://huggingface.co/z-lab/gpt-oss-20b-DFlash

Url of gpt-oss-20b-DFlash

gpt-oss-20b-DFlash huggingface.co Url

Provider of gpt-oss-20b-DFlash huggingface.co

z-lab
ORGANIZATIONS

Other API from z-lab

huggingface.co

Total runs: 1.9K
Run Growth: -15.0K
Growth Rate: -800.00%
Updated:May 08 2026
huggingface.co

Total runs: 339
Run Growth: -20
Growth Rate: -5.90%
Updated:May 08 2026
huggingface.co

Total runs: 311
Run Growth: -42
Growth Rate: -13.50%
Updated:May 08 2026
huggingface.co

Total runs: 242
Run Growth: -111
Growth Rate: -45.87%
Updated:May 08 2026
huggingface.co

Total runs: 9
Run Growth: 0
Growth Rate: 0.00%
Updated:June 23 2025