text-embeddings-inference icon indicating copy to clipboard operation
text-embeddings-inference copied to clipboard

Improve documentation about rerankers: which ones are supported?

Open AlexanderFillbrunn opened this issue 8 months ago • 3 comments

System Info

I am currently mostly working with the ghcr.io/huggingface/text-embeddings-inference:cpu-1.2 Docker image on MacOS. Currently, I am only trying to find out which reranker models with a context size larger than 512 tokens are supported by TEI, but apart from the two BAAI ones mentioned in the readme, I haven't been able to run any other reranker models from Huggingface. jinaai/jina-reranker-v1-tiny-en for example does not work:

reranker-1  | Error: The `--pooling` arg is not set and we could not find a pooling configuration (`1_Pooling/config.json`) for this model.
reranker-1  | 
reranker-1  | Caused by:
reranker-1  |     No such file or directory (os error 2)
reranker-1 exited with code 1

Apparently, this is because TEI treats it as an embedding model in this case. According to the readme, BERT models are supported, but the Jina reranker's description says:

JinaBERT itself is a unique variant of the BERT architecture Would that already tell me that it is not supported?

Additionally, the BAAI models are listed with a revision in the readme, but I have found no mention of revisions on the model page on Huggingface. How do I find the correct revision to use?

I would appreciate if documentation could be added how to find out if a model is supported. Additionally, showing a more meaningful error message when a model is not supported would help, if at all possible.

Information

  • [X] Docker
  • [ ] The CLI directly

Tasks

  • [X] An officially supported command
  • [ ] My own modifications

Reproduction

Docker-compose for jinaai/jina-reranker-v1-tiny-en that fails.

services:
  reranker:
    image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.2
    restart: always
    #Works: command: ["--model-id", "BAAI/bge-reranker-base", "--revision", "refs/pr/5"]
    command: ["--model-id", "jinaai/jina-reranker-v1-tiny-en"] #Does not work
    platform: linux/amd64
    ports:
      - 8888:80
    volumes:
      - ${PWD}/reranker-data:/data

Expected behavior

Show a clear error message why the model is not supported. Provide a list with supported models containing more than just the two BAAI/bge-reranker-large and BAAI/bge-reranker-base.

AlexanderFillbrunn avatar Jun 25 '24 10:06 AlexanderFillbrunn