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 license

By downloading and using this software, you agree to cite the following paper in any material you produce where it was used to conduct a search or experimentation, whether it be a research paper, dissertation, article, poster, presentation, or documentation. By using this software, you have agreed to the citation license.

Bibliography

This paper has been accepted at SIGIR 2026. The full proceedings entry will be 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.2.6.tar.gz (350.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.2.6-cp313-cp313-manylinux_2_39_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

tachiom-0.2.6-cp312-cp312-manylinux_2_39_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

tachiom-0.2.6-cp311-cp311-manylinux_2_39_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

tachiom-0.2.6-cp310-cp310-manylinux_2_39_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

tachiom-0.2.6-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.2.6.tar.gz.

File metadata

  • Download URL: tachiom-0.2.6.tar.gz
  • Upload date:
  • Size: 350.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.2.6.tar.gz
Algorithm Hash digest
SHA256 32167ee930cd6fd593e61485eeef1b9339355103b48dcf44bc562c02ccfb828d
MD5 bb7c2500cd6c974469ee40fc05353e98
BLAKE2b-256 ebf7f92f5cebf7d2beb0f18b60aa7b11882c8d687aa02f435eff42c7dfd079c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.6-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 00e322a26642a30d54fe886f7624ee5bfd750533332fe6ebef1a2061943d5317
MD5 8167f3487782bbfffb25747a6243c6e5
BLAKE2b-256 75807b9ca755d99f012f7bfb284c4615299dd3d41de20321114a2419863155d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9458c8c1630df241a65d838dcfa132d59dd17d03d575f5ce350549f28c67c01b
MD5 1d2fdc78a0a430e701a1f7a93a98058a
BLAKE2b-256 c4bfb48103566fccd8e7deb5d8c95e37a1b5060e650a224f8cf35f71df0fb81c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.6-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e3785aa98b06744901ac0c6e30b17498d0c754c3e1b3a727b79d65acc51b68a2
MD5 204f7ab8c436599150d74b24bf42936e
BLAKE2b-256 28bcbe2fca27c545ac201b2facbcdbdf8b76397b0d25187fe3c88ca438a9a2ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.6-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 7c9f91fed156bb98f5c349d324e2b0b748fae054d4092c6ff4dbd922585d26c8
MD5 b6695652478ff7807f22107ff1b69b46
BLAKE2b-256 99d3d09650f600b4becddc09d511999546a42b758bb8a1b0fc37c43f7577925a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9fb3a2fc668ce3a546b00174b1571c56bee97cb8bbda2df97aafb061ab0a3fb0
MD5 88673f1b0058e27d13baa8fd460b9fa2
BLAKE2b-256 9b514192ff06e469dfef4820896bfa36b5d159b3a5151fef3edc48182b8ef71f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.6-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b676008af5510fe885c6a51223cdeb2073652d6a936d035cd788aebad8adf95c
MD5 91ebb4f57a62b76e9f261b38039e3ed8
BLAKE2b-256 f8520d8a6e332152538a2e2844039ddd089e488a44d2a82b2e535f4d9034013c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.6-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 6f87f7485f1e89ff6153d5d8b78f001f6888f298b7e41aa3fd12d185af52b3f0
MD5 200e4bb6ff746fafd04fcd0661631698
BLAKE2b-256 c0d0efd7d38bcbed1cbbd86224a72244c1ebed239cf02a6d063f455abb586f52

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3562cd358b8ef9a1f539b7e9783ba7bf49cb3219084bcefa862c18b82419259f
MD5 283513f27b7ff1e9f1ba086019d8f528
BLAKE2b-256 73d7d5c5d088ad3e30c0e381a7293998391456d240451dbf6ead738b657cedda

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.6-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1c534489f21b9cc4c492a864cc6d9b27163faf8d1b0730d2f3d5e2e377c6e9cb
MD5 7fc8b95191ff3d5b684940b4efbac2e3
BLAKE2b-256 33e6196aa2fe36da5091ab6c1faf0bc1fb4a33065e67301292303bc22ec4dbec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.6-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 04bd511fb2e72f154c476374adf7da74678ba354e88d39e431689ef730e88092
MD5 e607322638805c63ea2c99915bdd839d
BLAKE2b-256 9f744db08394df9cb632c9b82280997b44271ee0a26cee8cb0c3171bb77997ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 25cfdd9166b6a3eeadac511fad23fc0b2fee9e2236133eab52d986bd00e7b3f1
MD5 ca8ef2afe7727d0c6cfe4f2b3f4983ab
BLAKE2b-256 140281601a1e47a2d1652b22afd7cf06240de4740c34d4b71c6e0966bd9f2f08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.6-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 50f2a21ba249ba115d4128c4ee787d6697e9904a931be4df05c18aa3ef2ce300
MD5 63d5fb68775d6acc268a8cddc92e1ff3
BLAKE2b-256 854cd9678f90f45f73cb258f093979546a4fd95bd774d70acf0e6cce41b73e13

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