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.1.tar.gz (350.7 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.1-cp313-cp313-manylinux_2_39_x86_64.whl (878.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

tachiom-0.3.1-cp313-cp313-macosx_11_0_arm64.whl (801.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

tachiom-0.3.1-cp313-cp313-macosx_10_12_x86_64.whl (784.6 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

tachiom-0.3.1-cp312-cp312-manylinux_2_39_x86_64.whl (878.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

tachiom-0.3.1-cp312-cp312-macosx_11_0_arm64.whl (801.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

tachiom-0.3.1-cp312-cp312-macosx_10_12_x86_64.whl (784.6 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

tachiom-0.3.1-cp311-cp311-manylinux_2_39_x86_64.whl (879.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

tachiom-0.3.1-cp311-cp311-macosx_11_0_arm64.whl (802.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

tachiom-0.3.1-cp311-cp311-macosx_10_12_x86_64.whl (786.0 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

tachiom-0.3.1-cp310-cp310-manylinux_2_39_x86_64.whl (879.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

tachiom-0.3.1-cp310-cp310-macosx_11_0_arm64.whl (802.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

tachiom-0.3.1-cp310-cp310-macosx_10_12_x86_64.whl (786.0 kB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: tachiom-0.3.1.tar.gz
  • Upload date:
  • Size: 350.7 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.1.tar.gz
Algorithm Hash digest
SHA256 eac38ce46a22eae9a13010f00a41593e80112009fb12fd5f527906842033dd33
MD5 4eb575d76444e41477af59291a617bc6
BLAKE2b-256 16ec83a80d5488ee9cca208acc1cc713ae7bfc677b77a6a0334cacd684a831c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.1-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 b097065a28e3c9559d03c0aaee40d1e6ae4dab9b68e5a751d3990b6c1586938c
MD5 e6ca19082037d1497f245ba1fc93e604
BLAKE2b-256 2ca05cc9c1da679b67b57eafaf4d956e65ae373203527bd1560b954b4f53bcab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0d9c0cdfa02e1ceed46f9913ac299be688a90324c1f4e54c85a6675a11d01cf7
MD5 d35962436fa561386a019d2b03fcf691
BLAKE2b-256 779815bde4c35ededc99d94379c6efb2bc9c94b4a0dc3907f4921b68a8646e00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c56f8732eb86613d337b96d6416dd974cb27475b5988fc80eecebf7e86379738
MD5 845f35c61092d16822165d60b48ddee9
BLAKE2b-256 6bdeb17b2233b2a00cd3ea3b4556b486b7ea225a0becbe13c0adb0a08b7d6627

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.1-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 2fed6ca6fc5ac4c985d3d0d047480be26f4e7ef7a22b6f11cb3b76cdf659bee2
MD5 4d27a0f11468d811b0a52bcbf5aa397f
BLAKE2b-256 cd5a53dfbbd1cc9f42c3dd2f2bb26c134425c827c269f485e95f20e1e2d4d637

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2fd53cbe6fac74de4f6524a42a0e7c90a926442f4412c066564f54d899e43e34
MD5 e931eb81528f5d64ef6b179f838160bf
BLAKE2b-256 3c24d984e05a21e7940c0e97a407152645e5a76fb5c9b7ff1a74ea0d0f10a64a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1e72195a05ff89d42a3f20ed7beddd05179aae6b28a779181e5e78262f159aab
MD5 549e86e2da927fb37a386cb3c0c99955
BLAKE2b-256 6cb2f4e84462b79f546c05c765dcb288b80c6f32310589844626295aed5655de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.1-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 21be03f12a036d618545629ba20aed3eb6af0df7fc1358743a7170493c0eb9df
MD5 8a20310d31ea7b1aaf0411b81b9d2496
BLAKE2b-256 af9840c214c6ec5a7f484011e251178f8a46477299a8bc74a6d744aa059fb3e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9b28fda7a692ca1f3e07d55b9cd54c3a31e30e0a56b998853bc20441a2bd5cb5
MD5 4b39078c4d12b7607c641506ea3f1395
BLAKE2b-256 ccbd0df8596f5f2003183252bad2b932d5aa7bab3a2e87154429cf1a9a010f3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8737d7901ec06f5165457e9e767a6ccfcb632eff071dfeccbdc847f373d9993a
MD5 28a7667ff0bd3c2956b345103552168b
BLAKE2b-256 312423c3662c75b514b8bb132bc23d895e9244558c4cfa1653628e1f34ce49e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.1-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 e50285f11f9d769eb663e4907e3770825ecfbe6681111070a789174ba06a176e
MD5 93e2c6609924d0d837cbfe92c4fff2eb
BLAKE2b-256 bfcbb2ca35c0d763405b8c9e1f53a614c8916de87d5ab4689ba02b9075725c92

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 82abd6bb8b930af95c92eba5fc93eaa999494f4f563ed475ddb64e8145d17ac4
MD5 47a55a8aa0e3144509ee87aaabc47fc9
BLAKE2b-256 26656409f36c7fc8495ba7729c70a2d589c84de472711cd66890676a733bdf5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ce071ec6714a14c4ef1e44dd8148e58b6ba935af0b136ea9c616dd75c21bd2fb
MD5 e7f8b59cbb4a825ac801a4b1185cbe63
BLAKE2b-256 d77ddb09eec2e634d237f20d9ab0ff3c86a6a7f93b4199564720bd0b7c37699e

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