Closed ricpruss closed 10 months ago
Okay I did a workaround to get back to what I had when this last worked for me. And managed to successfully run it.
pip install https://download.pytorch.org/whl/nightly/cpu/torch-2.2.0.dev20231213%2Bcpu-cp310-cp310-linux_x86_64.whl
2. Checkout the last good release version
git checkout -t remotes/origin/rel-1.16.3
3. Do a build that builds the python wheel
/build.sh --config Release --build_shared_lib --parallel --enable_pybind --skip_tests --build_wheel --update --build
cd build/Linux/Release/dist/
pip install ./onnxruntime-1.17.0-cp310-cp310-linux_x86_64.whl
Then do the convert from the transformers directory as per the original instructions..,
Thank you for reporting this issue @ricpruss. The opset error is fixed in main and will be released with the next release. We are looking into the rotary embedding param mismatch, and will keep you posted.
The rotary embedding error is fixed here and the reason for the opset error is explained here.
Describe the documentation issue
I am pretty sure these were working a few weeks ago but now both of the documented ways of exporting LLama-7B are broken.
The Readme at https://github.com/microsoft/onnxruntime/tree/main/onnxruntime/python/tools/transformers/models/llama gives.
# From source: $ git clone https://github.com/microsoft/onnxruntime $ cd onnxruntime/onnxruntime/python/tools/transformers/ $ python3 -m models.llama.convert_to_onnx -m meta-llama/Llama-2-7b-hf --output llama2-7b
Dies with a param mismatch in the rotary encoder:
and the run from python installed 1.16.3 onnxruntime
Dies with:
This is the nightly pytorch on CPU and latest onnxruntime
In case its a version drama here is a list for you.
Page / URL
https://github.com/microsoft/onnxruntime/tree/main/onnxruntime/python/tools/transformers/models/llama