Skip to content

support deepspeed LinearLayer and LinearAllreduce #698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

xin3he
Copy link
Contributor

@xin3he xin3he commented Jul 31, 2025

support tensor-paralleled model from deepspeed

@xin3he xin3he requested review from wenhuach21, n1ck-guo and Copilot and removed request for wenhuach21 and n1ck-guo July 31, 2025 03:44
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for DeepSpeed's tensor-parallel linear layers (LinearLayer and LinearAllreduce) to the auto_round quantization library. The changes enable quantization of models that use DeepSpeed's tensor-parallelized layers.

Key changes:

  • Added DeepSpeed dependency detection and conditional imports
  • Extended SUPPORTED_LAYER_TYPES to include DeepSpeed linear layers
  • Implemented specialized forward pass handling for LinearAllreduce layers with all-reduce communication

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
auto_round/utils.py Adds DeepSpeed detection, imports, and extends supported layer types
auto_round/wrapper.py Implements DeepSpeed layer support with specialized forward methods and wrapper enhancements

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.

3 participants