Open-source inference server and production cluster for all the models your agent needs.
Python bgecolbertdata-pipelinedeep-learningembeddingsinferenceinference-serverinformation-retrievalllmmlmlopsnatural-language-processingnlppythonrerankingretrievalretrieval-augmented-generationsemantic-searchspladevector-search
drop em dashes in example READMEs
Filip Makraduli5c6bb7c9a9b4
diff --git a/examples/regulatory-rag/README.md b/examples/regulatory-rag/README.mdindex d9f50199a..7c2e3dc96 100644--- a/examples/regulatory-rag/README.md+++ b/examples/regulatory-rag/README.md@@ -13,11 +13,11 @@ forward pass. Everything needed to host the advanced stuff lives inDetail per stage:-- **Encode** — `ModernBERT-base` with the `us-regulatory` profile, which hot-loads the `sugiv/modernbert-us-stablecoin-encoder` LoRA weights at request time. Produces a 768-dim domain-adapted embedding.-- **Dense retrieval** — in-memory cosine similarity over the corpus, top-5 kept.-- **Score / Rerank** — `sugiv/stablebridge-pruner-highlighter` cross-encoder, keeps top-3.-- **Extract / Prune** — same Stablebridge model, second primitive. Returns token-level keep/drop probabilities aggregated into `highlight` / `kept` / `pruned` spans.-- **LLM context** — the surviving `highlight` and `kept` spans become the compressed context passed downstream. Averages 74% compression vs. the raw reranked passages.+- **Encode**: `ModernBERT-base` with the `us-regulatory` profile, which hot-loads the `sugiv/modernbert-us-stablecoin-encoder` LoRA weights at request time. Produces a 768-dim domain-adapted embedding.+- **Dense retrieval**: in-memory cosine similarity over the corpus, top-5 kept.+- **Score / Rerank**: `sugiv/stablebridge-pruner-highlighter` cross-encoder, keeps top-3.+- **Extract / Prune**: same Stablebridge model, second primitive. Returns token-level keep/drop probabilities aggregated into `highlight` / `kept` / `pruned` spans.+- **LLM context**: the surviving `highlight` and `kept` spans become the compressed context passed downstream. Averages 74% compression vs. the raw reranked passages.## Why this example existsdiff --git a/examples/sie-hugging-face-mteb-semantic-search/README.md b/examples/sie-hugging-face-mteb-semantic-search/README.mdindex 33550bf88..5d16698bc 100644--- a/examples/sie-hugging-face-mteb-semantic-search/README.md+++ b/examples/sie-hugging-face-mteb-semantic-search/README.md@@ -49,12 +49,12 @@ the mode you want. The sections below walk through both.## Architecture-- **Backend** — Python service in `backend/` (FastAPI + SIE):+- **Backend**: Python service in `backend/` (FastAPI + SIE):- SQLite in `backend/data/sqlite/sie.db` with tables `storage_ids` and `models`.- ChromaDB in `backend/data/chroma/` as the local vector store.- Superlinked Inference Engine (SIE) produces embeddings for short and long descriptions.- OpenRouter generates descriptions from HF metadata + README + MTEB scores.-- **Frontend** — TypeScript + React app in `frontend/` that calls the backend APIs for search, browse, and model details.+- **Frontend**: TypeScript + React app in `frontend/` that calls the backend APIs for search, browse, and model details.```mermaidflowchart LR@@ -244,7 +244,7 @@ npm run devThen open <http://localhost:5173>. For the local demo flow, start with storage id `demo`.-### 3. Check the SIE server — `cli_sie_status.py`+### 3. Check the SIE server: `cli_sie_status.py`Inspects liveness, readiness, loaded embedding models, and worker pools.@@ -256,7 +256,7 @@ python cli_sie_status.py --models # list loaded modelspython cli_sie_status.py --pools # list worker pools```-### 4. Download model metadata — `cli_download.py`+### 4. Download model metadata: `cli_download.py`Selects the top MTEB-benchmarked models (ranked by number of benchmark tasks),fetches their Hugging Face metadata in parallel, and stores everything under@@ -281,7 +281,7 @@ python cli_download.py test01 --dry-runDemo READMEs are bundled locally. Live Hugging Face READMEs are fetched on demandfor downloaded models (see [Operations notes](#operations-notes)).-### 5. Generate descriptions and index — `cli_generate.py`+### 5. Generate descriptions and index: `cli_generate.py`Runs the same pipeline as the web UI *Generate Descriptions* buttons:@@ -314,7 +314,7 @@ python cli_generate.py test01 --reindex-onlypython cli_generate.py test01 --dry-run```-### 6. Rebuild the vector index only — `cli_reindex.py`+### 6. Rebuild the vector index only: `cli_reindex.py`Drops and rebuilds the `models_{storage_id}` Chroma collection from thecurrent SQLite descriptions. Useful if the vector DB is out of sync, or@@ -332,14 +332,14 @@ python cli_reindex.py test01 --batch-size 16Single-page React app (`frontend/src/App.tsx`) with four tabs, in this order:-1. **Search with Reranking** — the recommended entry point. Runs a short-description+1. **Search with Reranking**: the recommended entry point. Runs a short-descriptionkNN, then reranks the candidates by long-description similarity. Calls`POST /api/search/semantic-rerank`.-2. **Simple search** — single-stage semantic search on short descriptions. Calls+2. **Simple search**: single-stage semantic search on short descriptions. Calls`POST /api/search/semantic`.-3. **Download LLM Cards** — triggers `POST /api/models/download` to (re)populate+3. **Download LLM Cards**: triggers `POST /api/models/download` to (re)populatea storage with the top MTEB-benchmarked HF models.-4. **Browse LLM Cards** — filters stored models by `storage_id` and optional+4. **Browse LLM Cards**: filters stored models by `storage_id` and optional`hf_id` substring; each row opens a full detail view with MTEB scores, thelive HF README, and a *Generate descriptions* modal.@@ -382,15 +382,15 @@ A full walk-through of the UI fields and modals lives in| `long_description` | varchar(2048)| ≤ 2048 characters |**Not stored locally:** `readme`, `siblings`, `safetensors`, `spaces`, and the-raw nested MTEB per-subset/per-split JSON — these would blow SQLite past several+raw nested MTEB per-subset/per-split JSON: these would blow SQLite past severalGB across the full catalog.### Chroma collection `models_{storage_id}`Holds **two entries per model**:-- id `"{hf_id}::short"` with `kind="short"` — embedding of `short_description`.-- id `"{hf_id}::long"` with `kind="long"` — embedding of `long_description`.+- id `"{hf_id}::short"` with `kind="short"`: embedding of `short_description`.+- id `"{hf_id}::long"` with `kind="long"`: embedding of `long_description`.Both are produced by the same `SIEEmbeddingFunction`. The `kind` metadata letseach search endpoint filter to the right set.@@ -401,7 +401,7 @@ each search endpoint filter to the right set.Semantic search lets users describe a task in plain language and find theembedding models whose descriptions are closest in meaning. Two endpoints-are available — a single-stage short-description search and a two-stage+are available: a single-stage short-description search and a two-stagererank search.Both share the same request shape:@@ -414,7 +414,7 @@ Both share the same request shape:}```-### `POST /api/search/semantic` — single stage+### `POST /api/search/semantic`: single stageEmbeds the query, kNN-searches the `kind="short"` entries, returns up to`n_results` models sorted by cosine distance.@@ -431,11 +431,11 @@ Response:}```-### `POST /api/search/semantic-rerank` — two stage+### `POST /api/search/semantic-rerank`: two stage-1. **Stage 1 — short kNN:** `collection.query(query_texts=[query], n_results=N, where={"kind": "short"})`+1. **Stage 1: short kNN:** `collection.query(query_texts=[query], n_results=N, where={"kind": "short"})`returns candidate models with their short-distance scores.-2. **Stage 2 — long rerank:** `collection.query(query_texts=[query], n_results=len(candidates), where={"$and": [{"kind": "long"}, {"hf_id": {"$in": candidates}}]})`+2. **Stage 2: long rerank:** `collection.query(query_texts=[query], n_results=len(candidates), where={"$and": [{"kind": "long"}, {"hf_id": {"$in": candidates}}]})`makes Chroma recompute cosine distance against only those candidates' long vectors.3. Results are merged by `hf_id`, sorted by `rerank_distance` ascending;any candidate without a long embedding falls back to `short_distance`@@ -465,7 +465,7 @@ Response:- **Auto:** `POST /api/generate/save` calls `upsert_embedding(storage_id, hf_id, short, long)`after every save, keeping both Chroma entries in sync. Clearing a descriptiondeletes that `kind`'s entry.-- **Bulk (re)build:** `python cli_reindex.py <storage_id>` — see [How to use](#6-rebuild-the-vector-index-only--cli_reindexpy).+- **Bulk (re)build:** `python cli_reindex.py <storage_id>`: see [How to use](#6-rebuild-the-vector-index-only--cli_reindexpy).---@@ -491,7 +491,7 @@ python cli_download.py <storage_id> --overwritesqlite3 data/sqlite/sie.db "VACUUM;"```-SQLite does not shrink on its own after row deletes — the `VACUUM;` step+SQLite does not shrink on its own after row deletes: the `VACUUM;` stepis what actually reclaims disk.### Description generation pipelinediff --git a/examples/taxonomy-classification/README.md b/examples/taxonomy-classification/README.mdindex ed0a45f71..0a8d7ec13 100644--- a/examples/taxonomy-classification/README.md+++ b/examples/taxonomy-classification/README.md@@ -6,7 +6,7 @@ Classify products into a large hierarchical taxonomy using SIE as the unified inTaxonomy classification assigns a category path (e.g. `Electronics > Computers > Laptops`) to a product given its description or image. Real-world taxonomies are large (10K+ categories), hierarchical (up to 8 levels deep), and ambiguous (multiple categories can be valid for the same product).-Google's [Custom Taxonomy Classifier](https://github.com/google-marketing-solutions/custom-taxonomy-classifier) demonstrates a minimal version of this: embed flat category names with a single Vertex AI model, retrieve the nearest neighbor. This project goes further — we systematically evaluate multiple approaches across text, vision, with and without reranking on a hierarchical taxonomy.+Google's [Custom Taxonomy Classifier](https://github.com/google-marketing-solutions/custom-taxonomy-classifier) demonstrates a minimal version of this: embed flat category names with a single Vertex AI model, retrieve the nearest neighbor. This project goes further: we systematically evaluate multiple approaches across text, vision, with and without reranking on a hierarchical taxonomy.## Why SIE@@ -49,11 +49,11 @@ uv run trim-shopify-dataset-to-l3```These scripts generate the following files under `data/`:-- `train-00000-of-00015.parquet` — the raw Shopify train shard downloaded from Hugging Face-- `shopify-taxonomy-categories.txt` — the raw taxonomy categories file from Shopify-- `shopify-products-clean-full-depth.parquet` — cleaned dataset with required fields and valid taxonomy labels-- `shopify-taxonomy-l3.parquet` — taxonomy trimmed to 3 levels-- `shopify-products-experiment-l3.parquet` — final L3 dataset used by the evaluation scripts+- `train-00000-of-00015.parquet`: the raw Shopify train shard downloaded from Hugging Face+- `shopify-taxonomy-categories.txt`: the raw taxonomy categories file from Shopify+- `shopify-products-clean-full-depth.parquet`: cleaned dataset with required fields and valid taxonomy labels+- `shopify-taxonomy-l3.parquet`: taxonomy trimmed to 3 levels+- `shopify-products-experiment-l3.parquet`: final L3 dataset used by the evaluation scriptsTo keep evaluation simple, we trim the taxonomy to 3 levels:- `26` L1 labels@@ -61,8 +61,8 @@ To keep evaluation simple, we trim the taxonomy to 3 levels:- `1,790` total nodesWe report hierarchical F1 (`hF1`) in two settings:-- **strict** — only the single `ground_truth_category` counts as correct-- **lenient** — any label in `potential_product_categories` counts as correct+- **strict**: only the single `ground_truth_category` counts as correct+- **lenient**: any label in `potential_product_categories` counts as correct## Approaches@@ -364,8 +364,8 @@ With SIE, the interesting part was the modeling, not the infrastructure. We coulThere is still a lot of room to push these results further. A few directions we did not cover here:-- **LLM-enriched category names** — generate richer descriptions for taxonomy nodes, then embed those instead of bare category names.-- **Hierarchical cascade** — predict L1 first, then L2 inside the chosen branch, then L3.-- **Fine-tuned embeddings** — train a contrastive model directly on `(product, category)` pairs from the dataset.+- **LLM-enriched category names**: generate richer descriptions for taxonomy nodes, then embed those instead of bare category names.+- **Hierarchical cascade**: predict L1 first, then L2 inside the chosen branch, then L3.+- **Fine-tuned embeddings**: train a contrastive model directly on `(product, category)` pairs from the dataset.If you want to take this further, try improving the current baselines or inventing a new approach entirely. That is the real takeaway: SIE makes it easy to explore the space quickly.