wangzhaode / llm-export

llm-export can export llm model to onnx.
Apache License 2.0
190 stars 21 forks source link

export Chatglm3 fail #4

Closed yaoxingwei closed 9 months ago

yaoxingwei commented 10 months ago

Hello, I try to export chatglm3 to onnx single model, but got below error. Did I miss some installation flow? Thanks.

ENV: python3.8.0

CMD: python -m pip install -r requirements.txt python llm_export.py --path ~/models/chatglm3-6b/ --export

trigger error: Traceback (most recent call last): File "/home/llm-export/llm_export.py", line 650, in llm_exporter.export() File "/home/llm-export/llm_export.py", line 222, in export torch.onnx.export( File "/home//anaconda3/envs/hf/lib/python3.8/site-packages/torch/onnx/utils.py", line 506, in export _export( File "/home/anaconda3/envs/hf/lib/python3.8/site-packages/torch/onnx/utils.py", line 1587, in _export ) = graph._exportonnx( # type: ignore[attr-defined] RuntimeError: ONNX export failed. Could not open file or directory: ././onnx/embed.weight

wangzhaode commented 9 months ago

mkdir onnx and then do the export