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

feat: onnx runtime upgrade #478

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

kallebysantos
Copy link
Contributor

@kallebysantos kallebysantos commented Jan 23, 2025

DRAFT: preparing for ort rc-10 that should come in feb 2025.


What kind of change does this PR introduce?

Refactor, upgrade

What is the current behavior?

Current the ort rust backend is using ort rc-2 & onnx v1.19.2

What is the new behavior?

This PR introduces:

  • ort: library upgrade from rc-2 to rc-9
  • onnx: support from 1.19.2 to 1.20.1
  • ndarray_linalg: removal of unnecessary library, that last release was about 2y ago
  • applied some code refactor and cleaning

TODO:

  • Add support for String tensors.
  • Upgrade to upcoming ort rc-10

Need help:
I would like to ask @nyannyacha 💚, if possible, to add updated tests snapshots for other platforms as well do k6 tests comparing to the latest version of that.

- `ndarray_linalg`: Since `ort` deps to `ndarray=0.16`, decided to
remove this extra dependency. Normalization can be done in a simple
small funtion instead of deriving it from an external crate.
using the `rc-9` apis to get the same results from older `rc-2`
Since `ONNX`version has been upgraded, the snapshots need to be
recreated
- Since `ndarray_linalg` has been removed we need to manually apply L2
normalization
- Applying `dot product` between two embeddings to ensures that
`mean_pool` and `normalize` is working properly
@nyannyacha
Copy link
Collaborator

I would like to ask @nyannyacha 💚, if possible, to add updated tests snapshots for other platforms as well do k6 tests comparing to the latest version of that.

Sure! I will do it for you.

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

Successfully merging this pull request may close these issues.

2 participants