Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

optimum
/
all-MiniLM-L6-v2

Sentence Similarity
sentence-transformers
ONNX
English
feature-extraction
Model card Files Files and versions
xet
Community
2

Instructions to use optimum/all-MiniLM-L6-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use optimum/all-MiniLM-L6-v2 with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("optimum/all-MiniLM-L6-v2")
    
    sentences = [
        "That is a happy person",
        "That is a happy dog",
        "That is a very happy person",
        "Today is a sunny day"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Notebooks
  • Google Colab
  • Kaggle
all-MiniLM-L6-v2
91.8 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 8 commits
philschmid's picture
philschmid
Create README.md
1024484 about 4 years ago
  • .gitattributes
    1.18 kB
    initial commit about 4 years ago
  • README.md
    10.3 kB
    Create README.md about 4 years ago
  • config.json
    632 Bytes
    Upload config.json about 4 years ago
  • model.onnx
    90.9 MB
    xet
    Upload model.onnx with git-lfs about 4 years ago
  • special_tokens_map.json
    112 Bytes
    Upload special_tokens_map.json about 4 years ago
  • tokenizer.json
    712 kB
    Upload tokenizer.json about 4 years ago
  • tokenizer_config.json
    562 Bytes
    Upload tokenizer_config.json about 4 years ago
  • vocab.txt
    232 kB
    Upload vocab.txt about 4 years ago