Skip to main content

LlamaIndex Postprocessor Integration: TEI Rerank

Re-Rankers hosted on Text Embedding Inference Serve by Huggingface.

Install TEI Rerank package with: pip install llama-index-postprocessor-tei-rerank

text-embeddings-inference v0.4.0 added support for CamemBERT, RoBERTa and XLM-RoBERTa Sequence Classification models. Please refer to their repo for any further clarrification : https://github.com/huggingface/text-embeddings-inference

Docker start-up for TEI:

model=BAAI/bge-reranker-large
volume=$PWD/data # share a volume with the Docker container to avoid downloading weights every run

docker run --gpus all -p 8080:80 -v $volume:/data --pull always ghcr.io/huggingface/text-embeddings-inference:1.5 --model-id $model --auto-truncate

Post successful startup of the docker image, the re-ranker can be initialised as follows:

from llama_index.postprocessor.tei_rerank import TextEmbeddingInference as TEIR

query_bundle = QueryBundle(prompt)
retrieved_nodes = retriever.retrieve(query_bundle)

postprocessor = TEIR(
    "BAAI/bge-reranker-large", "http://0.0.0.0/8080"
)  # Name of the model used in the docker server and base url (ip:port)

reranked_nodes = postprocessor.postprocess_nodes(
    nodes=retrieved_nodes, query_bundle=query_bundle
)

Metadata

Release files for llama-index-postprocessor-tei-rerank 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-postprocessor-tei-rerank 0.6.0
File Size Uploaded Provenance Actions
llama_index_postprocessor_tei_rerank-0.6.0.tar.gz 4.4 kB Without provenance Details for llama_index_postprocessor_tei_rerank-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-postprocessor-tei-rerank 0.6.0
File Interpreter ABI Platform Actions
llama_index_postprocessor_tei_rerank-0.6.0-py3-none-any.whl Python 3 none any Details for llama_index_postprocessor_tei_rerank-0.6.0-py3-none-any.whl

Total release size: 9.3 kB

Release files / llama_index_postprocessor_tei_rerank-0.6.0.tar.gz

Download URL llama_index_postprocessor_tei_rerank-0.6.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2d55189e2f96ced77aedaea88158abd9c4f50338de24fd8b1745bd8155d6fd65
BLAKE2b-256 checksum
How to use checksums
79561ca39b455e0b42e363b39b164f3b387c7a5f59b37f882db04629def052a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / llama_index_postprocessor_tei_rerank-0.6.0-py3-none-any.whl

Download URL llama_index_postprocessor_tei_rerank-0.6.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f2a3fe28e508843928953d9350edf66e9498e182c2ffd2882cf595298c8abb5
BLAKE2b-256 checksum
How to use checksums
25c524a416a40c38e0f697d8d2156eccf319c1debd1bb4d2c53ae6b1faf6bd64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for llama-index-postprocessor-tei-rerank 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page