Model reference · open weights
all-MiniLM-L6-onnx is an open-weight embedding model from onnx-models. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | onnx-models |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Context | 512 tokens |
| Runs with | light-embed |
| Released | 2024-07-27 |
| Popularity | 10k downloads / month |
| Licence | Unknown |
About
This is the ONNX-ported version of the sentence-transformers/all-MiniLM-L6-v2 for generating text embeddings.
Using this model becomes easy when you have light-embed installed:
pip install -U light-embed
Then you can use the model by specifying the original model name like this:
from light_embed import TextEmbedding
sentences = [
"This is an example sentence",
"Each sentence is converted"
]
model = TextEmbedding('sentence-transformers/all-MiniLM-L6-v2')
embeddings = model.encode(sentences)
print(embeddings)
or by specifying the onnx model name like this:
from light_embed import TextEmbedding
sentences = [
"This is an example sentence",
"Each sentence is converted"
]
model = TextEmbedding('onnx-models/all-MiniLM-L6-v2-onnx')
embeddings = model.encode(sentences)
print(embeddings)
Binh Nguyen / binhcode25@gmail.com
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys onnx-models-all-minilm-l6-onnx for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (onnx-models-all-minilm-l6-onnx below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"onnx-models-all-minilm-l6-onnx","input":"text to embed"}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.