Skip to content

Latest commit

 

History

History
233 lines (128 loc) · 5.72 KB

embeddings.md

File metadata and controls

233 lines (128 loc) · 5.72 KB

Embeddings

Table of Contents

  1. Embeddings Model Aliases
  2. Embeddings Alias Values

Embeddings Model Aliases

To simplify using LLMInterface.embeddings(), you can use the following embeddings model aliases:

  • default
  • large
  • small

If no model is passed, the system will use the default model for the LLM provider. If you'd prefer to specify your model by size instead of name, pass large or small.

Aliases can simplify working with multiple LLM providers letting you call different providers with the same model names out of the box.

const response = await LLMInterface.embeddings("openai", "Explain the importance of low latency LLMs", { model: "small" });
const geminiResult = await LLMInterface.embeddings("gemini", "Explain the importance of low latency LLMs", { model: "small" });

Changing the aliases is easy:

LLMInterface.setEmeddingsModelAlias("openai", "default", "text-embedding-3-large");

Embeddings Alias Values

ai21

  • This provider does not support model selection. Model names passed will be ignored.

aimlapi

  • default: text-embedding-ada-002
  • large: text-embedding-3-large
  • small: text-embedding-3-small

anyscale

  • default: thenlper/gte-large
  • large: thenlper/gte-large
  • small: BAAI/bge-large-en-v1.5

cloudflareai

  • default: @cf/baai/bge-base-en-v1.5
  • large: @cf/baai/bge-large-en-v1.5
  • small: @cf/baai/bge-small-en-v1.5

cohere

  • default: embed-english-v3.0
  • large: embed-english-v3.0
  • small: embed-english-light-v3.0

deepinfra

  • default: BAAI/bge-base-en-v1.5
  • large: BAAI/bge-large-en-v1.5
  • small: BAAI/bge-base-en-v1.5

  • default: nomic-ai/nomic-embed-text-v1.5
  • large: nomic-ai/nomic-embed-text-v1.5
  • small: nomic-ai/nomic-embed-text-v1.5

  • default: text-embedding-004
  • large: text-embedding-004
  • small: text-embedding-004

  • default: sentence-transformers/all-mpnet-base-v2
  • large: sentence-transformers/sentence-t5-large
  • small: sentence-transformers/all-MiniLM-L6-v2

lamini

  • default: sentence-transformers/all-MiniLM-L6-v2
  • large: sentence-transformers/all-MiniLM-L6-v2
  • small: sentence-transformers/all-MiniLM-L6-v2

  • default: none
  • large: none
  • small: none

mistralai

  • default: mistral-embed
  • large: mistral-embed
  • small: mistral-embed

  • default: all-minilm
  • large: all-minilm
  • small: all-minilm

  • default: text-embedding-ada-002
  • large: text-embedding-3-large
  • small: text-embedding-3-small

togetherai

  • default: bert-base-uncased
  • large: BAAI/bge-large-en-v1.5
  • small: BAAI/bge-base-en-v1.5

  • default: voyage-2
  • large: voyage-large-2
  • small: voyage-2

  • default: ibm/slate-125m-english-rtrvr
  • large: ibm/slate-125m-english-rtrvr
  • small: ibm/slate-30m-english-rtrvr