how can i export the model from pytorch to onnx?
Opened this issue · 1 comments
221588 commented
I have try your example, however when I try to export the model to onnx, it's error。
wkcn commented
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.