{
 "kind": "model",
 "slug": "sentence-transformers-all-minilm-l6-v2",
 "path": "models/open/sentence-transformers-all-minilm-l6-v2/",
 "name": "all-MiniLM-L6-v2",
 "maker": "Sentence Transformers",
 "density": "full",
 "crumbs": [
  [
   "Models",
   "models/"
  ],
  [
   "Open models",
   "models/open/"
  ]
 ],
 "lead": "Small, fast search by meaning.",
 "chips": [
  {
   "label": "Embeddings and search",
   "path": "models/open/?task=embed"
  },
  {
   "label": "Commercial use"
  },
  {
   "label": "Runs on 16 GB"
  }
 ],
 "primary": {
  "label": "Copy model id",
  "copy": "sentence-transformers/all-MiniLM-L6-v2"
 },
 "links": [
  {
   "label": "Hugging Face",
   "href": "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2"
  },
  {
   "label": "Demos",
   "href": "https://huggingface.co/spaces?search=all-MiniLM-L6-v2"
  }
 ],
 "track": "New versions, price and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "Commercial use",
   "value": "Allowed",
   "status": "yes",
   "sub": "Apache 2.0",
   "quote": "language: en license: apache-2.0",
   "note": "Apache 2.0 allows commercial use free of charge.",
   "src": "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/raw/main/README.md"
  },
  {
   "key": "local",
   "label": "On your machine",
   "status": "yes",
   "value": "16 GB of memory",
   "sub": "0.0B parameters, ~0.0 GB at 4-bit",
   "note": "Our estimate: about 0.6 GB per billion parameters at 4-bit, with room for the context.",
   "src": "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2"
  },
  {
   "key": "api",
   "label": "Through an API",
   "status": "yes",
   "value": "1 provider",
   "sub": "hf-inference",
   "note": "Hugging Face Inference Providers that serve it live.",
   "src": "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2"
  },
  {
   "key": "rising",
   "label": "Momentum",
   "status": "info",
   "value": "6,182 likes",
   "sub": "Hugging Face trending score 25",
   "note": "Likes and the trending score are Hugging Face's own figures; attention, not quality.",
   "src": "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2"
  }
 ],
 "vfoot": "Checked against its official pages on Nov 23, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What all-MiniLM-L6-v2 does",
   "parts": [
    {
     "t": "prose",
     "text": "all-MiniLM-L6-v2 is an open text model by the Sentence Transformers project that turns English sentences and short paragraphs into lists of 384 numbers, so apps can find texts by meaning. It is published on Hugging Face and is free to use in paid products under Apache 2.0."
    },
    {
     "t": "h3",
     "text": "What people use it for"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Search notes and help articles by meaning",
       "text": "Turn your texts into number lists once, then find those closest to a question even when the words differ.",
       "idea": false
      },
      {
       "title": "Group similar texts together",
       "text": "Sort feedback, tickets or headlines into groups of texts that talk about the same thing.",
       "idea": false
      },
      {
       "title": "Use it without the helper library",
       "text": "Load it with plain Hugging Face Transformers and average the word vectors yourself, for example inside an existing app.",
       "idea": false
      },
      {
       "title": "A fast default when speed matters",
       "text": "Pick it over larger models when you have many texts or a small server; it is about five times faster than the bigger all-mpnet-base-v2.",
       "idea": false
      },
      {
       "title": "Suggest related articles",
       "text": "Show \"you may also like\" links under a post by finding the posts whose meaning is closest.",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "all-MiniLM-L6-v2 popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "6,182",
       "l": "likes on Hugging Face"
      },
      {
       "n": "163M",
       "l": "downloads, last 30 days"
      },
      {
       "n": "25",
       "l": "Hugging Face trending score"
      }
     ]
    },
    {
     "t": "small",
     "text": "As reported by Hugging Face, checked Nov 26, 2026. Downloads include automated ones; some repositories report none."
    }
   ]
  },
  {
   "id": "run",
   "nav": "Run it",
   "h2": "Where to run all-MiniLM-L6-v2",
   "parts": [
    {
     "t": "h3",
     "text": "Through an API"
    },
    {
     "t": "list",
     "items": [
      "hf-inference (Hugging Face Inference Providers)"
     ]
    }
   ]
  },
  {
   "id": "license",
   "nav": "License",
   "h2": "all-MiniLM-L6-v2 license",
   "parts": [
    {
     "t": "prose",
     "text": "Apache 2.0 lets you use, change and share the model for free, also in paid products and client work. Include a copy of the license when you pass the files on."
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In a paid product",
       "v": "Yes",
       "status": "yes",
       "sub": "Apache 2.0 allows commercial use free of charge.",
       "quote": "language: en license: apache-2.0",
       "src": "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/raw/main/README.md"
      },
      {
       "l": "Ship the weights to users",
       "v": "With conditions",
       "status": "cond",
       "sub": "Give recipients a copy of the Apache 2.0 license and mark any files you changed.",
       "quote": "You must give any other recipients of the Work or Derivative Works a copy of this License",
       "src": "https://www.apache.org/licenses/LICENSE-2.0"
      },
      {
       "l": "Work for clients",
       "v": "Yes",
       "status": "yes",
       "sub": "Apache 2.0 allows use in work for clients; keep the license with any files you hand over.",
       "quote": "each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license",
       "src": "https://www.apache.org/licenses/LICENSE-2.0"
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "all-MiniLM-L6-v2",
       "me": true,
       "facts": [
        "6,182 likes",
        "Apache 2.0"
       ]
      },
      {
       "name": "bge-m3",
       "path": "models/open/baai-bge-m3/",
       "why": "BAAI · sentence-similarity",
       "facts": [
        "4,041 likes",
        "MIT"
       ]
      },
      {
       "name": "embeddinggemma-2",
       "path": "models/open/google-embeddinggemma-2/",
       "why": "google · feature-extraction",
       "facts": [
        "3,507 likes",
        "Apache 2.0"
       ]
      },
      {
       "name": "embeddinggemma-300m",
       "path": "models/open/google-embeddinggemma-300m/",
       "why": "google · sentence-similarity",
       "facts": [
        "2,158 likes",
        "Gemma terms"
       ]
      },
      {
       "name": "paraphrase-multilingual-MiniLM-L12-v2",
       "path": "models/open/sentence-transformers-paraphrase-multilingual-minilm-l12-v2/",
       "why": "sentence-transformers · sentence-similarity",
       "facts": [
        "1,519 likes",
        "Apache 2.0"
       ]
      }
     ],
     "more": "All embeddings and search models",
     "more_path": "models/open/?task=embed"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Add search by meaning with sentence-transformers and sentence-transformers/all-MiniLM-L6-v2, split my texts into short passages, encode them once, store the 384-number vectors, and rank passages by cosine similarity to each query."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Install the library.",
       "code": "pip install -U sentence-transformers",
       "src": "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/raw/main/README.md"
      },
      {
       "text": "Load the model by name and encode a list of sentences.",
       "code": "from sentence_transformers import SentenceTransformer\nmodel = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')\nembeddings = model.encode(sentences)",
       "src": "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/raw/main/README.md"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "Feeding whole documents in one piece.",
       "fix": "Split documents into passages of a few sentences and store a number list for each passage.",
       "why": "Anything past 256 word pieces is dropped without warning."
      },
      {
       "dont": "Taking the raw output of AutoModel as the sentence vector.",
       "fix": "Apply mean pooling over the tokens and normalise, or simply use the sentence-transformers library.",
       "why": "The model card says the pooling step is required without sentence-transformers."
      },
      {
       "dont": "Using it to search Russian, Chinese or mixed-language texts.",
       "fix": "Use a multilingual model such as BGE-M3 or Qwen3-Embedding-0.6B for non-English text.",
       "why": "The model card lists English only, while those models cover more than 100 languages."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "How many numbers does it produce per text?",
       "a": "384 for each sentence or paragraph.",
       "evidence": {
        "url": "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/raw/main/README.md",
        "quote": "It maps sentences & paragraphs to a 384 dimensional dense vector space"
       }
      },
      {
       "q": "How long can a text be?",
       "a": "Up to 256 word pieces; longer text is cut off.",
       "evidence": {
        "url": "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/raw/main/README.md",
        "quote": "By default, input text longer than 256 word pieces is truncated."
       }
      },
      {
       "q": "Can I use it in a paid product?",
       "a": "Yes. It is released under Apache 2.0.",
       "evidence": {
        "url": "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/raw/main/README.md",
        "quote": "language: en license: apache-2.0"
       }
      },
      {
       "q": "Is there a better-quality model from the same project?",
       "a": "all-mpnet-base-v2 gives the best quality of the general models; all-MiniLM-L6-v2 is about five times faster.",
       "evidence": {
        "url": "https://www.sbert.net/docs/sentence_transformer/pretrained_models.html",
        "quote": "The sentence-transformers/all-mpnet-base-v2 model provides the best quality, while sentence-transformers/all-MiniLM-L6-v2 is 5 times faster and still offers good quality."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Maker",
   "Sentence Transformers"
  ],
  [
   "Task",
   "Embeddings and search"
  ],
  [
   "Pipeline",
   "sentence-similarity"
  ],
  [
   "On Hugging Face since",
   "Mar 2, 2022"
  ],
  [
   "License",
   "Apache 2.0"
  ],
  [
   "Hugging Face",
   "sentence-transformers/all-MiniLM-L6-v2"
  ]
 ],
 "good": [
  "It is an English model; for other languages pick a multilingual model.",
  "Text longer than 256 word pieces is cut off, so long pages lose their end.",
  "It was trained on texts up to 128 tokens, and is meant for sentences and short paragraphs."
 ],
 "checked_line": "Hand-checked from 5 official pages on Nov 23, 2026; numbers refresh daily.",
 "logo": null
}