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
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

dbernsohn
/
all-MiniLM-L6-v2-onnx

Feature Extraction
Transformers.js
ONNX
sentence-transformers
bert
sentence-similarity
attention
text-embeddings-inference
Model card Files Files and versions
xet
Community

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

  • Libraries
  • Transformers.js

    How to use dbernsohn/all-MiniLM-L6-v2-onnx with Transformers.js:

    // npm i @huggingface/transformers
    import { pipeline } from '@huggingface/transformers';
    
    // Allocate pipeline
    const pipe = await pipeline('feature-extraction', 'dbernsohn/all-MiniLM-L6-v2-onnx');
  • sentence-transformers

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

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("dbernsohn/all-MiniLM-L6-v2-onnx")
    
    sentences = [
        "The weather is lovely today.",
        "It's so sunny outside!",
        "He drove to the stadium."
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [3, 3]
  • Notebooks
  • Google Colab
  • Kaggle
all-MiniLM-L6-v2-onnx
91.3 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 3 commits
dbernsohn's picture
dbernsohn
Add README with usage and reproduction code
65821eb verified 4 months ago
  • onnx
    all-MiniLM-L6-v2 ONNX with attention outputs (from sentence-transformers) for forwardpass.dev 4 months ago
  • .gitattributes
    1.52 kB
    initial commit 4 months ago
  • README.md
    7.12 kB
    Add README with usage and reproduction code 4 months ago
  • config.json
    611 Bytes
    all-MiniLM-L6-v2 ONNX with attention outputs (from sentence-transformers) for forwardpass.dev 4 months ago
  • special_tokens_map.json
    695 Bytes
    all-MiniLM-L6-v2 ONNX with attention outputs (from sentence-transformers) for forwardpass.dev 4 months ago
  • tokenizer.json
    711 kB
    all-MiniLM-L6-v2 ONNX with attention outputs (from sentence-transformers) for forwardpass.dev 4 months ago
  • tokenizer_config.json
    1.46 kB
    all-MiniLM-L6-v2 ONNX with attention outputs (from sentence-transformers) for forwardpass.dev 4 months ago
  • vocab.txt
    232 kB
    all-MiniLM-L6-v2 ONNX with attention outputs (from sentence-transformers) for forwardpass.dev 4 months ago