vietnamese-embedding-onnx / test_model.js
Manh Lai
fix: update code
897662d
raw
history blame
551 Bytes
import { pipeline } from '@xenova/transformers';
async function run() {
// Load the pipeline for feature extraction (embeddings)
const extractor = await pipeline(
'feature-extraction',
'laituanmanh32/vietnamese-embedding-onnx',
{
quantized: false, // Disable quantization (if using full-precision ONNX)
}
);
// Generate embeddings for Vietnamese text
const output = await extractor('Mô hình thử nghiệm', { pooling: 'mean' });
console.log(output);
}
run();