Describe the bug
(generative) private models on huggingface can't be run, since they append use_auth_token to the model kwargs which is not expected.
That means:
- using private models from HF within the Promptnode does not work
- if you configure an auth token and you have a public model, your will be able to initialize, but not run the pipeline (quite an edge case)
Error message
ValueError: The following `model_kwargs` are not used by the model: ['use_auth_token'] (note: typos in the generate arguments will also show up in this list)
Expected behavior
Send token to HF for download but not inject args as model_kwargs
Additional context
Add any other context about the problem here, like document types / preprocessing steps / settings of reader etc.
To Reproduce
from haystack.nodes import PromptNode, PromptTemplate
from haystack import Document
# Works
pn_works = PromptNode(
default_prompt_template=PromptTemplate(prompt="deepset/summarization"),
model_name_or_path="google/flan-t5-base",
)
# retunrs successful
pn_works.run("That works!",documents=[Document(content="asdf")])
# Fails
pn_fails = PromptNode(
default_prompt_template=PromptTemplate(prompt="deepset/summarization"),
model_name_or_path="google/flan-t5-base",
use_auth_token="<any-hf-token>",
)
# retunrs successful
pn_fails.run("Oh no!",documents=[Document(content="asdf")])
FAQ Check
System:
Describe the bug
(generative) private models on huggingface can't be run, since they append
use_auth_tokento the model kwargs which is not expected.That means:
Error message
Expected behavior
Send token to HF for download but not inject args as model_kwargs
Additional context
Add any other context about the problem here, like document types / preprocessing steps / settings of reader etc.
To Reproduce
FAQ Check
System: