All MiniLM L6 v2

ALL_MINILM_L6_V2

Fast, compact English sentence embeddings for semantic search, clustering and finding duplicate texts.

Embeddingsembeddingsenglishsearchfastapache-2.0Fine-tunable
All MiniLM L6 v2: Embeddings model on Kainguru

About All MiniLM L6 v2

Capabilities

  • Fast — a 22M-parameter model that embeds large batches quickly
  • 384-dimensional vectors — small indexes, and the same vectors as the many indexes already built with it
  • Semantic similarity — sentences that mean the same land close together

Good to know

  • English only.
  • Texts longer than 256 word pieces are truncated; it works best on sentences and short paragraphs.

All MiniLM L6 v2 inputs and output

NameTypeRequiredDefaultDetails
textstextYes—One text, or a JSON array of up to 64 texts (fewer for models with large vectors: at most 65,536 numbers per response).
1–200130 characters
modetextNopassagequery for search queries, passage for the documents being searched (adds the model's prefixes where it has them).
Allowed: query, passage
normalizebooleanNotrueReturn unit-length vectors, ready for cosine similarity.

Output. JSON: {"embeddings": [[...], ...], "dimensions": n}.

Run All MiniLM L6 v2 with the API

Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.

cURL
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=ALL_MINILM_L6_V2" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "texts": "example",
    "mode": "passage",
    "normalize": true
  },
  "outputFormat": "json"
}'

# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
  -H "X-API-Key: kg_your_api_key"
Python
from kainguru import KainguruClient

with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
    submitted = client.executions.execute(
        "ALL_MINILM_L6_V2",
        {
          "texts": "example",
          "mode": "passage",
          "normalize": True
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Fine-tune All MiniLM L6 v2

You can fine-tune All MiniLM L6 v2 on your own data and run the tuned model through the same API. Dataset: Up to 10 JSONL files, 256 MiB in total, one {"anchor": "...", "positive": "..."} object per line: a text and one that belongs with it, such as a question and its answer. 8 to 200,000 pairs.

The steps are in the docs.

All MiniLM L6 v2 pricing

Price per request: 0.02185 credits ($0.0002185). The price is shown again before every run; all prices are on the pricing page.

Licence and source

All MPNet Base v2: Embeddings model on Kainguru
Embeddings

All MPNet Base v2

English sentence and paragraph embeddings for semantic search, clustering and finding similar texts.

Fine-tunable
MS MARCO MiniLM L6 v2: Embeddings model on Kainguru
Embeddings

MS MARCO MiniLM L6 v2

Small, fast English reranker that scores how well each of up to 100 passages answers a search query.

Fine-tunable
Nomic Embed Text v1: Embeddings model on Kainguru
Embeddings

Nomic Embed Text v1

English text embeddings for search, clustering and classification, for texts up to 8,192 tokens long.

Fine-tunable
Snowflake Arctic Embed L: Embeddings model on Kainguru
Embeddings

Snowflake Arctic Embed L

English retrieval embeddings for search and RAG, where search queries find the passages that answer them.

Fine-tunable
BGE Small EN v1.5: Embeddings model on Kainguru
Embeddings

BGE Small EN v1.5

Small English embeddings for retrieval, where short search queries find the passages that answer them.

Fine-tunable