Quickstart
Start the Server
Section titled “Start the Server”# Docker (recommended)docker run -p 8080:8080 ghcr.io/superlinked/sie:latest
# Or with GPUdocker run --gpus all -p 8080:8080 ghcr.io/superlinked/sie:latestThe server starts on port 8080 with all models available. Models load on first request.
Install the SDK
Section titled “Install the SDK”pip install sie-sdkpnpm add @sie/sdkGenerate Embeddings
Section titled “Generate Embeddings”from sie_sdk import SIEClientfrom sie_sdk.types import Item
client = SIEClient("http://localhost:8080")
# Single itemresult = client.encode("BAAI/bge-m3", Item(text="Hello world"))print(result["dense"].shape) # (1024,)
# Batchresults = client.encode("BAAI/bge-m3", [ Item(text="First document"), Item(text="Second document"),])print(len(results)) # 2import { SIEClient } from "@sie/sdk";
const client = new SIEClient("http://localhost:8080");
// Single itemconst result = await client.encode("BAAI/bge-m3", { text: "Hello world" });console.log(result.dense?.length); // 1024
// Batchconst results = await client.encode("BAAI/bge-m3", [ { text: "First document" }, { text: "Second document" },]);console.log(results.length); // 2Rerank Search Results
Section titled “Rerank Search Results”query = Item(text="What is machine learning?")items = [ Item(text="Machine learning uses algorithms to learn from data."), Item(text="The weather is sunny today."),]
result = client.score("BAAI/bge-reranker-v2-m3", query, items)
for entry in result["scores"]: print(f"Rank {entry['rank']}: score={entry['score']:.3f}")# Rank 0: score=0.998# Rank 1: score=0.012const query = { text: "What is machine learning?" };const items = [ { text: "Machine learning uses algorithms to learn from data." }, { text: "The weather is sunny today." },];
const result = await client.score("BAAI/bge-reranker-v2-m3", query, items);
for (const entry of result.scores) { console.log(`Rank ${entry.rank}: score=${entry.score.toFixed(3)}`);}// Rank 0: score=0.998// Rank 1: score=0.012Extract Entities
Section titled “Extract Entities”result = client.extract( "urchade/gliner_multi-v2.1", Item(text="Tim Cook is the CEO of Apple."), labels=["person", "organization"])
for entity in result["entities"]: print(f"{entity['label']}: {entity['text']}")# person: Tim Cook# organization: Appleconst result = await client.extract( "urchade/gliner_multi-v2.1", { text: "Tim Cook is the CEO of Apple." }, { labels: ["person", "organization"] });
for (const entity of result.entities ?? []) { console.log(`${entity.label}: ${entity.text}`);}// person: Tim Cook// organization: AppleWhat’s Next
Section titled “What’s Next”- Dense Embeddings - output types, query vs document encoding
- Model Catalog - all 85+ supported models