Downloads · 30 days
375
84% of all-time downloads
minishlab/potion-retrieval-32m-onnx
potion-retrieval-32m-onnx is a machine learning model from minishlab. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for model2vec. The card lists the license as mit.
This is an ONNX export of the minishlab/potion-retrieval-32m Model2Vec model, produced with the ONNX runtime. Model2Vec models use static embeddings, allowing text embeddings to be computed orders of magnitude faster…
Downloads · 30 days
375
84% of all-time downloads
All-time downloads
449
Public
Repo size
258 MB
Likes
2
Public
Click a slice to open those files.
.onnx129 MB · 99%
From the Hugging Face model README
This is an ONNX export of the minishlab/potion-retrieval-32m Model2Vec model, produced with the ONNX runtime. Model2Vec models use static embeddings, allowing text embeddings to be computed orders of magnitude faster on both GPU and CPU. This ONNX export lets you run the model with onnxruntime or transformers.js, without depending on the model2vec package.
import onnxruntime as ort
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("potion-retrieval-32m_onnx")
session = ort.InferenceSession("model.onnx")
encodings = tokenizer(["Example sentence"], padding=True, return_tensors="np")
embeddings = session.run(None, dict(encodings))[0]
If you don't need the ONNX runtime, you can load the original model with the Model2Vec library instead:
from model2vec import StaticModel
model = StaticModel.from_pretrained("minishlab/potion-retrieval-32m")
embeddings = model.encode(["Example sentence"])
Model2Vec was developed by the Minish Lab team consisting of Stephan Tulkens and Thomas van Dongen.
Please cite the Model2Vec repository if you use this model in your work.
@software{minishlab2024model2vec,
author = {Stephan Tulkens and {van Dongen}, Thomas},
title = {Model2Vec: Fast State-of-the-Art Static Embeddings},
year = {2024},
publisher = {Zenodo},
doi = {10.5281/zenodo.17270888},
url = {https://github.com/MinishLab/model2vec},
license = {MIT}
}