System Info
MacOS M1 (ARM)
Node: 23.7.0
Environment/Platform
Description
This is related to microsoft/onnxruntime#24579 causing issues on Mac. I am using all-MiniLM-L6-v2 but getting "libc++abi: terminating due to uncaught exception of type std::__1:system_error: mutex lock failed: Invalid argument". Seems like an ONNX runtime 1.21.0 critical bug.
My question is what can we do as a temporary workaround?
Reproduction
From MacOS (M1) and node runtime:
import { HuggingFaceTransformersEmbeddings } from "@langchain/community/embeddings/huggingface_transformers";
const model = new HuggingFaceTransformersEmbeddings({
model: "Xenova/all-MiniLM-L6-v2",
});
/* Embed queries */
const res = await model.embedQuery(
"What would be a good company name for a company that makes colorful socks?"
);
console.log({ res });
/* Embed documents */
const documentRes = await model.embedDocuments(["Hello world", "Bye bye"]);
console.log({ documentRes });
when embedQuery runs it generates the embeddings but ends with the error. Looking for temporary workaround while ONNX team submits fix