Repository navigation
[multi-lora v2 1/7] LoRA model extension and slot actor - #2840
Merged
Merged
Conversation
yueming-yuan
requested review from
Shi-Dong,
Zhichenzzz,
fzyzcjy,
maocheng23 and
yushengsu-thu
August 31, 2026 22:46
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
from
August 31, 2026 22:58
39c2bdd to
45af3dd
Compare
yueming-yuan
force-pushed
the
yueming/remove-multi-lora-v1
branch
from
August 31, 2026 23:51
be5c361 to
d771af3
Compare
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
4 times, most recently
from
September 1, 2026 03:40
1e74a23 to
66df86e
Compare
yueming-yuan
force-pushed
the
yueming/remove-multi-lora-v1
branch
from
September 1, 2026 05:27
e39c600 to
ea9558c
Compare
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
from
September 1, 2026 05:27
66df86e to
32dce20
Compare
yueming-yuan
force-pushed
the
yueming/remove-multi-lora-v1
branch
from
September 1, 2026 19:29
ea9558c to
5c2180e
Compare
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
2 times, most recently
from
September 1, 2026 20:31
d945039 to
1904fbd
Compare
yueming-yuan
force-pushed
the
yueming/remove-multi-lora-v1
branch
from
September 2, 2026 22:04
b44046d to
5e06b46
Compare
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
from
September 2, 2026 22:04
1904fbd to
02b28fe
Compare
yueming-yuan
force-pushed
the
yueming/remove-multi-lora-v1
branch
from
September 4, 2026 08:55
5e06b46 to
f7337fe
Compare
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
from
September 4, 2026 08:56
02b28fe to
d27005a
Compare
yueming-yuan
force-pushed
the
yueming/remove-multi-lora-v1
branch
from
September 4, 2026 09:00
f7337fe to
b39a37f
Compare
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
from
September 4, 2026 09:00
d27005a to
02a00ff
Compare
yueming-yuan
force-pushed
the
yueming/remove-multi-lora-v1
branch
from
September 4, 2026 09:06
b39a37f to
f877f6b
Compare
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
from
September 4, 2026 09:06
02a00ff to
cd9b495
Compare
yueming-yuan
force-pushed
the
yueming/remove-multi-lora-v1
branch
from
September 7, 2026 06:34
f877f6b to
c600910
Compare
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
from
September 7, 2026 06:34
cd9b495 to
fc90082
Compare
yueming-yuan
force-pushed
the
yueming/remove-multi-lora-v1
branch
from
September 7, 2026 06:53
c600910 to
a8c5d92
Compare
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
from
September 7, 2026 06:53
fc90082 to
49a5912
Compare
yueming-yuan
force-pushed
the
yueming/remove-multi-lora-v1
branch
from
September 7, 2026 19:29
a8c5d92 to
fdb1654
Compare
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
from
September 7, 2026 19:29
49a5912 to
a6389d2
Compare
yueming-yuan
force-pushed
the
yueming/remove-multi-lora-v1
branch
from
September 9, 2026 05:47
fdb1654 to
f4a913c
Compare
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
5 times, most recently
from
September 9, 2026 23:12
4854a3c to
cde2ba3
Compare
This was referenced Sep 9, 2026
yueming-yuan
force-pushed
the
yueming/remove-multi-lora-v1
branch
from
September 10, 2026 21:32
a37a8da to
b6d331f
Compare
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
2 times, most recently
from
September 14, 2026 21:41
591ceb8 to
dc23025
Compare
7 of 15 tasks
yueming-yuan
changed the base branch from
yueming/remove-multi-lora-v1
to
main
September 16, 2026 08:23
yueming-yuan
force-pushed
the
yueming/lora-slot-executor
branch
from
September 16, 2026 08:24
4a2d856 to
28c3602
Compare
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.
Co-authored with @yushengsu-thu.
Expose command-level training on
MultiLoRATrainRayActorinmegatron_utils/lora/actor.py:forward_backwardaccumulates gradients across calls;optim_step(adam_params_by_slot)steps only the requested slots;forward_only_logprobsscores tokens; andload_slot/unload_slotmanage slot weights, gradients, and optimizer state.lora/model.pyextends the shared model execution throughrun_forward_backward, which sharesrun_forward_backward_passandsetup_train_iteration_configwith the existing training path. Adam parameters are applied per request. Successful steps and nonfinite-gradient skips return per-slot outcomes; unknown preparation, optimizer, and collective failures propagate to the existing TrainerCell failure boundary. Slot optimizer construction isolates the base optimizer factory while preserving LayerWise wrapping and FP32 state. The command dispatcher requires one live trainer cell. Existing optimizer tests cover nonfinite skips and propagation of unknown execution failures.Slot optimizer construction passes the model chunks to LayerWiseDistributedOptimizer so equal-size adapter parameters use Megatron's rank-independent ownership tie-breaker.
Multi-LoRA pool initialization returns the model with no pool optimizer or scheduler. Only per-slot optimizers own training state; scheduler construction is skipped at this layer.
Stacked on #2839.
The multi-LoRA actor inherits the common initialization lifecycle and owns the slot optimizer registry.
MegatronTrainRayActor._init_training_state()initializes the ordinary weight updater; the multi-LoRA override initializes slot state. The worker spec selects the subclass only for Megatron multi-LoRA actor workers. Full-model, single-LoRA, FSDP, and critic selection remain unchanged.Validation:
pre-commit run --all-filesand the incrementalgit diff --checkpassed on this component head.ci-megatron-pr: 73b54618f7e58e0f25f619bcfecbe2640765475a
ci-sglang-pr: 02b5e123c490c988d21526d0dd7837fefdd0e1da