Overview
Infinity is a high-performance self-hosted embedding server that supports various open-source models.Quick Start
CLI Usage
Setup
- Install and run Infinity server:
- Set environment variable:
Generate embeddings using self-hosted Infinity server
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])}")
praisonai embed "Hello world" --model infinity/BAAI/bge-small-en-v1.5
pip install infinity-emb
infinity_emb --model-name-or-path BAAI/bge-small-en-v1.5
export INFINITY_API_BASE="http://localhost:7997"