DFlash: support vLLM inference backend#125
Merged
Merged
Conversation
Relax the DFlash backend gate in `_validate_and_configure_dflash` to accept
`inference_engine_type` in ('vllm', 'sgl') instead of 'sgl'-only, and add a
vLLM DFlash training config for Qwen3-8B (`configs/vllm_qwen3_8b_dflash.yaml`)
as the vLLM counterpart to the existing SGLang DFlash config.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: zixi-qi <zixi@inferact.ai>
2335a76 to
a3614b9
Compare
yubofredwang
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds vLLM as a supported inference backend for DFlash draft training. Previously DFlash was gated to
inference_engine_type='sgl'only.torchspec/train_entry.py—_validate_and_configure_dflashnow acceptsinference_engine_typein('vllm', 'sgl')instead ofsgl-only, with a clearer error message naming the allowed values.configs/vllm_qwen3_8b_dflash.yaml— new DFlash training config for Qwen3-8B on the vLLM backend; the vLLM counterpart to the existingsglang_qwen3_8b_dflash.yaml(same DFlash architecture/hyperparameters, target hidden states generated by vLLM viaextract_hidden_states+MooncakeHiddenStatesConnector). 4-GPU layout: 2 inference (tp_size=2) + 2 training (FSDP FULL_SHARD).Test plan
ruff check+ruff format --checkpasspre-commit run --files ...passes (trailing-whitespace, end-of-file-fixer, check-yaml, ruff, ruff-format)E2E verification
Ran the new config end-to-end on a GB300 node (aarch64, CUDA 13, torch 2.11, vLLM 0.23.0):
Result: completed cleanly — 3 epochs / 750 steps in 288.7s, checkpoint saved to
outputs/qwen3-8b-dflash-vllm/checkpoints/iter_0000751, vLLM engine shut down gracefully.acc_len)wait=0.0sthroughoutThe disaggregated pipeline behaved as designed: the vLLM engine (tp_size=2) streamed target hidden states through Mooncake, and the sample-pool backpressure cycled normally (fills to 64/64 → pauses generation → resumes at ~52–56), with the trainer never starving (
wait=0.0s).🤖 Generated with Claude Code