Use CPU for the transformer

This commit is contained in:
Apher 2026-07-08 00:43:01 +00:00
parent a5a0096fdc
commit c1552c5b18

View File

@ -70,7 +70,8 @@ function cosineSimilarity(a, b) {
async function initModel() {
extractor = await pipeline("feature-extraction", `${config.NLP_TRANSFORMER}`, {
dtype: 'fp32',
quantized: false
quantized: false,
device: "cpu",
});
console.log("MiniLM model loaded");
}