How to use tiiuae/falcon-7b inside PromptNode ? #5100
-
Hi everyone, With the current rising popularity of the falcons model, I figured that I would give them a try for Q/A tasks. I made a very simple example to test it before going to change the actual LFQA pipeline that I have with flan-t5-xl. Please note that the following example works with google/flan-t5-small
And I get the following error: I then tried with :
witch resulted in : Every help would be welcomed into making the declaration of the promptnode work with "falcon-7b" Have a great day |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Please see aws/sagemaker-python-sdk#3905 (comment) The issue is likely related to the |
Beta Was this translation helpful? Give feedback.
-
Thank you for you answer, but unfortunatly it is unrelated to sagemaker as I'm running it locally on my computer and I don't have the sagemaker package. I did not dig too much into the haystack code yet, but I think the problem comes from the way the "trust_remote_code" parameter is handled by the "HFLocalInvocationLayer" class. I could make to following example work with some tricks, it is far from optimal at the moment. The main idea is that I changed the invocation layer to change the pipeline declaration and directly give it the wanted parameter. I also now have the falcon-7B loaded from local and not from HF model hub.
|
Beta Was this translation helpful? Give feedback.
-
Hey @Jofthomas, this issue should be fixed with #4956. This will be released with the next version (v1.18). Till then, what you can do are:
prompt_node = PromptNode(model_name="tiiuae/falcon-7b", api_key=hf_token) A colab nb for details: https://colab.research.google.com/drive/14eCExjX2rzQbaiE3FeLXMQR7WcXDV6aQ?usp=sharing |
Beta Was this translation helpful? Give feedback.
-
Hi @Jofthomas could you please share a sample code that we can take as a reference where falcon - 7b model can be downloaded locally and it can be used with haystack. |
Beta Was this translation helpful? Give feedback.
Hey @Jofthomas, this issue should be fixed with #4956. This will be released with the next version (v1.18). Till then, what you can do are:
or
A colab nb for details: https://colab.research.google.com/drive/14eCExjX2rzQbaiE3FeLXMQR7WcXDV6aQ?usp=sharing