Skip to content
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

[BugFix] GPT inference error when pipeline_para_size > 1 and int8_mode != 0 #750

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

00why00
Copy link

@00why00 00why00 commented Aug 23, 2023

The problem is caused by the empty tensor check in quant ops in

quant = torch.ops.fastertransformer.symmetric_quantize_last_axis_of_batched_matrix
self.weight_transpose_calibrate_quantize = lambda x: quant(x, torch.int8)

When pipeline_para_size > 1, the current rank does not load the weights of all layers, resulting in quantization errors, and it is necessary to add is_load() check when traversing layers

@00why00 00why00 changed the title [BigFix] GPT inference error when pipeline_para_size > 1 and int8_mode != 0 [BugFix] GPT inference error when pipeline_para_size > 1 and int8_mode != 0 Sep 21, 2023
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.

None yet

1 participant