-
-
Notifications
You must be signed in to change notification settings - Fork 341
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
HuggingFaceHub fails with "Error raised by inference API: Cannot override task for LLM models" #772
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
Met the same problem. And I think I'm already get access to this model through "https://huggingface.co/bigcode/starcoder" |
I have the same problem with different models as well (including mistralai/Mistral-7B-Instruct-v0.2 and meta-llama/Meta-Llama-3-8B) |
1 similar comment
I have the same problem with different models as well (including mistralai/Mistral-7B-Instruct-v0.2 and meta-llama/Meta-Llama-3-8B) |
I can solve it by updating the libraries:langchain and huggingface-hub |
according to https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2/discussions/115, changing huggingface_hub.interface_api file on 152 line i replaced api_url as as self.api_url = f"{INFERENCE_ENDPOINT}/models/{repo_id}" But it seems that the length of answer is limitted. I don't know why :( |
Thank you all for reporting this issue! We just merged a PR to fix this. It will be included in the next release, tentatively scheduled for early next week. Note: this PR will not be backported to 1.x as JupyterLab 3 reached end-of-maintenance yesterday. See #761. |
Description
Hugging Face Hub Integration does not work. I can access HF Inference API from curl, but jupyter-ai chat fails with the
ValueError: Error raised by inference API: Cannot override task for LLM models
(see Context section for the full traceback). I've tried different open models: mistralai/Mistral-7B-Instruct-v0.2, bigcode/starcoder2-3b. None of them works.I guess, the reason is that you set
task
argument explicitly, while langchain does not set it. Moreover, Langchain uses InferenceClient instead of deprecated InferenceApi.Anyway, the best solution, in my opinion, is to replace langchain's HuggingFaceHub with HuggingFaceEndpoint, because the first is deprecated in langchain.
Reproduce
Expected behavior
Any answer from the model served on HF Inference API
Context
Traceback From Chat
Troubleshoot Output
Command Line Output
The text was updated successfully, but these errors were encountered: