Can not get JINA CLIP v1 running #356
-
I am trying to get JINA CLIP v1 ONNX model to run but I am stuck with following code. Would appreciate any help.
Cargo.toml
|
Beta Was this translation helpful? Give feedback.
Answered by
decahedron1
Feb 26, 2025
Replies: 2 comments 2 replies
-
What's the error you're encountering? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I get following error:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The input IDs need to be converted to something that can be cast into a tensor first.
This can be done by creating an
Arc<Box<[i64]>>
from the encoded tokens:ort/examples/gpt2/examples/gpt2-no-ndarray.rs
Line 48 in 123c449
and passing a
(Vec<i64>, Arc<Box<[i64]>>)
as an input:ort/examples/gpt2/examples/gpt2-no-ndarray.rs
Line 56 in 123c449
The exact shape of the input tensor depends on what the model expects.