llama-index postprocessor xinference rerank integration
Project description
LlamaIndex Postprocessor Integration: Xinference Rerank
Xorbits Inference (Xinference) is an open-source platform to streamline the operation and integration of a wide array of AI models.
You can find a list of built-in rerank models in Xinference from its document Rerank Models
To learn more about Xinference in general, visit https://inference.readthedocs.io/en/stable/models/model_abilities/rerank.html
Installation
pip install llama-index-postprocessor-xinference-rerank
Usage
Parameters Description:
model: Model uid not model name, sometimes they may be the same (e.g.,bge-reranker-base).base_url: base url of Xinference (e.g.,http://localhost:9997).top_n: Top n nodes to return from reranker. (default 5).
Nodes Rerank Example
from llama_index.postprocessor.xinference_rerank import XinferenceRerank
xi_model_uid = "xinference model uid"
xi_base_url = "xinference base url"
xi_rerank = XinferenceRerank(
top_n=5,
model=xi_model_uid,
base_url=xi_base_url,
)
def test_rerank_nodes(nodes, query_str):
response = xi_rerank.postprocess_nodes(nodes, query_str)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_postprocessor_xinference_rerank-0.4.0.tar.gz.
File metadata
- Download URL: llama_index_postprocessor_xinference_rerank-0.4.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e9ae689350210fca1634fa60b309e42be3e0cc9145ed69d36fbbf048f224e72
|
|
| MD5 |
798f48ecab5f4dd4907fde34b519e3c1
|
|
| BLAKE2b-256 |
b4203bde833aaa85c3e1eae040b8e02ad3116362e522c2a5e15b16fd4ea6c06b
|
File details
Details for the file llama_index_postprocessor_xinference_rerank-0.4.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_postprocessor_xinference_rerank-0.4.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcfd569bb1f6c2c28574675ddfc492fb87ad8be6d2dbe52d199031423c18005a
|
|
| MD5 |
0bf56f6b26af30ee883edbbe79bbd700
|
|
| BLAKE2b-256 |
5ec8d3a6c82781be111764a50a9bd548863ddc92a8082c538505c66884a6b050
|