Favicon of ColPali

ColPali

A local document retrieval library that matches text queries to page images without OCR. MIT-licensed Python code supports NVIDIA and Apple Silicon GPUs.

ColPali is a local AI document retrieval library for developers and researchers building document search or retrieval-augmented generation systems. It searches pages as images, using their text, charts and layout together rather than relying on a separate OCR pipeline. The colpali-engine package is deprecated; its maintainers recommend Sentence Transformers for new projects and production use.

The original model combines PaliGemma with ColBERT-style retrieval. It represents different parts of a page separately and compares them with a text query, so visual details can contribute to the match. This approach suits documents where extracting text alone would lose information about the page.

The Python library includes training and inference code for ColPali and related retrievers, including ColQwen2, ColQwen2.5 and ColSmol. Qwen-based models support dynamic image resolution. The code runs with PyTorch and supports NVIDIA CUDA GPUs and Apple Silicon through MPS.

For larger document collections, fast-plaid provides faster matching. Similarity maps show which regions of a page correspond to individual query terms, giving researchers a way to inspect retrieval results. Optional scoring kernels reduce memory use during scoring and training on supported GPUs.

The repository's code is open source under MIT. Model licenses differ: ColPali checkpoints use the Gemma license, while the listed ColQwen2 and ColSmol checkpoints use Apache 2.0. Sentence Transformers supports the model family through MultiVectorEncoder, and colpali-engine remains available for existing projects and research reproduction.

Similar to ColPali