Downloads · 30 days
204
84% of all-time downloads
minishlab/potion-base-8m-onnx
potion-base-8m-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-base-8m Model2Vec model, produced with the ONNX runtime. Model2Vec models use static embeddings, allowing text embeddings to be computed orders of magnitude faster on bot…
Downloads · 30 days
204
84% of all-time downloads
All-time downloads
243
Public
Repo size
60.5 MB
Likes
2
Public
Click a slice to open those files.
.onnx30.3 MB · 98%
From the Hugging Face model README
This is an ONNX export of the minishlab/potion-base-8m 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-base-8m_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-base-8m")
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}
}