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

how can i export the model from pytorch to onnx? #171

Open
221588 opened this issue Mar 19, 2024 · 1 comment
Open

how can i export the model from pytorch to onnx? #171

221588 opened this issue Mar 19, 2024 · 1 comment

Comments

@221588
Copy link

221588 commented Mar 19, 2024

I have try your example, however when I try to export the model to onnx, it's error。

@wkcn
Copy link
Contributor

wkcn commented Mar 20, 2024

Thanks for your attention to our work! You can replace FP8Linear with torch.nn.Linear, where the weight and bias with ScalingTensor can be converted to torch.float32 by 'weight = weight.float(), bias = bias.float()'. Then the FP32 model can be converted to onnx.

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

No branches or pull requests

2 participants