Views
No views yet
npm i @huggingface/transformersXenova/conv-bert-small.1import { pipeline } from '@huggingface/transformers';
2
3// Create feature extraction pipeline
4const extractor = await pipeline('feature-extraction', 'Xenova/conv-bert-small');
5
6// Perform feature extraction
7const output = await extractor('This is a test sentence.');
8console.log(output)
9// Tensor {
10// dims: [ 1, 8, 256 ],
11// type: 'float32',
12// data: Float32Array(2048) [ -0.09434918314218521, 0.5715903043746948, ... ],
13// size: 2048
14// }onnx).