Skip to main content

Overview

Infinity is a high-performance self-hosted embedding server that supports various open-source models.

Quick Start

from praisonaiagents import embedding

result = embedding(
    input="Hello world",
    model="infinity/BAAI/bge-small-en-v1.5",
    api_base="http://localhost:7997"
)
print(f"Dimensions: {len(result.embeddings[0])}")

CLI Usage

praisonai embed "Hello world" --model infinity/BAAI/bge-small-en-v1.5

Setup

  1. Install and run Infinity server:
pip install infinity-emb
infinity_emb --model-name-or-path BAAI/bge-small-en-v1.5
  1. Set environment variable:
export INFINITY_API_BASE="http://localhost:7997"