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.2.tar.gz (351.0 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.2-cp313-cp313-manylinux_2_39_x86_64.whl (878.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

tachiom-0.3.2-cp313-cp313-macosx_10_12_x86_64.whl (785.1 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

tachiom-0.3.2-cp312-cp312-manylinux_2_39_x86_64.whl (879.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

tachiom-0.3.2-cp312-cp312-macosx_11_0_arm64.whl (801.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

tachiom-0.3.2-cp312-cp312-macosx_10_12_x86_64.whl (785.2 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

tachiom-0.3.2-cp311-cp311-manylinux_2_39_x86_64.whl (880.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

tachiom-0.3.2-cp311-cp311-macosx_10_12_x86_64.whl (786.7 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

tachiom-0.3.2-cp310-cp310-manylinux_2_39_x86_64.whl (880.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

tachiom-0.3.2-cp310-cp310-macosx_10_12_x86_64.whl (786.6 kB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: tachiom-0.3.2.tar.gz
  • Upload date:
  • Size: 351.0 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.2.tar.gz
Algorithm Hash digest
SHA256 5f163d65d6beff1987494712b0bf45b21036c49788ed8aaef23092493e1f22d0
MD5 b70e09b664c785c2799d21f86d9ad715
BLAKE2b-256 0954597b878630f9850b361ae07887f7aa0642b6cec3779ebfd9314821b52788

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.2-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 679b215e8cdefa18ffb39c567f056aa7d5909bd929ff50a5121e3d9eda5bc8aa
MD5 9191d0d962e2cf1773227c0dedfd80b6
BLAKE2b-256 1304f776da162dcb688ae8004d0d6c58a653abcd15265a1bb64c60ea52035d26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ddec6e7e1edb9e9f0ced49cf849dbf3424bf8863070cec475cc41f809531c2b2
MD5 d524ea2aecec4796770d014910ea118d
BLAKE2b-256 ef3333e00e60deebc9af05bb6cddadf92369f65543fb269c8dcc9a79ed14a91f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.2-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 622078da96e6157f26b857258872ff7c7b9ee128175a2d8e4a1c88730ee1d2bb
MD5 20ae9a243eebd75d84a42d2fe10b70c2
BLAKE2b-256 7189142012f6757af6f9eb6bc33928da9dd7728fc0201df2c417b32e4b73b105

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.2-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 41e81b9a92ebf5f1f4de6a853b532fa6dcfb03482e186164f9c3ffeca29590de
MD5 9ab2759e67a366b2ce1596bb311b9588
BLAKE2b-256 dbdc99b7d74b2167d9d71f7b4d998e345df2c74402257bd564843bfa55f38078

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 710dac06a510f791bc94bc9b0a841a2df87b49e00fa0a452ad6132ddbac356a1
MD5 d7663877bbf75c00909b5911014ef800
BLAKE2b-256 da385f5109fcdb696e25ba1a89e260fdd546d2b4e85722dd2515cbb7f6a19d8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ba4b17ee3b914c069a8410343f7b55601b59d3b1b4b0cf258eab2f4c2e9718c0
MD5 13bd059376365a4f869ef1104395d7dc
BLAKE2b-256 5214c78f6de759396d2384e4d50d0c78f045a50fa8ef3cd76081eb4553f5e8e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.2-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 1434a1017a35213bb2ad1606ca293617e3cd15f6cc348fec57af8896208d687a
MD5 1fdf815ae1414d9de00eb3b609c77c68
BLAKE2b-256 8d822e75b4b87d8b55bfce29c5fa13eb9edca8ff2e8716d8cddafafb14af4f4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eaf303fd37921f1745e8337c19e62b2103d2ce8ba445dbe3d3d3a14173997b82
MD5 04619c5d741be2822f37f8ee2548b88d
BLAKE2b-256 1119ff1e94198a5bd0d10aaf2eaab4ebcf85d588435bf651365c6ee59f638c3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.2-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 77f6a01a6018b1b17456512c3f9fdac126fade24633ee19305de1a973597cb0f
MD5 2ea3c8ba1587c8e354999fac5c6382a4
BLAKE2b-256 1372a4609496b6aa4771840c705ab936e3e4ee6a8522ed9903b678718915daa7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.2-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 b516f5001b75514cb1a10374c6d85b6f2874aa34c23a541cd681618227f1f8cb
MD5 9ef1d7d8254376f807cba0ee5d73c5d1
BLAKE2b-256 a47ae50b7824007de4d086a93df48baab03a0a1f5783778580caba2d5a1ff3a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 63037cef4e7109dfc41102a3fd8cf206f2a34dfe48e0ab6095fdbeaa1206b497
MD5 dd5745823e4595ad8f8a4035b8f904cd
BLAKE2b-256 80340b9140e7030c753ffb75815ff23abdded3c7a807dc4013565941292de6b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.2-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 600f0c913fefe1aee613dc1089f1c404013bd66e7dd28005a4272cf2161929c2
MD5 5010d0665ccdf5cc50068cb77cdbea02
BLAKE2b-256 ddd1a6f0d38763b7072a7e2d8ade5e8a3b3a158acba1b3a226f57edf567a0449

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