Mixed-R2 Executor DFlash

This repository contains a DFlash draft model adapted to the trained mixed-r2-0704 Qwen3.5-9B GUI executor. All 1,048,626,432 draft parameters were finetuned for two epochs; the target executor remained frozen. The published checkpoint is epoch 2, optimizer step 1,786.

This is a speculative-decoding draft, not a standalone executor or language model. It requires the compatible target model, target tokenizer and image processor, and the original executor prompt contract. The trained target weights are not included. The reported results were measured with the specific merged mixed-r2-0704 executor, not the unmodified public Qwen3.5-9B target; equivalent results with other target checkpoints have not been established.

Model details

Property Value
Initialization z-lab/Qwen3.5-9B-DFlash, revision 492f4b532a957a50561e1418e5a3f31690f127f4
Architecture Plain DFlash, five full-attention draft layers
Draft parameters 1,048,626,432
Hidden / intermediate dimension 4,096 / 12,288
Target feature layers [1, 8, 15, 22, 29]
Training and evaluated block size 16: one anchor plus 15 speculative tokens
Finetuning Full draft finetuning, including feature fusion and normalization; no LoRA
Frozen components Target language and vision model, target embeddings and output head
Serving weights BF16 safetensors
Completed training Two epochs, 1,786 optimizer updates, eight H800 GPUs

The original exported model configuration is preserved. Use an explicit BF16 runtime configuration, as in the validated setup below.

Training data and recipe

The executor training source contained 29,061 screenshot-and-prompt examples: 28,547 training and 514 validation examples. Identical prompt/image groups were kept together in the split. The separate draft evaluation set contains 1,486 examples; no exact training/test prompt-and-image overlaps were found. Original screenshots and their resolution were retained.

The frozen trained executor produced greedy teacher responses with a maximum of 384 new tokens. Training used the raw teacher token IDs, including the observed prefixes of six capped responses without appending an artificial EOS. Target features were recomputed on the full causal multimodal prefix, with prompt-token consistency checks between the training and inference stacks.

The objective was response-only full-vocabulary cross-entropy, weighted by exp(-j / 7) over prediction positions, with eight random valid response anchors per example and block size 16. AdamW used learning rate 2e-5, betas (0.9, 0.95), weight decay 0.1, a 4% warmup followed by cosine decay, and gradient clipping at 1.0. Eight data-parallel ranks with four accumulation steps gave global batch size 32. Draft master weights and optimizer state were FP32, with BF16 autocast and a frozen BF16 target. These are adaptation settings, not a reproduction of the paper's training from scratch.

The evaluation set was not used for draft training. The target model's handoff notes indicate that this set had previously been used for target-model validation, so these results should not be interpreted as performance on a completely untouched target-model generalization test.

Offline evaluation

The most recent evaluation used 1,486 inputs, three timed repeats after two warmup waves, greedy decoding, BF16, and a maximum of 384 new tokens. Batch sizes 1 and 2 were actual bounded request waves on each single-GPU replica. Eight independent H800 replicas sharded the test set; the numbers below are pooled per-GPU throughput, not aggregate eight-GPU throughput.

Batch size Vanilla tokens/s DFlash tokens/s Throughput speedup Acceptance length
1 82.36 140.28 1.703x 6.706
2 101.58 159.33 1.569x 6.729

Acceptance length is 1 + accepted_draft_tokens / verification_rounds, including the bonus token. Throughput is summed output tokens divided by summed synchronized generation time. The timed region includes image preprocessing, prefill and decode, and excludes image-file loading, initialization, warmup, metric collection and result writing. It is not an isolated decode-kernel benchmark.

The five-layer checkpoint had the highest observed throughput among the completed four-, three-, and two-layer adaptations evaluated against the same fresh vanilla control. Selecting a model on these benchmark results is exploratory; no independent post-selection test or statistical-significance claim is provided.

For comparison, an earlier evaluation against the original pretrained draft used its own shared vanilla control:

Batch size Pretrained draft tokens/s This checkpoint tokens/s Throughput ratio Pretrained / finetuned acceptance
1 122.09 137.89 1.129x 3.940 / 6.749
2 141.69 158.74 1.120x 3.943 / 6.726

These earlier measurements and the latest table are separate runs and should not be combined into a single paired comparison.

Output agreement and limitations

The latest first-repeat evaluation measured:

Batch size Vanilla SSR DFlash SSR Exact output-sequence agreement Exact parsed-action agreement
1 92.33% 92.73% 88.56% 94.55%
2 92.60% 92.53% 89.10% 94.62%

SSR is the existing offline executor scorer using its original action and distance tolerances; it is not live GUI task-completion evaluation. Parsed-action agreement compares valid parsed dictionaries exactly, including parameters, without coordinate tolerance. Output sequences are not always identical to vanilla. At batch size 2, 10 vanilla and 13 DFlash request occurrences in later repeats differed from their first-repeat outputs. No capped responses occurred for this selected checkpoint in the latest evaluation. The vanilla control had 3 capped responses out of 4,458 timed requests at batch size 1 and none at batch size 2.

Lossless numerical equivalence is not established by this benchmark. The cause of the output differences has not been isolated, and small SSR changes do not establish a quality improvement. Throughput depends on the target, hardware, prompt/image distribution, output length, batching and inference implementation.

Inference configuration

The validated environment used Python 3.12, PyTorch 2.13.0+cu129, Transformers 5.19.0, and vLLM 0.32.0+cu129. The model runner setting was VLLM_USE_V2_MODEL_RUNNER=1 for both vanilla and DFlash. A compatible DFlash-enabled runtime is required.

Set TARGET_MODEL to the compatible trained executor and DRAFT_MODEL to this repository ID or local directory. The following initialization mirrors the benchmark's core engine settings; it does not run the benchmark or supply the original screenshot/prompt dataset.

export TARGET_MODEL=/path/to/compatible/mixed-r2-executor
export DRAFT_MODEL=JunHill/mixed-r2-executor-dflash
export VLLM_USE_V2_MODEL_RUNNER=1

python - <<'PY'
import os
from vllm import LLM, SamplingParams

llm = LLM(
    model=os.environ["TARGET_MODEL"],
    tokenizer=os.environ["TARGET_MODEL"],
    dtype="bfloat16",
    tensor_parallel_size=1,
    max_model_len=16384,
    max_num_batched_tokens=16384,
    max_num_seqs=1,  # Use 2 for batch-two request waves.
    gpu_memory_utilization=0.85,
    enable_prefix_caching=False,
    mm_processor_cache_gb=0,
    limit_mm_per_prompt={"image": 3, "video": 0},
    enable_chunked_prefill=True,
    seed=42,
    generation_config="vllm",
    speculative_config={
        "method": "dflash",
        "model": os.environ["DRAFT_MODEL"],
        "num_speculative_tokens": 15,
        "draft_sample_method": "greedy",
    },
)
sampling = SamplingParams(
    temperature=0.0, top_p=1.0, top_k=-1, max_tokens=384, seed=42
)
# Build multimodal requests with the target processor and original prompt contract,
# then call llm.generate(requests, sampling, use_tqdm=False).
PY

Use the target's tokenizer and image processor rather than treating the draft as an independent language model. The release is a serving export; optimizer and per-rank training RNG states are not needed for inference.

References

The pinned upstream draft declares the MIT license. This release follows that pinned license rather than the license metadata of a later upstream revision; see the included LICENSE.

Downloads last month
64
Safetensors
Model size
1B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for JunHill/mixed-r2-executor-dflash

Finetuned
Qwen/Qwen3.5-9B
Finetuned
(3)
this model

Paper for JunHill/mixed-r2-executor-dflash