Skip to content

[5/7][multi-lora]: rollout request routing - per sample lora_path/rid, per-adapter rewards, prefill logprob grouping#1746

Merged
yushengsu-thu merged 6 commits into
radixark:mainfrom
mathewjhan:multi-lora/05-rollout-routing
Jul 21, 2026
Merged

[5/7][multi-lora]: rollout request routing - per sample lora_path/rid, per-adapter rewards, prefill logprob grouping#1746
yushengsu-thu merged 6 commits into
radixark:mainfrom
mathewjhan:multi-lora/05-rollout-routing

Conversation

@mathewjhan

@mathewjhan mathewjhan commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

…ml config, shared helpers, CLI flags and validation
…schedules, slot lifecycle, batch routing in get_batch
…ert push to engines, reconcile/train/save hooks
… per-adapter rewards, prefill logprob grouping

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces multi-LoRA support to enable concurrent training and serving of multiple LoRA adapters in Megatron-LM, adding a controller, registry, HTTP server, per-slot Adam optimizers, and per-adapter schedulers. The code review highlights several critical improvements: fixing potential distributed deadlocks during weight synchronization by ensuring proper collective broadcast participation across ranks, preventing post-save hook failures in multi-LoRA mode, defensively handling standard optimizer wrappers to avoid AttributeError, optimizing Ray actor calls during adapter cleanup via broadcasting, supporting cloud storage URIs in configuration validation, and guarding against IndexError when adapter_slots is empty.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread miles/backends/megatron_utils/actor.py
Comment thread miles/backends/megatron_utils/multi_lora_optimizer.py
Comment thread miles/backends/megatron_utils/multi_lora_utils.py
Comment thread miles/backends/megatron_utils/multi_lora_utils.py
Comment thread miles/ray/multi_lora/backend.py
Comment thread miles/backends/training_utils/data.py

@yushengsu-thu yushengsu-thu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed extensively on the umbrella PR #1638 (2xH200 E2E validated); layer verified independently (imports + fast suites green on this branch's own tree).

@yushengsu-thu
yushengsu-thu merged commit 6189c68 into radixark:main Jul 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants