Use CPU for the transformer
This commit is contained in:
parent
a5a0096fdc
commit
c1552c5b18
@ -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");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user