Skip to content

Conversation

@aolemila
Copy link
Collaborator

Motivation

Modifications

Accuracy Tests

Benchmarking and Profiling

Checklist

  • Please use English, otherwise it will be closed.
  • The purpose of the PR, or link existing issues this PR will resolve.
  • The test plan, such as providing test command.
  • (Optional) The necessary documentation update.

@gemini-code-assist
Copy link

Summary of Changes

Hello @aolemila, 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 lays the foundational groundwork for integrating Low-Rank Adaptation (LoRA) capabilities within the sgl_jax framework. It establishes a standardized base class for LoRA backend implementations and introduces essential utility data structures required for managing LoRA operations. This effort aims to enable flexible and efficient LoRA support, allowing for various kernel implementations to be plugged in.

Highlights

  • New LoRA Base Backend: Introduced BaseLoRABackend in python/sgl_jax/srt/lora/backend/base_backend.py. This abstract class defines the interface for different LoRA backend implementations, including methods for running LoRA A and B GEMMs, and specific LoRA passes for QKV and Gate-Up layers, as well as batch preparation.
  • LoRA Utility Data Structures: Added LoRABatchInfo (a dataclass for batch details) and LoRAType (an Enum for LoRA A and B types) in python/sgl_jax/srt/lora/utils.py to support LoRA functionality.
  • Incomplete Code Addition: A placeholder jax.lax.select() call was added to python/sgl_jax/srt/layers/linear.py. Given the [WIP] status of the PR, this appears to be an incomplete or temporary addition.
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.

@aolemila aolemila force-pushed the feat/support-bgmv-backend branch from 9e6c476 to b80757c Compare November 13, 2025 13:12
@aolemila aolemila changed the title [WIP]add base_backend [WIP]add bgmv backend for LoRA Nov 14, 2025
@aolemila aolemila changed the title [WIP]add bgmv backend for LoRA [WIP] add bgmv backend for LoRA Nov 14, 2025
@aolemila aolemila force-pushed the feat/support-bgmv-backend branch 2 times, most recently from a7ae79f to f8d8c86 Compare November 14, 2025 12:54
@aolemila aolemila marked this pull request as draft November 17, 2025 08:06
@aolemila aolemila self-assigned this Nov 17, 2025
@aolemila aolemila changed the base branch from main to epic/support-multi-lora November 19, 2025 07:31
complete codes for bgmv backend
@aolemila aolemila force-pushed the feat/support-bgmv-backend branch from f8d8c86 to e7d1ce8 Compare November 19, 2025 07:41
@aolemila aolemila changed the title [WIP] add bgmv backend for LoRA add bgmv backend for LoRA Nov 19, 2025
@aolemila aolemila marked this pull request as ready for review November 19, 2025 07:46
@aolemila aolemila changed the title add bgmv backend for LoRA [Feat] add bgmv backend for LoRA Nov 19, 2025
@aolemila
Copy link
Collaborator Author

aolemila commented Nov 19, 2025

According to our discussion, we decide to merge into epic to build the multi lora framework as far as possible. Before merging into main, we will solve all problems in CI. @pathfinder-pf @JamesBrianD

@aolemila aolemila merged commit 23d8fce into sgl-project:epic/support-multi-lora Nov 19, 2025
15 of 16 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