Skip to main content

State-of-the-art index for late-interaction multivector retrieval

Project description

TACHIOM

TACHIOM is a fast and scalable data structure for late-interaction multi-vector retrieval, written in Rust with Python bindings. It introduces Token-Aware Clustering (TAC), which distributes the coarse-centroid budget proportionally across token types, and a hierarchical Product Quantization scheme for efficient candidate reranking.

Installation

Python

Quick start (prebuilt wheels)

For most users, this is the easiest option:

pip install tachiom

If a compatible wheel exists for your platform, pip will download and install it directly without compilation. If no compatible wheel exists, pip will automatically compile from source.

This installs the core library with its only required dependency (numpy). If you also need the benchmarking / experiment scripts (scripts/run_experiments.py, analysis notebooks), install the optional extras:

pip install tachiom[scripts]

Building from source (maximum performance)

For maximum performance optimized to your CPU, build from source.

Shared prerequisites — both approaches below require Rust nightly:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup install nightly
rustup default nightly

Approach 1 — compile from PyPI source:

RUSTFLAGS="-C target-cpu=native" pip install --no-binary :all: tachiom

Approach 2 — build from GitHub (development/editable mode):

git clone https://github.com/TusKANNy/tachiom.git
cd tachiom

Create a virtual environment (recommended):

python3 -m venv ./venv
source ./venv/bin/activate  # On Windows: venv\Scripts\activate

Or with conda:

conda create -n tachiom python=3.11
conda activate tachiom

Install maturin and build:

pip install maturin
RUSTFLAGS="-C target-cpu=native" maturin develop --release

Changes to Python code take effect immediately without reinstalling — ideal for development.

Rust

The crate has two feature flags:

Feature What it enables
python PyO3 bindings — used automatically by maturin
cli CLI binaries in src/bin/ (tachiom_build, tachiom_search, bench_tac, …)

Neither feature is active by default, so a plain cargo build --release compiles only the library crate. To build the CLI binaries, enable the cli feature:

RUSTFLAGS="-C target-cpu=native" cargo build --release --features cli

The resulting binaries are placed in target/release/.

Details on how to use Tachiom's Rust CLI can be found in docs/RustUsage.md.

Quick start

import tachiom

# ── Build ─────────────────────────────────────────────────────────────────────
# Inputs (all .npy files):
#   vectors.npy    — [N, dim]   f16  one row per token
#   token_ids.npy  — [N]        i64  vocabulary id of each token
#   doclens.npy    — [n_docs]   i32  number of tokens per document

index = tachiom.Tachiom.build(
    "vectors.npy",
    "token_ids.npy",
    "doclens.npy",
)
index.save("my_index.bin")

# ── Load & search ─────────────────────────────────────────────────────────────
index = tachiom.Tachiom.load("my_index.bin")

# queries: [n_queries, n_tokens, dim] f32 array
scores, doc_ids = index.batch_search(queries, k=10, num_threads=0)
# scores, doc_ids: [n_queries, k]

See docs/PythonUsage.md for the full API, all build and search parameters, and the two-step TAC workflow.

Datasets

Pre-processed datasets and pre-built indexes are available on HuggingFace, ready to use with the experiment configs in experiments/sigir2026/.

Dataset HuggingFace Index
MS MARCO-v1 (ColBERT v2) tuskanny/ms_marco_colbertv2 tachiom_msmarco_4M_normalized
LoTTE Pooled (ColBERT v2) tuskanny/lotte_pooled_colbertv2 tachiom_lotte_2M_normalized

Each dataset contains documents.npy, token_ids.npy, doclens.npy, queries.npy, doc_ids.npy, queries_ids.npy, a qrels .tsv file, and a pre-built Tachiom index. Download with:

pip install huggingface_hub
huggingface-cli download tuskanny/ms_marco_colbertv2 --repo-type dataset --local-dir ./ms_marco
huggingface-cli download tuskanny/lotte_pooled_colbertv2 --repo-type dataset --local-dir ./lotte

Resources

Document Description
Python API Tachiom and Tac classes, all parameters, search guide
Rust CLI bench_tac, tachiom_build, tachiom_search binaries, experiment runner, SIGIR 2026 reproduction
Jupyter notebooks End-to-end demo on TAC and TACHIOM
Experiments TOML configs used for the SIGIR 2026 benchmarks

License

This software is released under the MIT License (see LICENSE).

Citation

If you use this software in your research, please cite our paper (accepted at SIGIR 2026, full proceedings entry available after the conference):

@misc{martinico2026efficientmultivectorretrievaltokenaware,
      title={Efficient Multivector Retrieval with Token-Aware Clustering and Hierarchical Indexing}, 
      author={Silvio Martinico and Franco Maria Nardini and Cosimo Rulli and Rossano Venturini},
      year={2026},
      eprint={2604.28142},
      archivePrefix={arXiv},
      primaryClass={cs.IR},
      url={https://arxiv.org/abs/2604.28142}, 
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tachiom-0.3.3.tar.gz (351.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tachiom-0.3.3-cp313-cp313-manylinux_2_39_x86_64.whl (875.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

tachiom-0.3.3-cp313-cp313-macosx_11_0_arm64.whl (801.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

tachiom-0.3.3-cp313-cp313-macosx_10_12_x86_64.whl (783.4 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

tachiom-0.3.3-cp312-cp312-manylinux_2_39_x86_64.whl (875.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

tachiom-0.3.3-cp312-cp312-macosx_11_0_arm64.whl (801.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

tachiom-0.3.3-cp312-cp312-macosx_10_12_x86_64.whl (783.5 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

tachiom-0.3.3-cp311-cp311-manylinux_2_39_x86_64.whl (876.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

tachiom-0.3.3-cp311-cp311-macosx_11_0_arm64.whl (802.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

tachiom-0.3.3-cp311-cp311-macosx_10_12_x86_64.whl (783.7 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

tachiom-0.3.3-cp310-cp310-manylinux_2_39_x86_64.whl (876.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

tachiom-0.3.3-cp310-cp310-macosx_11_0_arm64.whl (802.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

tachiom-0.3.3-cp310-cp310-macosx_10_12_x86_64.whl (783.6 kB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file tachiom-0.3.3.tar.gz.

File metadata

  • Download URL: tachiom-0.3.3.tar.gz
  • Upload date:
  • Size: 351.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tachiom-0.3.3.tar.gz
Algorithm Hash digest
SHA256 a6a1878b75daf7ae02cae82f158bf5c5aef333b98f95a5aea6dfb8056c24a352
MD5 ecd4ae7005ee35cfff6e00bf7b0b89b7
BLAKE2b-256 61e7a8104241d103c240419f31a8a81134c2fe904c1e0ccdf6cc0a849676052d

See more details on using hashes here.

File details

Details for the file tachiom-0.3.3-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for tachiom-0.3.3-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 c4c0a2fe10eeb2f3dfe3b6ba35c9a871bb8b9cb34edc31c03f3b6cc221687072
MD5 e73491581709485b9832083dc6c0495a
BLAKE2b-256 840667a9a9d2bc7cf1584f599f9c2eea8aaedeb3a83a717233bb3e69bdbc615a

See more details on using hashes here.

File details

Details for the file tachiom-0.3.3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tachiom-0.3.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d57cccd37a5e7ea28f9e4fa389354987b0bd81a965366bc1af3b10589fed0826
MD5 287c210d4db85829599e6c065e6bfe5f
BLAKE2b-256 27a2092ae2b6807505106056513f134f313e467dddbb1bfbbc0ddbc602a99dc4

See more details on using hashes here.

File details

Details for the file tachiom-0.3.3-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tachiom-0.3.3-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 70b69e70094286a863a489ebfbecee6cad851abdbc42df5485c9528dce82e681
MD5 1858818b182e0c530e3d5c01e8287529
BLAKE2b-256 3107c94f0d9e71dac253d723dfe0420fccd8e4b41a9231bf5633cca4881bd877

See more details on using hashes here.

File details

Details for the file tachiom-0.3.3-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for tachiom-0.3.3-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 73be5f1f8f6ee0a62680acdc370b4db8c65b9f4ebf86d6417d2c3b608d1af12e
MD5 1c1c3bffea4f6a2550ec1ebe8a7b7ccd
BLAKE2b-256 853f3065da748e0f62921f2237a4569f96fe6c31977691af4b447cf08b8a1492

See more details on using hashes here.

File details

Details for the file tachiom-0.3.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tachiom-0.3.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4ebfc3402c5be774f2b52add8f3ef07ad6c46038d4695b501d3720ad86664c2c
MD5 32b99e6c6f08dc9d3395c720d2acbd76
BLAKE2b-256 cf7a1cedb074a53af7cdd3580035e57ca8df30789428504bc5be7eec63447139

See more details on using hashes here.

File details

Details for the file tachiom-0.3.3-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tachiom-0.3.3-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 203de4bd17bcfec9665e625fa2b365318a4bf39c3820a30ab1d8e8c8da1a04d7
MD5 494e79e35169b5829b1b6dbec0e02d25
BLAKE2b-256 fa3a9fa6dfa47f7a55f6fae384055e58e6485476a9b461eee8184a6605c15a24

See more details on using hashes here.

File details

Details for the file tachiom-0.3.3-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for tachiom-0.3.3-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 0ebf916a7efc5ce8b9bf8d56e48274ddfdcc0789416dd23091ff844991764aaa
MD5 72e567a93bde60817424c74cd06fa5d8
BLAKE2b-256 9884418aa6a5a80c7012fa352bedea3256ad2b16a204cf75f76a83b213220c61

See more details on using hashes here.

File details

Details for the file tachiom-0.3.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tachiom-0.3.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b07af4729ab0614b8d66d2f921178905636aadb2bd54b2d268674c3bdb8741b8
MD5 29f60d1d818a77455565c7383da3354d
BLAKE2b-256 50fea559c00dfc3ea88bf341b7eeedea91353df773c6e7465d4abc385291836c

See more details on using hashes here.

File details

Details for the file tachiom-0.3.3-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tachiom-0.3.3-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 02aded01a2cb252c39bbf6802874631cd101ba9bbf580eff60b121813a1832c2
MD5 af0bb42dfc48d79edd875d250ba2e0e8
BLAKE2b-256 139fa919489c0e6571b0518f596b60a7a507492823997d1fb50377603b1112fa

See more details on using hashes here.

File details

Details for the file tachiom-0.3.3-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for tachiom-0.3.3-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 7bc5418aeddec4e7ea9b349af5280655c21afd697a0e8509f695cdddf9e7f792
MD5 6c9bd50a4a4faa89c7df72647c39db55
BLAKE2b-256 a03ee4876fbe1ef2b34cac1cbfc7d5c7ed7ed0882c168881f261b34d4e6b3cfc

See more details on using hashes here.

File details

Details for the file tachiom-0.3.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tachiom-0.3.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 81f0607b393a32861ed3dd15624fb92c6655a965067eaa2a8f3cf48072eee783
MD5 ae4f6ed7f3c352408e2f4d4687fd8f43
BLAKE2b-256 6d334c1e8133f524132fda2b50abaff2a44d966a8898654e279f3eab2d2dc156

See more details on using hashes here.

File details

Details for the file tachiom-0.3.3-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tachiom-0.3.3-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8700b66af01f9cf713506414872532f4c519adf9fe6a368bed0e027f2eef16ac
MD5 342c5ba12d280c3877de95b547411397
BLAKE2b-256 98b51bc348e5fd0139d655bed44f03de44fda662ed6bf448efa6f81777c0150d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page