mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-10-27 07:48:43 +00:00
remove duplicate (#5368)
This commit is contained in:
parent
8f3fe85878
commit
09a1d3c0dc
@ -235,7 +235,6 @@ class HFLocalInvocationLayer(PromptModelInvocationLayer):
|
||||
# Thus only generated text is returned (excluding prompt)
|
||||
if is_text_generation and "return_full_text" not in model_input_kwargs:
|
||||
model_input_kwargs["return_full_text"] = False
|
||||
model_input_kwargs["max_new_tokens"] = self.max_length
|
||||
if stop_words:
|
||||
sw = StopWordsCriteria(tokenizer=self.pipe.tokenizer, stop_words=stop_words, device=self.pipe.device)
|
||||
model_input_kwargs["stopping_criteria"] = StoppingCriteriaList([sw])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user