Upgrade ONNX runtime, ONNX Gen AI runtime, add a new model to test changes#1075
Upgrade ONNX runtime, ONNX Gen AI runtime, add a new model to test changes#1075ammbra wants to merge 3 commits into
Conversation
|
👋 Welcome back amihalceanu! A progress list of the required criteria for merging this PR into |
|
@ammbra This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 6 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. ➡️ To flag this PR as ready for integration with the above commit message, type |
Webrevs
|
Reviewed-by: psandoz Upgrade ONNX runtime, ONNX Gen AI runtime, add a new model to test changes. Signed-off-by: Ana-Maria Mihalceanu <amihalceanu@openjdk.org>
32241be to
3b8650d
Compare
|
@ammbra Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
Signed-off-by: Ana-Maria Mihalceanu <ana-maria.m.mihalceanu@oracle.com>
Signed-off-by: Ana-Maria Mihalceanu <ana-maria.m.mihalceanu@oracle.com>
|
Closing this one due to git history mess, development was reloaded in #1085 |
I apologize for such a big PR, but most of its changes are result of regeneration for native bindings, operators, prototufs etc. So, this PR contains many changes that relate to upgrading the ONNX runtime library (1.26.0) and its native GenAI (0.14.0) counterpart:
oracle.code.onnx.foreignare generated via the cr-examples/onnx/opgen/setup.sh script and its helper symbols files to generate only the absolute necessary contents.OnnxProtoBuilderneeded to support also shapes because I kept getting this native error once rebuilding Babylon:I managed to identify that the exported model was the source for such an error (both local debug and by also comparing in Netron). To my understanding,
Generators::Model::IsPruned() constmethod checks if the underlying model has been compressed using model pruning. Pruning seems to reduce model size and latency by zeroing out or permanently removing unnecessary weights and parameters, but I think in this case the generated model was aggressively pruned from the beginning of traversing the graph, thus resulting in the error above. The aggressive pruning was performed due the lack of shapes being there. This error occurred only for LLMs, the rest of the ML models being unaffected.AllMiniLML6V2EmbeddingModelis inspired by https://huggingface.co/onnx-community/all-MiniLM-L6-v2-ONNX and by running theOnnxLiftover its default (model.onnx). As a result, I could obtain a quite good model to start. Then I cleaned it locally based on how the official config.json looked like. TheBertTokenizeris just a helper for working with the tokenizer and its constants are from tokenizer_config.json and config.json , while theEmbeddingDemois just a Java version of the code from the landing page of the model.Progress
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/babylon.git pull/1075/head:pull/1075$ git checkout pull/1075Update a local copy of the PR:
$ git checkout pull/1075$ git pull https://git.openjdk.org/babylon.git pull/1075/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1075View PR using the GUI difftool:
$ git pr show -t 1075Using diff file
Download this PR as a diff file:
https://git.openjdk.org/babylon/pull/1075.diff
Using Webrev
Link to Webrev Comment