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.5.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.5-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.5-cp313-cp313-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

tachiom-0.2.5-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.5.tar.gz.

File metadata

  • Download URL: tachiom-0.2.5.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.5.tar.gz
Algorithm Hash digest
SHA256 8e0ddeb39b94c5f4bcd424fc43cad0081a6ed3d0b35026662a085794446caaed
MD5 1f22d69d24afc59ab36d53430ef3bf61
BLAKE2b-256 2b0690be6ae48be888b3fc4a4fc1c4550ae1e4e08a4e8ba78991944550a73443

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.5-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 2239de1508c1db376aec2e8ba8810f03306da5ca60a915506ba408483db90ad0
MD5 56875a6a8dddd13ede92a5a41d57491a
BLAKE2b-256 585a39cadda9f09421a3092081c6fe0a7c6e84a470fa6db59dcb4e1ac2e8f523

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 71d3bbc093f12eb82b7c71258a0fb8a2bb2c19373d6115ef4fb5530df8c6e10d
MD5 7af2637b08f04e55774e8eb98c3cf5ff
BLAKE2b-256 b214586535fe983615ef33344aba94e22b99abe0dd5c572a8af49012689f2986

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.5-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5adc5b29a1ac8ea0dc1f2e1ecd6f7923dfce7882e18a5e1191494ff1ad8ebc23
MD5 3af2a283920b8f2ddde9c3aa0c995bdf
BLAKE2b-256 45da32c149a17cd7132327d786995913b27611c5186d666bf5b5708e355ba253

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.5-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 043efb8832b94a3a60669d12503b3814e65677fd36795323c3a24d21ea5ec333
MD5 a3ba3b92d4839774a2fe8d7fa5c771e5
BLAKE2b-256 bdc5511be5c2685bb9d92711ddfa35cb4d773371a98f28bdde96b64b19dd12cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e3b1cf935c0034cedc20812bfffb5ed91a0a672eacb5a25950bb26f35fbe0f87
MD5 1bb175d8a86614884122c1ddc5d90b87
BLAKE2b-256 ff871258728817b7a98c6308c4032645e9be4c2f75040a092dd74517c33977d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.5-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7933078048750e20edf476a9f53ff908edc155bd2ac6efbc46b6e9bea93f5f28
MD5 8ed35a1a864ec055a079b232683a2833
BLAKE2b-256 4d91c5af874d4cf33c26f46e107891b528d7d5714380476e618a7d70c329fa3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.5-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 84985defe282876ec486660d4b92c7c08662ac47b18f45d911a5f77f3b1ab90c
MD5 d327bd49d23520048b0a88064f0a0df0
BLAKE2b-256 18e395b980f3356e2ff8415e89ed4c5b716296b793141b19721fe719896b7ab3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2895337dd916f04039d59d6dfcf6de4255812282ac9d8fd0c188d376817a42dc
MD5 283ddb2800f892476e612aaa5a436bd5
BLAKE2b-256 008ee78d2508385d88c6726d74fc56aee2bd23d7aa2085d2092f40327371191b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.5-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 18e41964656043ad810c183d8916a3c1fc0c1335cd1f1fed4a66a4e5343d120b
MD5 34d44529d87d05dfa7c8fe2a874b918a
BLAKE2b-256 ee77bc7cdb5fd5d070b98e2c5a4176d24855af930ed5c9e1b44de07f7e0db6a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.5-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 2569afa5a7c163ff96d0fe754af383551d13f04aa7ec72454e5778b4ea7f71eb
MD5 8987ae949ec1516cf099ebe74e5f762f
BLAKE2b-256 29c498d2d45d9f6d9b79fc6b6fff8a2ae1293205fa41f78d30aa15f2b46865e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c007cdc9d8b0cff9a83f6b13a58a74ad5a43e6371cf46c44b677b5806af3c102
MD5 ed1b0810527984dcbb5b252426693c3e
BLAKE2b-256 51682cebc965bf1c27ff54042a935a94f187a70e282b9aaf3a9117358872af1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tachiom-0.2.5-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7f90e6d6e92f1f0afa90f221892dac17a0b532e16cb1d170c1d8fea1d811079e
MD5 e59a66616e12016468d17bab3d4aeb0a
BLAKE2b-256 88ddf8f92a5303bce5e45b08fd66db28b6ed8e98170462b1c9e3dfa3e59d54a7

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