James Blauvelt
James Blauvelt
Also having this problem with HuggingFaceInstructEmbeddings, trying to pass in model_kwargs to load it onto the gpu. ``` HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl", model_kwargs = {'device': 'cuda:0'}) ``` ``` File "/miniforge3/lib/python3.10/site-packages/langchain/embeddings/huggingface.py", line 102, in...
I found that this was due to the tokenizer not having truncation and max_length set correctly. Once I set it for an appropriate amount I never saw this error again....
@lclfans @nd7141 This is hacked in for now for my use case but I could come up with a PR given a bit of time. I have max_tokens set to...
I'd offer up that the reason it occurs immediately with the --retrieval flag is that the context is then added to the prompt, which probably adds up to more than...