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.0.tar.gz (350.9 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.0-cp313-cp313-manylinux_2_39_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

tachiom-0.3.0-cp313-cp313-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

tachiom-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

tachiom-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

tachiom-0.3.0-cp312-cp312-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

tachiom-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

tachiom-0.3.0-cp311-cp311-manylinux_2_39_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

tachiom-0.3.0-cp311-cp311-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

tachiom-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

tachiom-0.3.0-cp310-cp310-manylinux_2_39_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

tachiom-0.3.0-cp310-cp310-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

tachiom-0.3.0-cp310-cp310-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: tachiom-0.3.0.tar.gz
  • Upload date:
  • Size: 350.9 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.0.tar.gz
Algorithm Hash digest
SHA256 8e7f2b6cf70c9e8f5e34cbe9c111fedecd19fd8397144ba7dedae485325f3574
MD5 968a1e0fed4b19ba41d2c1094c5478c4
BLAKE2b-256 862a0baa63c80532f247a84e6b59c811bea8579227ac3204956ae7cea6c89df7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.0-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 a66f575ddedcd58b29a25820ac5c2acbb5a531522c2b2708c86dc51831c07cd6
MD5 08b1dc023403b7fc78568385bb5f8dec
BLAKE2b-256 5d8e6cdf5715f1bedc42f839e05d633df21e68df134603f8995f235fdd4980fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9eac808fec092d51f5eabd656a9e52042bff7c248127feff37cb1e4bab59442d
MD5 a6836a641819e073d571f3340ca06b29
BLAKE2b-256 efef22137cb173637e1066bdbe22f1eb93154ccff01e8c9b17815f19bc8e0817

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5a744c96d80a50574e686ea25cb8b94f024a0a6b785b43be8c63d313d9da82b4
MD5 9b81164e72602a191779122b11c9bfe1
BLAKE2b-256 9f655ea0410bd620171741b08cb08355cb384b0c0bd18b017af425c1a4f5638f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 65bc52d466dcd6e5bc33a82f3667fbd36890c5bd47fdb8b6a4818b0c79b35086
MD5 234458ce99911a95b42a0a55d4004f78
BLAKE2b-256 4a83795a2695583dfa489c4aa6ea17687fdebb40ffbaf95035a135e519446146

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 116f1e54bc69b3005f9c75a15cdc127ff9f4315bea7354c3797a1604fbc29d53
MD5 b2a7f01e2894d470986c3204f7feb898
BLAKE2b-256 9af621a26de2cd9c5671f38a1e0bddb1dd01e6acf6c0dbf5a1d779658df4830b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2959ca5ceef817a149da61b68c3aff3933d2f3735f9b2488c0b0ab052a4022f0
MD5 284ee66b49506fac1e93d1a742aaf174
BLAKE2b-256 bca93f56c39686922bfc199232c0aa7d41b5be57404b9f1ba1d9a1862138f60e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.0-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 cfe46284ea87b96aa7ff7874b28ba34fea50803c99b0be2337f5237a3c31b4fc
MD5 35e4e2e6ba50dda53b06f088977d8eba
BLAKE2b-256 87117c999c8cc3519dfc72160b4f62a9bfed705b5e8d14f201bb7184a6f3d77c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4696d9447b0f1490a6d4b37d0ee8de505ee40d77c282744cebfd9adb4c63cd91
MD5 9d6650638516012310de4ff263d20a2f
BLAKE2b-256 afc14e2854d88cd11b10fcd51ee37f898812b59348e4e8e7fe69455a5f3b4af0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 41541c970a676bec7e25ba8622e3b02a94770cd6c4d7d277ed2c4aea3adb06a9
MD5 d9c47b2c01b0c9e21a7fa6e4d0e4b981
BLAKE2b-256 845007148f07b628e36f621fd7996fe1a24158221a11a593a613dfc6db16fd3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.0-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 fcdd8f620c2086c9ce8b7989200831f9b1c7e5ce4012b86656712e5a66e62739
MD5 7001c7d2b8864257daa7a87509861f97
BLAKE2b-256 c764caabfe9db954bbe6e69fcf8e65846ef6d0969e2658e3e59c54589d0be85c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 54a1991685419c59c92745214e5de07ea2961d160c61da94c787f80abe150b81
MD5 357af37ba56a149d4fc764daf98a6356
BLAKE2b-256 386201b8ac0babe3d3f2a18f928fa06523e766f627586d74498b622da1e81c1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 702a3313163f2892fb7c4a41de1677a8c460a27fcd644fe670836050d61923b5
MD5 a8897920d5cd3b2495696a877d4cb3ca
BLAKE2b-256 d696305e0d8734534539ba4ff61724cb185ab0471b5f7962e05b8580aa3a78b4

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