Flow-Drafter-4B-tr

Speculative-decoding draft model for Qwen/Qwen3.5-4B (Chained-Flow, joint-VAE drafter), adapted to Turkish.

Lossless by construction: a proposed token is emitted only if the target itself would have emitted it. Outputs can still differ from unspeculated decode, because verifying K+1 positions at once changes the target's own fp16 reduction order — the observed divergence is comparable to the run-to-run difference between two unspeculated runs.

Warm-started from Flow-Drafter-4B-v2 (sha256 7a06e317d4a6c864...), not trained from scratch. Identify the parent by that content hash, not by commit — the parent repo has since moved commit with byte-identical weights. These weights are sha256 7badbb111237dac6....

Usage

pip install chained-flow

# CF_DRAFTER_DIR is the only variable you need; a bare repo id works and pulls shortlist.pt with it.
# K comes from num_speculative_tokens, not an env var.
CF_DRAFTER_DIR=selimaktas/Flow-Drafter-4B-tr \
vllm serve Qwen/Qwen3.5-4B --async-scheduling \
  --speculative-config '{"method":"custom_class","model":"chained_flow.vllm_plugin.flow_proposer.FlowDrafterProposer","num_speculative_tokens":5}'
curl localhost:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{
  "model": "Qwen/Qwen3.5-4B",
  "messages": [{"role": "user", "content": "Merhaba, nasılsın?"}],
  "chat_template_kwargs": {"enable_thinking": false},
  "temperature": 0
}'

chat_template_kwargs: {"enable_thinking": false} is required — this drafter was trained on prompts carrying the <think>\n\n</think>\n\n prefix.

Served speedup

Every number below was measured under one condition: natural EOS (no ignore_eos), concurrency 1, greedy, chain proposer at K=5, async scheduling on for every arm including the baseline, 2 repeats, through vllm serve. Prompts: the chained-flow Turkish holdouts (bench_data_tr), 4 domains. Aggregation is token-weighted pooling across those domains — each arm's own tokens ÷ its own wall-time — not a mean of per-domain ratios. Under natural EOS the arms emit different token counts, so the rates are comparable but the token totals are not.

prompt set base tok/s v2 parent: tok/s acc speedup -tr: tok/s acc speedup
tr_funccall 137.1 119.0 1.354 0.868x 220.5 2.597 1.608x
tr_instruct 138.8 106.8 1.187 0.769x 169.4 1.915 1.220x
tr_multiturn 137.9 102.5 1.156 0.743x 149.3 1.713 1.083x
tr_toolcall 136.6 119.2 1.370 0.872x 214.3 2.546 1.569x
pooled 137.7 110.3 1.267 0.801x 179.2 2.193 1.302x

137.7 → 179.2 tok/s, +30% against unspeculated decode.

The English parent is a net regression on Turkish (0.801x): at accept 1.27 it does not earn back its own draft pass. This fine-tune turns speculation from a loss into a win, not a bigger win.

The candidate shortlist ships with the model and is loaded automatically; the loader refuses to run against a different one.

Caveats

Turkish prompt sets only; this card does not characterise English behaviour.

Files

  • model.safetensors — the drafter (flow experts, Markov head, path head, jointly-trained VAE)
  • chained_flow_tree_config.json — architecture + loss config
  • shortlist.pt — English+Turkish candidate shortlist (see above)
  • vae/ — the base VAE checkpoint
Downloads last month

-

Downloads are not tracked for this model. How to track
Safetensors
Model size
0.5B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for selimaktas/Flow-Drafter-4B-tr

Finetuned
Qwen/Qwen3.5-4B
Finetuned
(438)
this model