Skip to content

Tensor parallel sharded loading: allow init_lora_weights = "orthogonal" - #766

Open
Imagineer99 wants to merge 1 commit into
fix/mirror-base-20261102-4f4305efrom
fix/mirror-pr-15218-20261102
Open

Imagineer99 wants to merge 1 commit into
fix/mirror-base-20261102-4f4305efrom
fix/mirror-pr-15218-20261102

Conversation

@Imagineer99

Copy link
Copy Markdown
Owner

Review mirror of unslothai/unsloth#15218 by lonexreb.

Allow orthogonal LoRA initialization with tensor-parallel sharded loading while retaining rejection of weight-dependent initializers.

Source head: faac391d56ce39db4f45c65fcd064adbdc72162b. Original commits replayed with authorship preserved onto upstream main 4f4305ea10c4a9940a2a00f7c4b454a47d6e38fc; the resulting tree matches a clean merge with that base.

The targeted two-rank CPU gloo regression passed, covering orthogonal/Gaussian acceptance and PiSSA refusal.

For CI and code review only; do not merge this mirror. Accepted fixes will be prepared for the original PR, with one concise maintained review summary upstream.

_refuse_weight_dependent_lora_init (unslothai#15174) refuses every init_lora_weights outside True / False / "gaussian" as "depends on the base weight". PEFT's orthogonal init does not: it draws the factors from torch.randn sized by the layer's in_features / out_features, which sharded loading keeps at the full sizes, and reads only the weight's dtype. So the factors come out full-size, the same shape as gaussian's, and _sync_trainable gives every rank rank 0's draw. Add it to the allowlist; MiCA, which takes lora_B from the base weight's singular vectors, stays refused.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T10:05:31.971736Z 777c7dd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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