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

unsloth
/
all-MiniLM-L6-v2

Sentence Similarity
sentence-transformers
PyTorch
google-tensorflow TensorFlow
Rust
ONNX
Safetensors
OpenVINO
Transformers
English
bert
feature-extraction
text-embeddings-inference
Model card Files Files and versions
xet
Community

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

  • Libraries
  • sentence-transformers

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

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("unsloth/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]
  • Transformers

    How to use unsloth/all-MiniLM-L6-v2 with Transformers:

    # Load model directly
    from transformers import AutoTokenizer, AutoModel
    
    tokenizer = AutoTokenizer.from_pretrained("unsloth/all-MiniLM-L6-v2")
    model = AutoModel.from_pretrained("unsloth/all-MiniLM-L6-v2")
  • Notebooks
  • Google Colab
  • Kaggle
all-MiniLM-L6-v2 / openvino
114 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 1 commit
danielhanchen's picture
danielhanchen
Upload folder using huggingface_hub
0f79ca3 verified 4 months ago
  • openvino_model.bin

    Pickle imports

    • No problematic imports detected

    What is a pickle import?

    90.3 MB
    xet
    Upload folder using huggingface_hub 4 months ago
  • openvino_model.xml
    211 kB
    Upload folder using huggingface_hub 4 months ago
  • openvino_model_qint8_quantized.bin

    Pickle imports

    • No problematic imports detected

    What is a pickle import?

    22.9 MB
    xet
    Upload folder using huggingface_hub 4 months ago
  • openvino_model_qint8_quantized.xml
    368 kB
    Upload folder using huggingface_hub 4 months ago