Repository navigation
Conversation
Laz4rz
requested review from
CatherineSue,
Fridge003,
JustinTong0323,
Ying1123,
hnyls2002,
ispobock,
merrymercy and
slin1237
as code owners
October 11, 2026 17:32
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.
Motivation
P2P senders need the receiver's actual parameter dtype before writing directly into its memory. The current address and size metadata cannot distinguish BF16 from FP16: both use two bytes per element, but interpret those bytes differently.
Built on #42820. Companion PR: radixark/miles#4016 — validate receiver dtypes before P2P weight transfers. The companion extends radixark/miles#3969 and rejects incompatible transfers using this metadata. This SGLang change publishes the information; it does not itself enforce the check.
Modifications
weight_dtypesfrom the registered model's named parameters, using names such asbfloat16.(role, tp_rank)metadata, preserving separate target and draft records.remote_instance_transfer_engine_infotuple unchanged. Publishers without dtype metadata return an empty mapping, and consumers that read only the original field continue working.Deploy this change before the stricter companion Miles sender, or deploy both together.
Accuracy Tests
Tested the paired changes in a fork on
Qwen/Qwen2.5-0.5B-Instruct, with two runs per case below. Each used two H100 nodes, one trainer GPU and one inference GPU. All six runs completed 11 training steps with initial weight equality, successful EFA transfers and finite nonzero gradients.These are short execution checks with synthetic rewards, not convergence or reconnect tests. Every run logged an existing forced-termination warning during inference shutdown.
The repository-pinned pre-commit hooks passed locally on all 3 PR files without modifying them, and the upstream full-repository lint job passed. The extended runtime unit test has not been rerun on this upstream port; the fork benchmark results do not validate this exact tree.
Speed Tests and Profiling
Ranges show the two runs; each warm median covers ten syncs. Timings include the whole weight-sync operation and GPU completion. Runs used different node pairs in parallel, so small differences should not be treated as speedups. Memory counts application buffer registrations, not total process memory; the loader-based implementation uses two 512 MiB buffers.
The companion Miles guard checked 170 BF16 tensor layouts once per connection. Local metadata validation averaged 94 µs with the guard versus 51 µs without, an observed difference of approximately 43 µs per connection, not per training step. Publisher serialization and HTTP metadata overhead were not isolated, and no speed benchmark was run on this upstream port.
Checklist