weaviate / reranker-transformers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cross ranker transformers module

The inference container for Weaviate's reranker-transformers module

πŸ“š Documentation

Documentation for this module can be found here.

πŸ“¦ Requirements

  1. Create a new virtual environment
python3 -m venv .venv
source .venv/bin/activate
  1. Install all module and test dependencies
pip3 install -r requirements.txt
pip3 install -r requirements-test.txt
  1. Download the model locally
MODEL_NAME=cross-encoder/ms-marco-MiniLM-L-6-v2 ./download.py
  1. Run the inference server
uvicorn app:app --host 0.0.0.0 --port 8000

πŸ’‘ Testing

For sanity checks that to check that all works properly you can run our smoke tests against your server

python3 smoke_tests.py

🐳 Docker support

In order to build locally a docker image one can run this command in project's root folder

LOCAL_REPO="local-reranker" MODEL_NAME="cross-encoder/ms-marco-MiniLM-L-6-v2" ./cicd/build.sh

In order to test the built docker image run this command in project's root folder

LOCAL_REPO="local-reranker" ./cicd/test.sh

πŸ”— Useful Resources

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 71.8%Language:Shell 23.6%Language:Dockerfile 4.6%