Downloads · 30 days
7
21% of all-time downloads
mikhailmedical/potion-retrieval-32M-tfjs
potion-retrieval-32M-tfjs is a feature extraction model from mikhailmedical. Use it when you need embeddings to search or compare text. It is set up for model2vec. The card lists the license as mit.
Transformers.js-compatible ONNX re-export of minishlab/potion-retrieval-32M.
Downloads · 30 days
7
21% of all-time downloads
All-time downloads
34
Public
Repo size
129 MB
Likes
1
Public
Click a slice to open those files.
.onnx129 MB · 99%
From the Hugging Face model README
Transformers.js-compatible ONNX re-export of minishlab/potion-retrieval-32M.
The official ONNX export uses a flat input_ids [num_tokens] + offsets [batch] interface that transformers.js cannot feed. This rebuild wraps the same embedding table (embedding_bag.weight, 63091x512, fp32) in a standard encoder interface:
input_ids [batch, seq] (int64), attention_mask [batch, seq] (int64)last_hidden_state [batch, 1, 512] (masked mean-pooled)StaticModel.from_pretrained("minishlab/potion-retrieval-32M")).Usage with transformers.js (e.g. Smart Connections / Smart Environment):
import { pipeline } from '@huggingface/transformers';
const p = await pipeline('feature-extraction', 'mikhailmedical/potion-retrieval-32M-tfjs', { dtype: 'fp32' });
const out = await p(texts, { pooling: 'mean', normalize: true });
MIT license, inherited from the upstream model.