Skip to main content

Helper application for building search indexes with pyserini

Project description

pyserini-indexer

Helper application for building index files that uses pyserini

Prerequisites

  • python 3.9 (pytorch + faiss are only working under this version unfortunaly ☹️ )
  • if you would want to create/search using learnable Sparse indexes (UNICOIL), you would need CUDA support (pyserini requires here CUDA for backend 😞)

Indexing methods:

  • Sparse:
    • BM25 - traditional not-learnable indexing technique
    • UNICOIL - uses LuceneImpact underneath
  • Dense:
    • MINILM_V2 - smallest model available
    • ANCE
    • TCT_COLBERT - biggest (0.5 gb) and provides best results

Backend support

By default all indexing methods use CPU. If you would want to change this behaviour, set environment variable USE_GPU to some value.

Example usage

  1. Create BM25 sparse index directory
python pyserini-indexer BM25 index_input -o tests/indexes/bm25
  1. Create dense index directory
python pyserini-indexer MINILM_V2 index_input -o tests/indexes/minilm_v2

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

pyserini_indexer-0.3.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyserini_indexer-0.3.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file pyserini_indexer-0.3.1.tar.gz.

File metadata

  • Download URL: pyserini_indexer-0.3.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.6.1 CPython/3.10.10

File hashes

Hashes for pyserini_indexer-0.3.1.tar.gz
Algorithm Hash digest
SHA256 34b9c1338739ed85319e1092e79827f8fb323cb03aaf26e388f5b0b93c008f45
MD5 97dc8ef74c7b696c56117a2c16060ff3
BLAKE2b-256 d8639e1b33849a8f2ce71b7d0231c8f1bcb1dcbb0a4d6848926dd58143c13341

See more details on using hashes here.

File details

Details for the file pyserini_indexer-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyserini_indexer-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 27f822541daca0f06199210d4b340e6ee54115807c5e8a9e97fee89535549735
MD5 298b3b07b9eaf8de0f2cac9dfe5fd344
BLAKE2b-256 1f44c3bd93827927538b2bb4b2631423eb375affe79f54b22469ce76e25fc68f

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