Infino 标志

Infino

组织
infino-ai

Embedded retrieval library built on Parquet. Fast, efficient, and scalable.

发布者infino-ai
代码仓库infino
语言Rust
复刻数
19
星标数
81
可用工具
0
传输类型stdio
分类
许可协议Apache-2.0
链接
  • 将工具接入 AI 工作流

    Infino 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 81 个星标和 19 个复刻。

Infino

Ask DeepWiki Crates.io docs.rs CI License: Apache-2.0

Infino is a fast embedded retrieval library: full-text, vector, hybrid, and SQL over one table, stored as ordinary Parquet on local disk or object storage. Simple, scalable, and optimized for cost.

sh
pip install infino              # Python
npm install @infino-ai/infino   # Node.js
cargo add infino                # Rust

or in Cargo.toml:

[dependencies]
infino = "0.5"

Note: infino installs the mimalloc global allocator by default. If you embed infino in a process that already sets a global allocator, turn it off to avoid a second one: infino = { version = "0.5", default-features = false }.

Quickstart

python
import infino
import pyarrow as pa

db = infino.connect("memory://")

schema = pa.schema([
    pa.field("body", pa.large_utf8(), nullable=False),
    pa.field("embedding", pa.list_(pa.float32(), 384), nullable=False),
])
docs = db.create_table(
    "docs", schema,
    infino.IndexSpec().fts("body").vector("embedding", 384, "cosine"),
)

docs.append(rows)   # list of dicts, or an Arrow RecordBatch

# BM25 and vector in one call, fused ranking. `query_vec` is your embedding.
hits = docs.hybrid_search("body", "disk full", "embedding", query_vec, k=10)

Performance

Warm p50, tables on object storage:

1M docs10M docs
Vector top-10 (recall@10 0.992 at 1M)591 µs5 ms
BM25 top-10, including row fetch125 µs2 ms
SQL, metadata → crosstab shapes186 µs – 7.6 ms260 µs – 75 ms

Every battery's full recorded tables — per-shape rows, RSS, cold GET counts, the 1M run these summaries quote — live in benches/README.md.

Vector search latency, log scale, 1M and 10M documents

sh
cargo bench -- supertable vector warm cold

Bare cargo bench runs the 10M tier; the 1M rows (what CI runs) are INFINO_BENCH_SUPERTABLE_DOCS=1000000 prefixed to the same command.

BM25 full-text search latency, log scale, 1M and 10M documents

sh
cargo bench -- supertable fts warm cold

Bare cargo bench runs the 10M tier; the 1M rows (what CI runs) are INFINO_BENCH_SUPERTABLE_DOCS=1000000 prefixed to the same command.

SQL query shape latency, log scale, 1M and 10M rows

sh
cargo bench -- supertable sql warm

Bare cargo bench runs the 10M tier; the 1M rows (what CI runs) are INFINO_BENCH_SUPERTABLE_DOCS=1000000 prefixed to the same command.

Ingest throughput, 1M docs

sh
INFINO_BENCH_SUPERTABLE_DOCS=1000000 cargo bench -- supertable build

One command, all three modalities' ingest cells.

  • Cold first query = file opens + cache fill: 114 ms (1M) and 314 ms (10M) for vector, 16 ms and 275 ms for BM25. Warm and cold sit ~200× apart; the charts use a log scale.
  • 1M: CI — Azure Blob, 4 pinned cores, commit 3aaffb64 (run 33245831329).
  • 10M: same harness at its default scale — 8-vCPU AMD EPYC 9V74 (AVX-512, 62 GiB), Azure Blob, commit 339e621. Compare each scale against its own baseline.

Engine behavior is configured in YAML only; environment variables never override it. The shipped defaults are what the charts measure:

sh
cp src/config/config.yaml infino.yaml    # or $XDG_CONFIG_HOME/infino/config.yaml

The vector: block holds probe depth, rerank codec, and cell counts. The supertable: block holds commit and cache behavior. Leave both alone to reproduce the published charts.

Corpus size is the one bench knob that reads an environment variable, and it takes a plain integer (1000000, not 1M); each chart's own Reproduce fold carries its exact command.

To run against a real dataset instead of the synthetic corpus, pass a corpus= spec. It applies to one selected cell, so name a single tier and modality:

sh
# Hugging Face parquet dataset — downloaded once into corpus-dir, reused after
INFINO_BENCH_SUPERTABLE_DOCS=1000000 \
  cargo bench -- supertable vector \
  corpus=hf:KShivendu/dbpedia-entities-openai-1M corpus-dir=./corpora

# Any local parquet shards (e.g. Cohere embeddings you already hold)
cargo bench -- supertable vector corpus=parquet:/path/to/shards

INFINO_BENCH_SUPERTABLE_DOCS caps how many rows are ingested from the dataset. Recall is graded against brute-force exact ground truth on held-out queries, real corpus or synthetic.

That runs against a local RustFS daemon, an HTTPS S3 stand-in, by default. To match CI:

sh
INFINO_BENCH_SUPERTABLE_DOCS=1000000 \
INFINO_BENCH_STORE=azure \
INFINO_REAL_AZURE_CONTAINER=$CONTAINER \
AZURE_STORAGE_ACCOUNT_NAME=$ACCOUNT \
AZURE_STORAGE_ACCOUNT_KEY=$KEY \
  cargo bench -- supertable vector warm cold

Reading the output: vector is the post-drain default row; BM25 is single_rare under Supertable FTS; the SQL shapes are agg_max_title (metadata), WHERE key = ? (lookup), AVG(rating) GROUP BY category (scan), and COUNT(*) GROUP BY bucket, category (crosstab). Structured results land in target/infino-bench/*.json. Methodology is in benches/README.md.

Against other engines

Vector search p99 vs vector databases, VectorDBBench Cohere 1M

VectorDBBench (Repro)

Quantized vector indexes vs embedded libraries, dbpedia-1536 100K, same queries and ground truth

RetrievalBench(Repro)

Full-text latency relative to Lucene, Search Benchmark the Game

Search Benchmark, the Game (Repro)

SQL vs analytic engines, ClickBench vCPU-seconds per query

ClickBench (Repro)

SQL vs search engines, ClickBench vCPU-seconds per query

ClickBench (Repro)

How it works

Your app queries Infino, which caches in RAM and on disk over Parquet on object storage

Summary

  • One Parquet file per data batch, with the BM25 and vector indexes inside it. DuckDB, pyarrow, and DataFusion open the same file as a normal table (example).
  • The storage target is determined by a connection string: memory://, a local path, or s3://, gs://, Azure.
  • No daemon, no cluster, no lock service is necessary. Infino writes append-only, immutable files so readers pin a snapshot and never block on writers.
  • Tables much larger than RAM work: queries read byte ranges.

The indexes live inside the Parquet file

  • Each write produces one Parquet file with the BM25 and vector indexes embedded in it.
  • Any Parquet reader — DuckDB, pyarrow, DataFusion — opens that file and sees a normal table. Infino opens the same file and also finds its indexes.
  • There is no separate index artifact to build, ship, or keep in sync, and nothing to load at startup.

A query reads byte ranges, not files

  • The indexes are sorted by term and by vector cluster, so a top-10 turns into a short list of byte offsets. On object storage, that is a few HTTP range requests, not a download.
  • One object-store request takes 20–100 ms.
  • Fetched ranges are kept in a local disk cache and memory-mapped. A repeated query makes zero network requests and answers in 125 µs.
  • The cache shrinks under memory pressure and empties on an idle table. Queries refill it.

The text scorer is picked per query

Posting lists store, for each term, how many documents contain it and the best possible score in each block. With that on hand, the engine picks the cheapest correct algorithm for each query:

  • A query mixing a rare word and a common word skips through the common word's list instead of reading it (WAND / Block-Max WAND).
  • A query of comparably common words scores documents in fixed-size windows, dropping words that can no longer reach the top 10 as the threshold rises (MaxScore).
  • Counting matches for a query dominated by one very common word reads a stored count instead of walking the posting list.
  • Very dense queries switch to bitsets. Very sparse ANDs walk the shortest list and probe the others.
  • The switch points were set by benchmark, and every algorithm is tested against a brute-force BM25 implementation. The choice changes speed, never results.

Vector search is a three-stage funnel

  • Vectors are grouped into clusters. A query is compared to the cluster centers first, and only the nearest clusters are read — 62 of 255, for a top-10 on a 1M-row table.
  • Rows in those clusters are scored with 1-bit-per-dimension codes: 192 bytes per 1536-dimension vector, instead of 6 KiB as float32.
  • The best candidates — 155 rows for that same top-10 — are re-scored with 2-byte-per-dimension codes to get the exact order.
  • How many clusters to read and how many rows to re-score are measured per table when the index is built, and measured again when the data changes shape.
  • Measured recall@10 at 1M rows: 0.992, tested against exact brute-force nearest neighbors.
  • Distance kernels are runtime-dispatched: AVX-512, AVX2, a portable 256-bit path, and an int8 VNNI kernel for graph navigation.

Commits swap a manifest

  • A table is a set of immutable files plus a manifest that lists them. A commit writes new files, then replaces the manifest in one atomic step: all of its rows appear, or none.
  • A reader keeps the manifest it opened and finishes on that version. It never waits on a writer and never sees half a commit.
  • No lock service, no leader election.

optimize() fits the index to the data

  • You set one number — target_recall: 0.99. optimize() measures the table and sizes everything else: how many clusters, how many a query reads, how many rows get re-scored.
  • If you select the graph or flat index mode, it is built and its recall is measured. It serves only if it reaches the bar on this data; otherwise the default index keeps serving and nothing changes for the caller.
  • The measurements are redone whenever compaction or a cluster split changes the data.
yaml
# infino.yaml
vector:
  target_recall: 0.99
  search_mode: ivf         # ivf (default) | hnsw_ivf | flat_ivf
python
table.optimize()    # drain, compact, recalibrate, sweep

Every knob, and the measurement behind each default, is documented inline in src/config/config.yaml.

Vector index modes

You can trade memory for latency, depending on your workload.

A million 1536-dimension vectors are 5.7 GiB of RAM as float32. flat_ivf serves them from 841 MiB, all-in.

RAM to serve vector search, 100K and 1M vectors, versus the float32 baseline

sh
printf 'vector:\n  search_mode: flat_ivf\n' > infino.yaml   # or hnsw_ivf; rm for ivf
INFINO_BENCH_SUPERTABLE_DOCS=1000000 \\
  cargo bench -- supertable vector build warm \\
  corpus=hf:KShivendu/dbpedia-entities-openai-1M corpus-dir=./corpora

One run per mode: the config line selects it, optimize() builds it, the battery reports serving RSS and latency.

Vector mode warm p50 at the recall each serves, 100K and 1M vectors

flat_ivf vs ivf warm p50 across table sizes

sh
printf 'vector:\n  search_mode: flat_ivf\n' > infino.yaml   # or hnsw_ivf; rm for ivf
INFINO_BENCH_SUPERTABLE_DOCS=1000000 \\
  cargo bench -- supertable vector build warm \\
  corpus=hf:KShivendu/dbpedia-entities-openai-1M corpus-dir=./corpora

One run per mode: the config line selects it, optimize() builds it, the battery reports serving RSS and latency.

Measured serving figures, each row on its own corpus:

ModeCorpusRAM to serverecall@10warm p50
flat_ivfdbpedia 1M × 1536d841 MiB, pinned0.93820 ms
ivf (default)dbpedia 1M × 1536d3.16 GiB working set, 109 MiB pinned0.9886.2 ms
hnsw_ivfCohere 1M × 768d2.5 GiB, pinned0.9950.59 ms
  • flat_ivf — exhaustive scan over a 4-bit plane; no clusters, no graph, no rerank plane. Fetches nothing to serve, so cold equals warm and the quoted latency is a worst case. Linear in rows: 1.6 ms at 100K, 20 ms at 1M. Recall is codec-set (~0.94) and does not move with scale. Faster than the routed path below ~130K rows (chart above). Cosine only.
  • ivf (default) — the only mode that scales past RAM. The index lives on object storage and pages through the reclaimable cache; pinned memory stays near 100 MiB at any scale.
  • hnsw_ivf — graph walk on an int8 plane, exact re-rank on the final beam. Needs the graph resident, which bounds it to ~10M rows.
  • Every mode falls back to the routed scan when it cannot serve a query; changing the mode can cost recall or latency, never correctness.

SQL

SQL planning and execution is Apache DataFusion. Infino leverages the indexes it maintains for FTS to accelerate SQL queries by pruning bytes it does not need to touch. For example, DataFusion prunes ordered, numeric columns via min/max limits, but Infino uses Bloomfilters, FSTs, bitmaps, and other data structures not usually available in DataFusion. For example, when a WHERE clause hits a column that has a full-text index, Infino looks the value up in that index first and hands DataFusion the matching row numbers, so the scan decodes only those rows instead of the whole column.

The chart is that lookup switched on and off — same query, same files:

SQL latency with and without the index lookup, same query, same files

sh
INFINO_BENCH_SUPERTABLE_DOCS=1000000 cargo bench -- supertable sql warm

The battery emits both arms — the same query through the index lookup and through the plain scan.

  • Equality on an unsorted column, where Parquet min/max stats can't skip anything: 21.9 ms without the index lookup, 1.44 ms with it. COUNT and AVG over the same predicate: ~22.5 ms → ~1.8 ms.
  • Before any of that, per-file min/max, Bloom, and term summaries drop whole files, and an aggregate fully answered by the table's statistics never scans at all.

Hybrid Search

The combination of SQL and search functions makes it simpler to express complex queries. bm25_search, vector_search, hybrid_search, token_match, and exact_match are SQL table-valued functions that let search results compose as ordinary SQL tables.

The ranked result sets are relations so operations like retrieval, filters, joins, and aggregation compose in one statement against one pinned snapshot.

sql
SELECT   _id, title, score
FROM     hybrid_search(                       -- FTS + vector, fused by RRF
           'logs', 'body', 'disk full',       --   the text side
           'embedding', :q, 50                --   the vector side, top 50
         )
WHERE    level = 'error'                      -- pushed-down filter
  AND    ts > now() - interval '24 hours'     -- on the same pass
ORDER BY score DESC                           -- one fused ranking
LIMIT    10;

Follow-up questions can stay in SQL, inline in the same query. Getting from “find disk-full errors” to “which team had them” takes a single query.

sql
SELECT   s.team,
         count(*)      AS hits,
         avg(h.score)  AS relevance
FROM     hybrid_search('logs', 'body', 'disk full', 'embedding', :q, 1000) AS h
JOIN     services s ON s.id = h.service_id
WHERE    h.ts > now() - interval '7 days'
GROUP BY s.team
ORDER BY hits DESC;

Limitations

  • Tables are append-only and time-ordered. Updates are delete plus insert via tombstones, and there are no cross-table transactions. This is not an OLTP store.
  • Writes go through a single writer slot, so there is one writer per table at a time. Readers are unbounded and are never blocked.
  • This is a library with a SQL and Arrow surface. There is no daemon, no REST endpoint, and no cluster to operate.

The crate is 0.x and the API can still move. The public surface is pinned by public-api.txt.

Building an agent?

Infino is a powerful agent data layer. Hybrid search and SQL allow more expressive queries in more compact form, with less token spend on LLMs — for example in code-context, our Claude Code plugin. Use for agent data exhaust, storing corpora for searching, or agent memory. Transcripts, embeddings, and metadata can be stored in one table, recalled by meaning, keyword, or SQL — in memory or over object storage, with no service to run:

  • infino-mcp — give any MCP client (Claude Code, Claude Desktop, Cursor, VS Code) keyword, semantic, hybrid, and SQL retrieval over your tables. Local embedding model, read-only by default, writes behind one flag. npm i @infino-ai/mcp-server, or straight from the MCP Registry.
  • infino-cli — the same tables from your shell: SQL, full-text, and vector search against a path or bucket. Inspect what the agent stored, script the parts that don't need a model.
  • infino-analytics — a reference kit for building analytics products on Infino: visualization and dashboard API, plus Fino, a conversational layer — a complete worked example of an agent over Infino tables.

Documentation

Development

sh
git clone git@github.com:infino-ai/infino.git && cd infino
cargo build
cargo run --example demo
make ci                # gates before a PR
make readme-charts     # regenerate the charts above

MSRV 1.95. Python and Node version on their own SemVer lines (docs/versioning.md). See CONTRIBUTING.md. Licensed Apache-2.0.

将 Infino MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Infino 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 Infino 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Infino MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "infino": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Infino MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Infino MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Infino 帮我完成这项任务吗?
Infino
当然,我看过了。
以下是我使用 Infino 得到的结果。

常见问题

Infino MCP 服务器有什么用途?

Infino 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Infino MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 Infino。

为什么在 TypingMind 中使用 Infino MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 Infino 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Infino MCP 连接到 TypingMind?

Infino 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Infino MCP 在 TypingMind 中提供哪些工具?

Infino 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Infino MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 Infino 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇