# FlashRank

FlashRank is an ultra-lightweight Python library that reranks search results before they are fed to an LLM, using cross-encoder and listwise LLM-based rerankers small enough to run on a CPU with no PyTorch or Transformers dependency.

FlashRank is an ultra-lightweight, fast Python library that adds reranking to an existing search and retrieval pipeline, based on cross-encoders and other reranking models. It needs no PyTorch or Transformers dependency and runs on CPU, with its smallest supported model at about 4 megabytes.

It supports pairwise or pointwise cross-encoder rerankers with a 512-token limit and listwise LLM-based rerankers with an 8,192-token limit, and ships several named models of different sizes and languages, including a multilingual model covering more than 100 languages and a dedicated Arabic reranker. Because deployments such as serverless functions are often billed by memory and time per invocation, the library favors a small package size to keep cold-start times and per-call cost low.

Website: https://github.com/PrithivirajDamodaran/FlashRank
