Instructions to use minishlab/potion-base-8M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Model2Vec
How to use minishlab/potion-base-8M with Model2Vec:
from model2vec import StaticModel model = StaticModel.from_pretrained("minishlab/potion-base-8M") - sentence-transformers
How to use minishlab/potion-base-8M with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("minishlab/potion-base-8M") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
security warning on model.onnx
Protect AI has raised a security warning about the file model.onnx containing an "architectural backdoor" susceptible to attack.
Are you aware of this, and what is your take on it?
Thanks!
Hi @hugging-joe , we believe this is a false positive, rather than a genuine “architectural backdoor. as described in the linked article. Our onnx conversion code is available here: https://github.com/MinishLab/model2vec/blob/main/scripts/export_to_onnx.py. As you can see, there are no actual suspicious branches/pathways in the code. I think that this flagging most likely happens because we have an unconventional forward pass due to the static nature of our models.