Model reference · open weights

multi-qa-MiniLM-L6-cls_dot

Embeddings flax-sentence-embeddings Embeddings 1 build Licence not stated 5k dl/mo

multi-qa-MiniLM-L6-cls_dot is an open-weight embedding model from flax-sentence-embeddings. multi-qa_v1-MiniLM-L6-cls_dot (BF16) weighs 91 MB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • multi-qa-MiniLM-L6-cls_dot is a sentence embedding model developed by flax-sentence-embeddings for tasks such as semantic search and clustering.
  • It is based on the MiniLM-L6-H384-uncased architecture and was fine-tuned using a Siamese network setup with contrastive learning on question and answer pairs from StackExchange and other datasets.
  • The model supports a context length of 512 tokens and uses the cls output for generating embeddings.

Summary of the flax-sentence-embeddings/multi-qa_v1-MiniLM-L6-cls_dot model card, 2026-10-01

What it is

Released byflax-sentence-embeddings
Released2022-03-02
VRAM91 MB for the weights

What it runs on

Memory and cards for multi-qa_v1-MiniLM-L6-cls_dot (BF16)

91 MBweights, file size
1.1 GBruntime overhead
CardRunsMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What flax-sentence-embeddings says about multi-qa-MiniLM-L6-cls_dot

Read the model card

Model Description

SentenceTransformers is a set of models and frameworks that enable training and generating sentence embeddings from given data. The generated sentence embeddings can be utilized for Clustering, Semantic Search and other tasks. We used a pretrained nreimers/MiniLM-L6-H384-uncased model and trained it using Siamese Network setup and contrastive learning objective. Question and answer pairs from StackExchange was used as training data to make the model robust to Question / Answer embedding similarity. For this model, cls output was used instead of mean pooling as sentence embeddings. Dot product was used to calculate similarity for learning objective.

We developed this model during the Community week using JAX/Flax for NLP & CV, organized by Hugging Face. We developed this model as part of the project: Train the Best Sentence Embedding Model Ever with 1B Training Pairs. We benefited from efficient hardware infrastructure to run the project: 7 TPUs v3-8, as well as assistance from Google’s Flax, JAX, and Cloud team members about efficient deep learning frameworks.

Intended uses

Our model is intended to be used as a sentence encoder for a search engine. Given an input sentence, it outputs a vector which captures the sentence semantic information. The sentence vector may be used for semantic-search, clustering or sentence similarity tasks.

How to use

Here is how to use this model to get the features of a given text using SentenceTransformers library:

from sentence_transformers import SentenceTransformer

model = SentenceTransformer('flax-sentence-embeddings/multi-qa_v1-MiniLM-L6-cls_dot')
text = "Replace me by any question / answer you'd like."
text_embbedding = model.encode(text)
# array([-0.01559514,  0.04046123,  0.1317083 ,  0.00085931,  0.04585106,
#        -0.05607086,  0.0138078 ,  0.03569756,  0.01420381,  0.04266302 ...],
#        dtype=float32)

Training procedure

Pre-training

We use the pretrained nreimers/MiniLM-L6-H384-uncased. Please refer to the model card for more detailed information about the pre-training procedure.

Fine-tuning

We fine-tune the model using a contrastive objective. Formally, we compute the cosine similarity from each possible sentence pairs from the batch. We then apply the cross entropy loss by comparing with true pairs.

Hyper parameters

We trained on model on a TPU v3-8. We train the model during 80k steps using a batch size of 1024 (128 per TPU core). We use a learning rate warm up of 500. The sequence length was limited to 128 tokens. We used the AdamW optimizer with a 2e-5 learning rate. The full training script is accessible in this current repository.

Training data

We used the concatenation from multiple Stackexchange Question-Answer datasets to fine-tune our model. MSMARCO, NQ & other question-answer datasets were also used.

DatasetPaperNumber of training tuples
Stack Exchange QA - Title & Answer-4,750,619
Stack Exchange-364,001
TriviaqQA-73,346
SQuAD2.0paper87,599
Quora Question Pairs-103,663
Eli5 paper325,475
PAQpaper64,371,441
WikiAnswerspaper77,427,422
MS MARCOpaper9,144,553
GOOAQ: Open Question Answering with Diverse Answer Typespaper3,012,496
Yahoo Answers Question/Answerpaper681,164
SearchQA-582,261
Natural Questions (NQ)paper100,231

Citing & Authors

@misc{multiqa-embeddings,
  author = {Flax Sentence Embeddings Team},
  title = {Multi QA: Sentence Embeddings},
  year = {2021},
  url = {https://huggingface.co/flax-sentence-embeddings/multi-qa_v1-MiniLM-L6-cls_dot},
}

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms