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.4.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.4-cp313-cp313-manylinux_2_39_x86_64.whl (876.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

tachiom-0.3.4-cp313-cp313-macosx_10_12_x86_64.whl (784.4 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

tachiom-0.3.4-cp312-cp312-manylinux_2_39_x86_64.whl (876.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

tachiom-0.3.4-cp312-cp312-macosx_11_0_arm64.whl (801.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

tachiom-0.3.4-cp312-cp312-macosx_10_12_x86_64.whl (784.5 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

tachiom-0.3.4-cp311-cp311-manylinux_2_39_x86_64.whl (877.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

tachiom-0.3.4-cp311-cp311-macosx_11_0_arm64.whl (802.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

tachiom-0.3.4-cp311-cp311-macosx_10_12_x86_64.whl (784.5 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

tachiom-0.3.4-cp310-cp310-manylinux_2_39_x86_64.whl (877.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

tachiom-0.3.4-cp310-cp310-macosx_11_0_arm64.whl (802.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

tachiom-0.3.4-cp310-cp310-macosx_10_12_x86_64.whl (784.3 kB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: tachiom-0.3.4.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.4.tar.gz
Algorithm Hash digest
SHA256 d246c70c8bbeed1b9837abea71d84e7479e5d4eaa3d703cf6b57c49600b33e09
MD5 d84da43e16e7ba3b0cdcf2635aa19667
BLAKE2b-256 ea950cb1d22e9b80e361b9628fc091efb44036f053f0ef0949c47cc707e2269a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.4-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 d1dda426b02f95be8a888efc91aacd7996d1f6a23d0aeb6f60b405c7ebb1ab25
MD5 42bd01bd78db26be3fdc57e0d4fe229a
BLAKE2b-256 1dd66112cf3681afeb8d5dd111a9f49a89a02b7c86c5bf510d2dcc9bde6e802e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bd69080152457a6f88f5af0aa0acd84c522d28aa00c0525d4f1db6d9f1717edf
MD5 9ef08e8a2747575f709560eea25cf560
BLAKE2b-256 9f04d004c6f763898e9b7c498553f7ee5ee8a8134abb2b3a152ee42cd2fac70a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.4-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 17490607ccc4c9961b4e4380ed1b3fd80aa09e8d7eebbf0d2cfe77e6a786ad4b
MD5 5d22d301009b14f363f1fc744d6e4909
BLAKE2b-256 86bf9cf94989872c6d7813d80a1a27a80852c8b823b71cc9c8881d37c75570fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.4-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 22621cafcf5b92473ab043daa9acb009f47b99bbdbb77f9cd40cd5b5a1eff0a3
MD5 7545c02605826bc7215f015f6d66b981
BLAKE2b-256 ed60d359201b6cc30f7844daa4564b44bc4238192c290b7844c48203123d8c98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 893d3608e361e7a49f35021fcb97732bb4ba85505628b8489b77d013c0d01f82
MD5 2cddbc42219da1eb0aed4154e081a5fb
BLAKE2b-256 67e6b4eab101062d94e8790f984e7a5d8e1f186d4b1d09dc8f663c21d45abdc9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.4-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 827bef53b8fbae0896123c2346525fb36ede329c9d0102ae821923a876f0ef9e
MD5 36c062a048201cdd11a7f3646e78af28
BLAKE2b-256 8c6fa50da896a08fc7d688449709f7d55c60fba5c6c0f383abf42f9177749d4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.4-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 96cb371ec512fd8afdbc9a650521705efd23fa38edd7a935f2728b5435053b87
MD5 ef9841449f29da548d1f0b3d8559fd7c
BLAKE2b-256 306ba3a11c2dba0be3932151abfaebd5af7e355d7293686165b5754a84f45ff3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c0e9758e79bf9b605743c45310e37e946761906936ed33a0a9c84bbaed8a2c4
MD5 939c27c8a63e133ca7433416e28a46a7
BLAKE2b-256 8b507270ffe7acfae4ae06614a20da5eb71294446a17e5f2f10dfb6ac7c3dfa7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.4-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a5e712c2738e387e6d5dfa435f5ff832072a4d53841b665ba40057ea2a9199d1
MD5 2dbf82ac4a02d08e94923a2cdfaaf7d3
BLAKE2b-256 15fd7348c57d650b79a679ed7a6b1d4677a67bfe25fa0468b46d022e829acc05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.4-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 94cfd715bd9ef8c50779fabd35f55e693fe4259a11608236671e74b2ee64e67a
MD5 8eef688ca2b82671027684721d01e082
BLAKE2b-256 c3798652fb5c3c545c09ac6b2cd172e33c57b778bed0425f1e9d61715b13bcf4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 babb21d181df3446f710234cd84ee0f7629705b1f77cce5f34c5ca0a943e366f
MD5 e3497eaaef8470887eb17fa879ed4f67
BLAKE2b-256 6795f4ac2496eb83911d9dab5e56710ad1a2e6f3c4d4d2279a74d80b664e4ff4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.3.4-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b5eda62c04c9d96c69f584c8d6e44c7ffe6b97c78e236ca68c806423ade7cd91
MD5 d7b2a270f8d137e578be91aed3e64c02
BLAKE2b-256 d45c2c398224fe509414a59f9f48fdb3677ada35dcd0ce76d2d3f04519b4300d

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