Instructions to use mikhailmedical/potion-retrieval-32M-tfjs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Model2Vec
How to use mikhailmedical/potion-retrieval-32M-tfjs with Model2Vec:
from model2vec import StaticModel model = StaticModel.from_pretrained("mikhailmedical/potion-retrieval-32M-tfjs") - Transformers.js
How to use mikhailmedical/potion-retrieval-32M-tfjs with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('feature-extraction', 'mikhailmedical/potion-retrieval-32M-tfjs'); - Notebooks
- Google Colab
- Kaggle
potion-retrieval-32M-tfjs
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:
- Inputs:
input_ids [batch, seq](int64),attention_mask [batch, seq](int64) - Output:
last_hidden_state [batch, 1, 512](masked mean-pooled) - The tokenizer ships with its special-token post-processor removed, matching native model2vec pooling (embeddings verified numerically identical to
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.
- Downloads last month
- 16
Model tree for mikhailmedical/potion-retrieval-32M-tfjs
Base model
minishlab/potion-base-32M Finetuned
minishlab/potion-retrieval-32M