From the model card
Fields below are copied from the tags and counters on the HuggingFace repository sentence-transformers/all-MiniLM-L12-v2 at our last fetch. They are set by the uploader, not verified by us; rows with no tag are omitted. How this page is made.
- Publisher (HF namespace)
- sentence-transformers
- Pipeline tag
- sentence-similarity
- Library
- Sentence Transformers, Transformers
- Framework tags
- PyTorch, Rust (candle)
- Weight formats
- ONNX, safetensors, OpenVINO
- License tag
apache-2.0— read the license file in the repo before relying on it- Lineage
-
- base model microsoft/MiniLM-L12-H384-uncased
- quantized from microsoft/MiniLM-L12-H384-uncased
- Language tags
- English (en)
- Papers cited
- arXiv:1904.06472, arXiv:2102.07033, arXiv:2104.08727, arXiv:1704.05179, arXiv:1810.09305
- Datasets declared
- s2orc, flax-sentence-embeddings/stackexchange_xml, ms_marco, gooaq, yahoo_answers_topics, code_search_net, search_qa, eli5 and 13 more on the model card
- Downloads (HF counter at last fetch)
- 3,722,980
- Likes (HF counter at last fetch)
- 327
- Model card
- https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2
Use cases
- Semantic search where L6 quality is insufficient but latency allows L12
- Document clustering in medium-throughput pipelines
- Semantic textual similarity scoring
- Cross-encoder training data preparation via hard negative mining
Pros
- 12-layer depth improves ranking quality over L6 on MTEB
- Apache-2.0 licensed
- Identical API to other sentence-transformers models
- 384-dim output is lightweight for storage at scale
Cons
- Still outperformed by E5-large and GTE models on most MTEB tasks
- English-only
- Twice the inference time of L6 for modest quality improvement
- Not suitable for long documents — 256-token context window
Tags
sentence-transformerspytorchrustonnxsafetensorsopenvinobertfeature-extractionsentence-similaritytransformersendataset:s2orcdataset:flax-sentence-embeddings/stackexchange_xmldataset:ms_marcodataset:gooaqdataset:yahoo_answers_topicsdataset:code_search_netdataset:search_qadataset:eli5dataset:snli