Metadata-Version: 2.1
Name: superlinked-server
Version: 1.56.5
Summary: Superlinked server enables fast and scalable vector search and storage
License: Apache-2.0
Author: Superlinked Release
Author-email: release@superlinked.com
Requires-Python: >=3.10.3,<=3.12.3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: asgi-correlation-id (>=4.3.3,<5.0.0)
Requires-Dist: fastapi (>=0.115,<0.117)
Requires-Dist: fastapi-restful (>=0.6.0,<0.7.0)
Requires-Dist: fastparquet (>=2024.11.0,<2025.0.0)
Requires-Dist: fsspec (>=2024.10.0,<2025.0.0)
Requires-Dist: gcsfs (>=2024.10.0,<2025.0.0)
Requires-Dist: inject (>=5.2.0,<6.0.0)
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc (>=1.36.0,<2.0.0)
Requires-Dist: orjson (>=3.11.3,<4.0.0)
Requires-Dist: pandas (>=2.0.3,<3.0.0)
Requires-Dist: pydantic (>=2.6.3,<3.0.0)
Requires-Dist: pydantic-settings (>=2.5.2,<3.0.0)
Requires-Dist: python-json-logger (>=2.0.7,<4.0.0)
Requires-Dist: s3fs (>=2024.10.0,<2025.0.0)
Requires-Dist: sentry-sdk[fastapi] (>=2.24.1,<3.0.0)
Requires-Dist: structlog-sentry (>=2.2.1,<3.0.0)
Requires-Dist: superlinked[mongo,pub-sub,qdrant,redis,storage] (>=37.5.0,<38.0.0)
Requires-Dist: typing-inspect (>=0.9.0,<0.10.0)
Requires-Dist: uvicorn (>=0.32,<0.36)
Description-Content-Type: text/markdown

<!-- HERO block -->
<div align="center">

<!-- Logo (auto dark/light) -->
<picture>
  <source srcset="https://cdn.prod.website-files.com/65dce6831bf9f730421e2915/66ef0317ed8616151ee1d451_superlinked_logo_white.png"
          media="(prefers-color-scheme: dark)">
  <img width="320"
       src="https://cdn.prod.website-files.com/65dce6831bf9f730421e2915/65dce6831bf9f730421e2929_superlinked_logo.svg"
       alt="Superlinked logo">
</picture>

<!-- Primary CTA -->
<p>
  <a href="https://superlinked.com/docs/quickstart/" style="text-decoration:none;display:inline-block">
    <img src="https://img.shields.io/badge/start%20with%20SIE-%E2%86%92-72A1FF?style=for-the-badge&logo=readthedocs&logoColor=white"
         alt="start with SIE" width="200">
  </a>
</p>

<!-- Secondary badges -->
<p style="margin:6px 0;text-decoration:none">
  <a href="https://superlinked.com/docs/" style="text-decoration:none;display:inline-block"><img src="https://img.shields.io/badge/Docs-orange?logo=readthedocs" alt="Docs"></a>
  <a href="https://superlinked.com/docs/quickstart/" style="text-decoration:none;display:inline-block"><img src="https://img.shields.io/badge/Quickstart-SIE-72A1FF" alt="SIE Quickstart"></a>
  <a href="https://superlinked.com/models" style="text-decoration:none;display:inline-block"><img src="https://img.shields.io/badge/Models-85%2B-6C63FF" alt="SIE models"></a>
  <a href="https://pypi.org/project/sie-sdk/" style="text-decoration:none;display:inline-block"><img src="https://img.shields.io/pypi/v/sie-sdk" alt="SIE SDK PyPI"></a>
  <a href="https://github.com/superlinked/sie/stargazers" style="text-decoration:none;display:inline-block"><img src="https://img.shields.io/github/stars/superlinked/sie?style=social" alt="Stars"></a>
  <img src="https://img.shields.io/github/last-commit/superlinked/sie" style="display:inline-block" alt="Last commit">
  <img src="https://img.shields.io/github/license/superlinked/sie" style="display:inline-block" alt="License">
  <img src="https://img.shields.io/badge/legacy%20package-deprecated-red" style="display:inline-block" alt="Legacy package deprecated">
</p>

</div>
<p align="center">
  <em><b>SIE: Superlinked Inference Engine</b> is an open-source inference server for small AI models: embeddings, reranking, and extraction.</em><br>
  <em>It runs on your own infrastructure, from a laptop to a production Kubernetes cluster.</em><br>
  <em>The legacy <code>superlinked-server</code> package is deprecated for new projects. Run SIE Server and use <code>sie-sdk</code> instead.</em>
</p>

# Superlinked Server (Deprecated)

> **Deprecated for new projects**
>
> The `superlinked-server` package is deprecated for new projects.
>
> This package was part of the legacy Superlinked Python framework stack. It is not the current Superlinked server product.
>
> Superlinked now focuses on **SIE: Superlinked Inference Engine**, an open-source inference server for small AI models. SIE runs encoders, rerankers, and entity extractors on your own infrastructure, from a laptop to a production Kubernetes cluster.
>
> New projects should run SIE Server and use the SIE SDK instead:
>
> ```bash
> docker run -p 8080:8080 \
>   -v sie-hf-cache:/app/.cache/huggingface \
>   ghcr.io/superlinked/sie-server:latest-cpu-default
>
> pip install sie-sdk
> ```
>
> SIE GitHub: https://github.com/superlinked/sie  
> SIE docs: https://superlinked.com/docs  
> Superlinked website: https://superlinked.com

## Use SIE Server for new projects

SIE Server is the current Superlinked inference server for semantic search, retrieval, RAG, reranking, and information extraction workloads. It exposes one HTTP API around three primitives:

- `encode` converts text or images to vectors for semantic search and RAG.
- `score` reranks query-document pairs for higher-precision retrieval.
- `extract` pulls entities and structured data from unstructured text.

Use SIE Server when you need to:

- Serve 85+ supported models from one API.
- Serve dense, sparse, multi-vector, and vision embedding models.
- Serve reranking models for higher-quality relevance ranking.
- Serve extraction models for entity extraction and structured information extraction.
- Run inference locally with Docker.
- Deploy a production inference service on Kubernetes.
- Connect applications through the SIE Python SDK, TypeScript SDK, or HTTP API.

The legacy `superlinked-server` package is not a drop-in replacement for SIE Server. For new applications and new infrastructure, use SIE.

## Quickstart with SIE

SIE runs as a Docker container. Your application calls it over HTTP. Start the server, install the SDK, then call `encode`, `score`, or `extract`.

SIE's primary target is x86 Linux nodes with NVIDIA GPUs. The CPU image is useful for trying SIE locally.

**1. Run the engine**

```bash
# macOS (Apple Silicon)
docker run --platform linux/amd64 -p 8080:8080 \
  -v sie-hf-cache:/app/.cache/huggingface \
  ghcr.io/superlinked/sie-server:latest-cpu-default

# Linux (CPU)
docker run -p 8080:8080 \
  -v sie-hf-cache:/app/.cache/huggingface \
  ghcr.io/superlinked/sie-server:latest-cpu-default

# Linux (NVIDIA GPU)
docker run --gpus all -p 8080:8080 \
  -v sie-hf-cache:/app/.cache/huggingface \
  ghcr.io/superlinked/sie-server:latest-cuda12-default
```

The server starts on port `8080`. Models are available through the API and load on first request.

Optional readiness check:

```bash
curl http://localhost:8080/readyz
# "ok"
```

**2. Install the SDK**

```bash
pip install sie-sdk           # Python
pnpm add @superlinked/sie-sdk # TypeScript
```

**3. Generate embeddings**

```python
from sie_sdk import SIEClient
from sie_sdk.types import Item

client = SIEClient("http://localhost:8080")

result = client.encode("BAAI/bge-m3", Item(text="Hello world"))
print(result["dense"].shape)  # (1024,)
```

**4. Rerank search results**

```python
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}")
```

**5. Extract entities**

```python
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']}")
```

## What changed?

The `superlinked-server` package was designed to serve applications built with the deprecated `superlinked` Python framework.

That legacy framework and server stack are now deprecated for new projects.

Superlinked now focuses on SIE: Superlinked Inference Engine. SIE is the current Superlinked server product for unified model inference across embeddings, reranking, and information extraction.

## Should I still use this package?

Use `superlinked-server` only if you are maintaining an existing deployment that already depends on the legacy Superlinked framework stack.

Do not start new projects with this package. For new development, run SIE Server and use the SIE SDK.

## Links

- SIE GitHub: https://github.com/superlinked/sie
- SIE docs: https://superlinked.com/docs
- SIE quickstart: https://superlinked.com/docs/quickstart
- SIE HTTP API reference: https://superlinked.com/docs/reference/api
- SIE models: https://superlinked.com/models
- SIE examples: https://superlinked.com/docs/examples
- Python SDK on PyPI: https://pypi.org/project/sie-sdk/
- Superlinked website: https://superlinked.com

