[Lilo] Miles LoRA backend: DP>1 support + validated Qwen3.5-9B 16k on LongRLVR - #30
Merged
Merged
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
kailash109
force-pushed
the
codex/deterministic-training
branch
from
September 17, 2026 20:16
1a4148f to
15ec51e
Compare
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…APP_NAME override Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…A backend Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…den definitions Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration
Bot
force-pushed
the
devin/1789585776-longrlvr-lilo-lora-16k
branch
from
September 17, 2026 22:48
8822f69 to
0737bab
Compare
devin-ai-integration
Bot
changed the base branch from
codex/deterministic-training
to
main
September 17, 2026 22:55
Contributor
Author
|
/devin review |
Contributor
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… topology Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
micahtyong
commented
Sep 18, 2026
| slot_rows: tuple[tuple[int, dict[str, Any]], ...], | ||
| multiple: int, | ||
| ) -> tuple[tuple[int, dict[str, Any]], ...]: | ||
| """Pad to a multiple of multiple with zero-weight rows for Miles DP sharding.""" |
Contributor
Author
There was a problem hiding this comment.
When DP > 1 (two replicas of the model), Miles will split the batch into one shard per DP rank. Since every rank must receive at least one row, this method is used to ensure the number of rows is divisible by DP. Without this, a DP rank would hang
Contributor
Author
There was a problem hiding this comment.
This config is validated with an actual e2e miles vs lilo run here
Contributor
Author
|
Going to merge this in @kailash109. Next one is #31 which is where we added context parallelism support for up to 128K. |
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
Backend + definition changes needed for the Lilo-vs-Miles 9B LongRLVR parity runs (results in the W&B report Validating Multi-client LoRA on Lilo). This PR is the library surface those runs validated.
Miles LoRA backend: allow data parallelism (
world_size % tp == 0instead of== tp)MilesBackendConfig.data_parallel_size = world_size // tensor_model_parallel_size.MilesCommandBackend.forward_backwardtrims the padded outputs back to the real row count.topologynow recordsdata_parallel_size;_validate_checkpointtreats a missing key in pre-existing checkpoints as1, so old TP-only checkpoints still restore on an unchanged deployment while DP mismatches are rejected.Definitions
qwen3_5_9b_miles_lora_16k(8×H100, TP8, catalog-visible) andqwen3_5_9b_miles_lora_16k_dp2(TP4×DP2, hidden) — identical except id/TP/visibility; the DP2 one is what the parity runs used (81 s/step vs 107 s on TP8).serve.py/app.py:APP_NAME = os.environ.get("LILO_APP_NAME", "lilo")so a second app (e.g.lilo-dp2) can be deployed alongside prod without code changes.Tests: DP config acceptance/rejection, pad/trim behavior, topology metadata, legacy-checkpoint compatibility.
Link to Devin session: https://modal.devinenterprise.com/sessions/8d6804dd317c41329d77eb2c427dda6f
Open in Devin Desktop: https://modal.devinenterprise.com/desktop/session/8d6804dd317c41329d77eb2c427dda6f?variant=devin
Requested by: @micahtyong