You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have successfully downloaded this model, using it successfuly with Deep Java Library (ai.djl:api:0.28.0) - therefore I am confident, that model itself is correct.
My code snippet:
TransformersEmbeddingModel embeddingModel = new TransformersEmbeddingModel();
embeddingModel.setTokenizerResource("classpath:/onnx/multilingual-e5-large/tokenizer.json");
embeddingModel.setModelResource("classpath:/onnx/multilingual-e5-large/model.onnx_data");
embeddingModel.afterPropertiesSet();
embeddingModel.afterPropertiesSet() gives me following Error:
Caused by: java.lang.OutOfMemoryError: Required array size too large
at java.base/java.io.InputStream.readNBytes(InputStream.java:420) ~[na:na]
at java.base/java.io.InputStream.readAllBytes(InputStream.java:349) ~[na:na]
at org.springframework.util.FileCopyUtils.copyToByteArray(FileCopyUtils.java:149) ~[spring-core-6.1.10.jar:6.1.10]
at org.springframework.core.io.Resource.getContentAsByteArray(Resource.java:151) ~[spring-core-6.1.10.jar:6.1.10]
at org.springframework.ai.transformers.TransformersEmbeddingModel.afterPropertiesSet(TransformersEmbeddingModel.java:193) ~[spring-ai-transformers-1.0.0-M1.jar:1.0.0-M1]
The model has 2,1Gb, I am using 64bit JVM 17 and setting JVM -Xms16g -Xmx16g did not help.....
The model has two files model.onnx and model.onnx_data. Initially I was using model.onnx, getting ai.onnxruntime load error.
I have 32Gb memory, which should be fully sufficient for this model...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to use ONNX export of model intfloat/multilingual-e5-large: https://huggingface.co/intfloat/multilingual-e5-large/tree/main/onnx
I have successfully downloaded this model, using it successfuly with Deep Java Library (ai.djl:api:0.28.0) - therefore I am confident, that model itself is correct.
My code snippet:
TransformersEmbeddingModel embeddingModel = new TransformersEmbeddingModel();
embeddingModel.setTokenizerResource("classpath:/onnx/multilingual-e5-large/tokenizer.json");
embeddingModel.setModelResource("classpath:/onnx/multilingual-e5-large/model.onnx_data");
embeddingModel.afterPropertiesSet();
embeddingModel.afterPropertiesSet() gives me following Error:
Caused by: java.lang.OutOfMemoryError: Required array size too large
at java.base/java.io.InputStream.readNBytes(InputStream.java:420) ~[na:na]
at java.base/java.io.InputStream.readAllBytes(InputStream.java:349) ~[na:na]
at org.springframework.util.FileCopyUtils.copyToByteArray(FileCopyUtils.java:149) ~[spring-core-6.1.10.jar:6.1.10]
at org.springframework.core.io.Resource.getContentAsByteArray(Resource.java:151) ~[spring-core-6.1.10.jar:6.1.10]
at org.springframework.ai.transformers.TransformersEmbeddingModel.afterPropertiesSet(TransformersEmbeddingModel.java:193) ~[spring-ai-transformers-1.0.0-M1.jar:1.0.0-M1]
The model has 2,1Gb, I am using 64bit JVM 17 and setting JVM -Xms16g -Xmx16g did not help.....
The model has two files model.onnx and model.onnx_data. Initially I was using model.onnx, getting ai.onnxruntime load error.
I have 32Gb memory, which should be fully sufficient for this model...
Beta Was this translation helpful? Give feedback.
All reactions