Model reference · open weights
msmarco-distilbert-cos is an open-weight embedding model from sentence-transformers, listed in the AxForge catalogue. AxForge can bring it up on EU-owned hardware for you on request — with the licence handled where one is required.
About
msmarco-distilbert-cos-v5 This is a sentence-transformers model: It maps sentences & paragraphs to a 768 dimensional dense vector space and was designed for semantic search. It has been trained on 500k (query, answer) pairs from the MS MARCO Passages dataset. For an introduction to semantic search, have a look at: SBERT.net - Semantic Search Usage (Sentence-Transformers) Using this model becomes easy when you have sentence-transformers installed: Then you can use the model like this: Usage (HuggingFace Transformers) Without sentence-transformers, you can use the model like this: First, you pass your input through the transformer model, then you have to apply the correct pooling-operation on-top of the contextualized word embeddings. Technical Details In the following some technical details how this model must be used: Note: When loaded with sentence-transformers, this model produces normalized embeddings with length 1. In that case, dot-product and cosine-similarity are equivalent. dot-product is preferred as it is faster. Euclidean distance is proportional to dot-product and can also be used. Citing & Authors This model was trained by sentence-transformers. If you find this model helpful, feel free to cite our publication Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks:
Summarised from the published model card. Read the full card on the HuggingFace links below.
Specifications
| Maker | sentence-transformers |
|---|---|
| Type | Embedding models |
| Parameters (lead) | 66M |
| Context | 512 tokens |
| Variants | 1 |
| Runs with | sentence-transformers |
| Released | 2022-03-02 |
| Popularity | 133k downloads / month |
| Likes | 10 |
| Licence | Commercial licence needed |
How it works
Variants
Open weights ship in several sizes and precisions. One page, all the variants — pick the one that fits your GPU. VRAM figures are estimates from model size.
| Variant | Params | Precision | VRAM | Fits 16 GB | Weights |
|---|---|---|---|---|---|
| msmarco-distilbert-cos-v5 | 66M | BF16 | ~0.2 GB | ✓ | Weights ↗ |
Using it via the API
Once AxForge deploys msmarco-distilbert-cos for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (msmarco-distilbert-cos 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":"msmarco-distilbert-cos","input":"text to embed"}'
Licence
The weights are open but its licence needs a commercial agreement for business use. AxForge can arrange that licence and host the model for you — you pay AxForge, we settle with the model’s maker. Ask us for a quote. Read the licence ↗
Explore