this model not working in js

#42
by jsoto - opened

hello
When running the code in ps I get the following error:
Error: Exception during initialization: /onnxruntime_src/onnxruntime/core/optimizer/initializer.cc:30 onnxruntime::Initializer::Initializer(const onnx::TensorProto&, const onnxruntime::Path&) !model_path.IsEmpty() was false. model_path must not be empty. Ensure that a path is provided when the model is created or loaded.

However when I run it with intfloat/multilingual-e5-base, it works fine
Can you help ?

P.S the code
import { pipeline } from '@xenova/transformers';

const iterations = 1

async function embed(text, model) {
const embedPipeline = await pipeline('feature-extraction', model, { quantized: false });
for (let i = 0; i < iterations; i++) {
const embedding = await embedPipeline(text);
console.log(Embedding size: ${embedding.dims});
}
}

const models = ['intfloat/multilingual-e5-large'];

for (const model of models) {
const startTime = Date.now();
await embed('I love talking about myself', model);
console.log(${model}: ${(Date.now() - startTime) / iterations} ms);
}

Sign up or log in to comment