sync: gitlab/main -> github/main#25
Merged
Merged
Conversation
# ⭐ Feature ## Add PrefetchBuffer for streaming multimodal datasets - Implement `PrefetchBuffer` with `set_index_order` pattern (inspired by AReaL) - Background thread uses `ThreadPoolExecutor` for parallel video decoding (PyAV releases GIL) - Flow-controlled cache with `max_cached` bound and `_space_available` Event - Add `--prefetch-chunk-size` and `--prefetch-max-cached` CLI arguments - Wire arguments through `data_source.py` into `StreamingDataset` ## Add SGLang engine profiling support - Add 7 profiling CLI arguments (`--sglang-profile`, `--sglang-profile-output-dir`, etc.) - Implement `_start_sglang_profile` / `_stop_sglang_profile` in sglang_rollout - Support `num_steps` auto-stop, per-stage profiling, stack and shape recording ## Add pipeline batch encoding for multimodal generate - Add `--mm-encode-batch-groups-size` argument for encode-generate overlap - Split samples into batches: encode batch N, send to SGLang, encode batch N+1 concurrently - Implement `_encode_multimodal_inputs` for base64 encoding of images/videos/audio --- # 📝 Documentation ## Sync new parameters to configuration docs - Add prefetch parameters to Dataset section (en/zh) - Add `--mm-encode-batch-groups-size` to Multimodal Data section (en/zh) - Add 7 SGLang profiling parameters to SGLang Engine Parameters section (en/zh)
# 🐛 Bug Fix
## Fix torch.cuda patch broken by device abstraction refactor
- The device abstraction commit (632b29c5) replaced hardcoded
`torch.cuda.get_device_properties` / `torch.cuda.get_device_capability`
patch targets with `torch.{device_utils.get_device_name()}.*`
- When no accelerator is available, `get_device_name()` returns `"cpu"`,
so patches targeted `torch.cpu.*` instead of `torch.cuda.*`
- Megatron validate_args internally always calls `torch.cuda.*`,
so the patches must target `torch.cuda` regardless of device abstraction
- Restore hardcoded `torch.cuda.*` patch targets with explanatory comment
bf47fbb to
d4d6e6c
Compare
NINGBENZHE
approved these changes
Apr 30, 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.
Routine internal -> external sync.