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.

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

To compile all the Rust binaries in src/bin/:

RUSTFLAGS="-C target-cpu=native" cargo build --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",
    total_centroids=2_097_152,
)
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.4.tar.gz (349.4 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.4-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.4-cp313-cp313-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

tachiom-0.2.4-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.4-cp312-cp312-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

tachiom-0.2.4-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.4-cp311-cp311-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

tachiom-0.2.4-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.4-cp310-cp310-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

tachiom-0.2.4-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.4.tar.gz.

File metadata

  • Download URL: tachiom-0.2.4.tar.gz
  • Upload date:
  • Size: 349.4 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.4.tar.gz
Algorithm Hash digest
SHA256 f8417405aae235f1139ac76b41d74e4d72afb262e05250ca935fdfdd32454922
MD5 584bbc9a774cda9aa941accc15128c02
BLAKE2b-256 61921871e041a6aac3753880cb6b363fd63b95d5c3d3c396908fb2577b1452ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.4-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 1b7e0a2ba087c96905bfa4cf8c2ef4c104fd5e03ada162e6cc7378f5b9696c69
MD5 f6d11a414096e1963c490b40f7680e7d
BLAKE2b-256 5d66c4e01c9d81a2648e7009c0ba98cd311529aa3dd63c1dd7c24d6ab8f07590

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 70c998e3ba0cc81dccdc3dceeee85f00553ab03792f80bd6d686483d969e6f7a
MD5 64caf9945c8c64af6f9463d07a39abb3
BLAKE2b-256 c0128cb665fa549032e4e0eb64e7805e7a2154e05972719b734a7eebc77fe336

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.4-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6eebcd3596bc9e918029f244cf69e88ed84929a7a60ca905f63abf811d8337ed
MD5 fca63d21c67c064265dfebffb5dc296e
BLAKE2b-256 1a16568db9b58ae26c99ac3d689b036d256fead50b1e79afab9b2986a8c0554e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.4-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 d0c11a3a1b02f879ab51680ed3ec8f539954cc1076c338c9864cc770b662614a
MD5 ac37978e382e752e254d3f617fb4c677
BLAKE2b-256 f8261afac260e2529f7dbf15ebecc87b13477308d93c0a50459cac71068c54e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4899cac2c1d628f1ac259514bc015539fb40249934539f305de9452057ff714b
MD5 24783cb9aed30587bf395642372878f8
BLAKE2b-256 6525f59c8d1861d1ad22a61033d126ea4c8c70d312422530f722f9187850457f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.4-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 01be3c4307b9d3f6520f7da9d59973550f62060f953294184f7aaa6acb5f2c3f
MD5 1ee5a1ce5a3411319ef48a76ece1bdb5
BLAKE2b-256 739f901dc8251ff2af0bce99165df9c5afdefbbc6d198b8281605b7815273b52

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.4-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 62a8d5fab6de401a8e0448e88de32ab22d43615fe48e157c5a4fd58ad72f4db0
MD5 21b987c8ce7ebfdb3be08f2a5ed6f08c
BLAKE2b-256 c19f5a68f0e9cee6657c705479bd120abdca57937c48fe2270d3e5ac5cc6fa2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 44ee4b422172d98d14fae1311956d576b92c351ba1c22f87cea85ec6c5497d79
MD5 bb58ab53fd1820bc61256c39cc15400b
BLAKE2b-256 a41ad33fe2e6bbfe37dd923a2359cf8e0270d31bbdad1b7202f014368ce36663

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.4-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7f86739a2e5b84271f2d6c965b384dac5b597433b9286128337ca5d548efcc30
MD5 1ca087fa002b43b30bd6523c61df9ee5
BLAKE2b-256 98c1a736b477ec673510ba3979994cb06ac810db505a221bc4c43805d6719e72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.4-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 3f76001a546fbda2269c43955ce8c3c20a13f80a46f05df03a9576ed089a4f6b
MD5 ff4eaecde3182f3af252fef3b54be86a
BLAKE2b-256 272f06b3d1670631e556f8d7e9aeeb9708a3f40d7784c74c8e21f89871b11e3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 32cf875db670e08de77e6972f2240b3cff31bbdfc960d97cdf72ad322e896292
MD5 75aca2c2cb774a3df261eee2861980e2
BLAKE2b-256 5000f463fed9c78cff17d2bc7d8cfdcf647c2fb88a2f01278be6d51b79496ab7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.4-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ce1ce02701299a4b2f684c3bbc3f8b40990f7382a13b940cd7a008b3953abf1a
MD5 6ddabeed138d4a36630052537eb8efcd
BLAKE2b-256 a207304fef1740b3fadbb4f91eee53b5fa9af8d2a6a3e8b2d3623cb0047ea5be

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