CLI Reference#
lit2vec is a Typer application. Every long command name has a short
alias. Global help:
lit2vec --help
lit2vec <command> --help
Commands#
run (alias of pipeline)#
Run the full pipeline: embeddings → FAISS → Annoy → BM25 → PMID export → metadb (→ zip).
lit2vec run -i <input> -o <output> [options]
Option |
Description |
|---|---|
|
Year-wise parquet dir, SQL database file, or litsync corpus dir. (required) |
|
Root directory for the final index bundle. (required) |
|
|
|
Input is a raw litsync corpus; run the prepare step first. |
|
HuggingFace SentenceTransformer model (default |
|
Embedding dimensionality (default |
|
Embedding batch size, split across visible GPUs (default |
|
|
|
Force rebuild of all embeddings. |
|
Force rebuild of FAISS and Annoy indices. |
|
Force rebuild of BM25 indices. |
|
Comma-separated years to rebuild BM25 for (e.g. |
|
Build the monolithic Annoy index (default on). |
|
Number of Annoy trees (default |
|
Default search results, written to |
|
BM25 score threshold, written to |
|
Create |
embed (alias of generate-embeddings)#
Create HDF5 embeddings from SQL or Parquet input.
lit2vec embed -i parquet -d data/yearly -o data/embeddings
faiss (alias of make-faiss-index)#
Build FAISS indices from HDF5 embeddings.
lit2vec faiss -d data/embeddings -o data/faiss
bm25 (alias of make-bm25-index)#
Build BM25 indices for title+abstract and authors.
lit2vec bm25 -d data/yearly -o data/bm25
sql (alias of make-sql-index)#
Build year-wise SQLite metadata databases from Parquet files.
lit2vec sql -d data/yearly -o data/metadata
prep (alias of prepare)#
Convert a litsync JSONL corpus into year-wise Parquet files.
lit2vec prep -i litsync_corpus/ -o data/yearly
verify (alias of proctor)#
Validate a pipeline output directory (optionally including data.zip).
lit2vec verify -o data/indices --expect-zip
Environment variables#
POLARS_SKIP_CPU_CHECK=1Skip Polars CPU feature checks (needed on some older cluster CPUs).
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:TrueReduce CUDA memory fragmentation on long embedding runs.
TQDM_DISABLE=1Set automatically by the CLI; silences dependency progress bars while the Rich UI is active.