Model card
The all-MiniLM-L6-v2 is a lightweight, high-efficiency transformer model designed specifically for mapping sentences and paragraphs to a 384-dimensional dense vector space. Unlike larger LLMs, this model focuses on sentence-level embeddings, making it an ideal choice for developers building semantic search engines, clustering pipelines, or RAG (Retrieval-Augmented Generation) systems where low latency is critical. With only 22M parameters, it offers a strong balance between performance and resource consumption, allowing for deployment on edge devices or CPUs without significant overhead. It is optimized for sentence similarity tasks, effectively capturing semantic meaning to identify related texts even when keywords do not overlap.
Model files and versions
Download this model
We recommend using the ModelScope CLI or SDK. Install ModelScope first, then choose a full snapshot, single file, SDK or Git LFS workflow.
sentence-transformers/all-MiniLM-L6-v2Install the CLI and SDK dependency before downloading.
pip install modelscopeDownload the complete weights, configuration and model card.
modelscope download --model sentence-transformers/all-MiniLM-L6-v2README.md is used as an example; replace it with another repository file when needed.
modelscope download --model sentence-transformers/all-MiniLM-L6-v2 README.md --local_dir ./dirUseful in Python projects and automation scripts.
from modelscope import snapshot_download
model_dir = snapshot_download('sentence-transformers/all-MiniLM-L6-v2')Make sure Git LFS is installed correctly.
git lfs install
git clone https://www.modelscope.cn/sentence-transformers/all-MiniLM-L6-v2.gitFetch the repository structure first, then pull large files when needed.
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/sentence-transformers/all-MiniLM-L6-v2.gitHow to use
- 01Step 1
Read the model card and source information.
- 02Step 2
Start with a small, non-sensitive evaluation.
- 03Step 3
Review quality, licensing and usage limits.
- 04Step 4
Adopt it only after validation.
Discussions
Use this space to keep checking source information, usage experience and maintenance status.
Open source page