all-minilm-22m

PyTorch

2 versions

Embedding models on very large sentence level datasets.

Run this model

  1. Install our magic package manager:

    curl -ssL https://magic.modular.com/ | bash

    Then run the source command that's printed in your terminal.

  2. Install Max Pipelines in order to run this model.

    magic global install max-pipelines
  3. Start a local endpoint for all-minilm/22m:

    max-serve serve --huggingface-repo-id sentence-transformers/all-MiniLM-L6-v1

    The endpoint is ready when you see the URI printed in your terminal:

    Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
  4. Now open another terminal to send a request using curl:

    curl -N http://0.0.0.0:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
        "model": "all-minilm/22m",
        "stream": true,
        "messages": [
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "Who won the World Series in 2020?"}
        ]
    }' | grep -o '"content":"[^"]*"' | sed 's/"content":"//g' | sed 's/"//g' | tr -d '
    ' | sed 's/\n/
    /g'
  5. 🎉 Hooray! You’re running Generative AI. Our goal is to make this as easy as possible.

About

The project focuses on training sentence embedding models via self-supervised contrastive learning on large sentence-level datasets. These embedding models enable the transformation of sentences into dense vector representations, which can be used in a variety of natural language processing tasks such as semantic search, clustering, and topic modeling.

References

HuggingFace

Website

DETAILS

MODEL CLASS
PyTorch

MODULAR GITHUB

Modular

CREATED BY

sentence-transformers

MODEL

sentence-transformers/all-MiniLM-L6-v1

TAGS

arxiv:1704.05179
arxiv:1810.09305
arxiv:1904.06472
arxiv:2102.07033
arxiv:2104.08727
autotrain_compatible
bert
en
endpoints_compatible
feature-extraction
license:apache-2.0
onnx
openvino
pytorch
region:us
safetensors
sentence-similarity
sentence-transformers
text-embeddings-inference
transformers

@ Copyright - Modular Inc - 2024