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

如何分段转换llama模型为onnx? #26

Open
jxcomeon opened this issue Jul 14, 2023 · 5 comments
Open

如何分段转换llama模型为onnx? #26

jxcomeon opened this issue Jul 14, 2023 · 5 comments

Comments

@jxcomeon
Copy link

看了一下readme,想请问一下将llama转换为onnx的代码在tool/export-onnx.py中么?我没有找到

@AmazeQiu
Copy link

同求! 我也没找到! 自己转llama到onnx踩了好多坑了还是没转成功,好奇是怎么转的 T_T

@AmazeQiu
Copy link

我发现了,他是自己修改transformers源码,在transformers源码里调用了torch.onnx.export

@jxcomeon
Copy link
Author

我发现了,他是自己修改transformers源码,在transformers源码里调用了torch.onnx.export

他修改的源码在哪里呀?

@tpoisonooo
Copy link
Owner

我发现了,他是自己修改transformers源码,在transformers源码里调用了torch.onnx.export

对啊。

@tpoisonooo
Copy link
Owner

我发现了,他是自己修改transformers源码,在transformers源码里调用了torch.onnx.export

他修改的源码在哪里呀?

https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/modeling_llama.py 在这儿改。最终都会调这个 class

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

3 participants