Skip to content

[Bug Fix] XCCL weight synchronization fix for the single controller lora#796

Merged
garrett4wade merged 3 commits intoinclusionAI:mainfrom
gursimar:single-controller-lora-xccl-fix
Jan 7, 2026
Merged

[Bug Fix] XCCL weight synchronization fix for the single controller lora#796
garrett4wade merged 3 commits intoinclusionAI:mainfrom
gursimar:single-controller-lora-xccl-fix

Conversation

@gursimar
Copy link
Copy Markdown
Contributor

@gursimar gursimar commented Jan 6, 2026

Description

This PR fixes a regression in XCCL-based LoRA weight synchronization introduced by the single-controller refactor.

After the refactor, distributed LoRA weight updates in the vLLM backend fail during XCCL synchronization, causing workers to return 400 Bad Request errors from the /areal_update_weights_xccl endpoint and breaking update_weights_from_distributed.

This change restores correct parameter resolution and propagation across workers, unblocking distributed LoRA training workflows.

Fixes #795
Related to MultiLoRA RFC #609.


Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Checklist

  • I have read the [Contributing Guide](../CONTRIBUTING.md)
  • I have run formatting tools (pre-commit or manual)
  • I have run relevant unit tests and they pass
  • I have added tests for new functionality
  • I have updated documentation if needed
  • My branch is up to date with main
  • This PR introduces breaking changes
  • Documentation build (jb build docs) if applicable
  • No critical issues raised by AI reviewers (/gemini review)

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @gursimar, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical regression that prevented distributed LoRA weight synchronization using XCCL, a problem stemming from a previous single-controller refactor. The changes ensure that LoRA-specific metadata is correctly generated and propagated during distributed training, thereby unblocking and restoring functionality for distributed LoRA training workflows within the vLLM backend.

Highlights

  • Bug Fix: XCCL-based LoRA Weight Synchronization: This PR resolves a regression in XCCL-based LoRA weight synchronization that was introduced by a single-controller refactor. The bug caused distributed LoRA weight updates to fail, leading to 400 Bad Request errors during XCCL synchronization.
  • Corrected WeightUpdateMeta Creation: The WeightUpdateMeta.from_fsdp_xccl method in areal/experimental/trainer/rl.py has been updated to correctly pass LoRA-specific parameters (lora_name, base_model_name) when use_lora is enabled, ensuring proper parameter resolution and propagation across workers.
  • Default lora_int_id Adjustment: The default value for lora_int_id in WeightUpdateMeta.from_fsdp_xccl within areal/api/io_struct.py has been changed from 0 to 1.
  • Example Configuration Update: The examples/math/gsm8k_grpo_lora.yaml configuration file has been updated to use xccl as the weight_update_mode instead of disk, aligning with the intended distributed LoRA training workflow.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

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

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 effectively addresses a regression in XCCL-based LoRA weight synchronization by ensuring that LoRA-specific parameters are correctly passed when creating the WeightUpdateMeta. The logic added in areal/experimental/trainer/rl.py is sound and mirrors the existing implementation for disk-based updates. The accompanying changes in areal/api/io_struct.py for the default lora_int_id and the example YAML file are appropriate and support the main fix. I have one suggestion to refactor the new logic for improved code clarity and maintainability.

Comment thread areal/experimental/trainer/rl.py
@gursimar gursimar changed the title fixed the weight meta creation logic that was missing [Bug Fix] XCCL weight synchronization fix for the single controller lora Jan 6, 2026
@gursimar gursimar force-pushed the single-controller-lora-xccl-fix branch from 2c3db02 to dfd61b7 Compare January 7, 2026 00:02
Copy link
Copy Markdown
Collaborator

@garrett4wade garrett4wade left a comment

Choose a reason for hiding this comment

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

LGTM

@garrett4wade garrett4wade merged commit de4c682 into inclusionAI:main Jan 7, 2026
1 check passed
leandermaben pushed a commit to leandermaben/AReaL that referenced this pull request Mar 24, 2026
…ora (inclusionAI#796)

* fixed the weight meta creation logic that was missing

* Refactored code as per gemini's recommendations

* adjusted config after testing
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.

[BUG] HCCL weight transfer fails after the single controller adaptation for vllm lora implmentation

2 participants