-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[BUG] [0.7.4] Attribute error with DeepSpeedTransformerInference #2478
Comments
Hi @tomeras91, That's an attribute that is populated on the relevant Tensors during the module injection process (which is triggered by |
Yes. I want to instantiate inference layers and load weights into them. I have pretrained weights from a different source. Basically, I want to use DeepSpeed Inference to serve my custom models. |
Yes, you can supply a custom The policy is then passed to model = deepspeed.init_inference(model,
injection_policy={CustomModule: CustomModulePolicy},
dtype=torch.float16,
# Other arguments
) |
Thanks. I'll try it out |
Please re-open if you still have an issue. |
Describe the bug
Running a forward pass on a DeepSpeedTransformerInference layer results in an Attribute error saying that
torch.Parameter
doesn't have attributescale
.To Reproduce
Here is a minimal reproducible example that shows the bug:
Running the code resulted with the following exception
Expected behavior
I was expecting to get a correct output, without the exception.
ds_report output
System info (please complete the following information):
Launcher context
Launching directly using Python interpreter.
Additional info
I'm not 100% sure, but seems like this bug is a result of PR 2217 by @RezaYazdaniAminabadi. More specifically, the change in line 419 of transformer_inference.py
The text was updated successfully, but these errors were encountered: