Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: NvidiaRanker() doesn't recognize model="nvidia/llama-3.2-nv-rerankqa-1b-v2" #1259

Closed
TheMimikyu opened this issue Dec 23, 2024 · 2 comments · Fixed by #1260
Closed

bug: NvidiaRanker() doesn't recognize model="nvidia/llama-3.2-nv-rerankqa-1b-v2" #1259

TheMimikyu opened this issue Dec 23, 2024 · 2 comments · Fixed by #1260
Labels
bug Something isn't working P2

Comments

@TheMimikyu
Copy link
Contributor

Describe the bug
Originally Described Here

When attempting to access the NvidiaRanker() model with model="nvidia/llama-3.2-nv-rerankqa-1b-v2", it returns ValueError: Model 'nvidia/llama-3.2-nv-rerankqa-1b-v2' is unknown. Please provide an api_url to access it. despite it existing in the Nvidia catalog.
Code:

alternative_ranker = NvidiaRanker(
    model="nvidia/llama-3.2-nv-rerankqa-1b-v2",
    api_key=Secret.from_env_var("NVIDIA_API_KEY")
)

Models nv-rerankqa-mistral-4b-v3 and llama-3.2-nv-rerankqa-1b-v1 are working as expected.

To Reproduce
Colab notebook for recreation.

Describe your environment (please complete the following information):

  • OS: WSL Ubuntu 24.04.1 LTS on Windows 10 x86_64
  • Haystack version: haystack==0.42
  • Integration version: nvidia-haystack==0.1.2
@d-kleine
Copy link
Contributor

d-kleine commented Jan 2, 2025

@julian-risch What do you think about adding the v1/retrieval/.../reranking url to

https://github.com/deepset-ai/haystack-core-integrations/blob/122a27b7885398b717fed01907193d5f658ccb36/integrations/nvidia/src/haystack_integrations/components/rankers/nvidia/ranker.py#L116C1-L116C73

and removing _MODEL_ENDPOINT_MAP, in case more ranking models will stored there?

@d-kleine
Copy link
Contributor

d-kleine commented Jan 3, 2025

I found another missing reranker model: https://build.nvidia.com/nvidia/rerank-qa-mistral-4b

"nv-rerank-qa-mistral-4b:1": "https://ai.api.nvidia.com/v1/retrieval/nvidia/reranking",

As you can see, the paths for the model and the URL are also different

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2
Projects
None yet
3 participants