Skip to content

Commit

Permalink
remove duplicate (#5368)
Browse files Browse the repository at this point in the history
  • Loading branch information
faaany authored Jul 17, 2023
1 parent 8f3fe85 commit 09a1d3c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion haystack/nodes/prompt/invocation_layer/hugging_face.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ def invoke(self, *args, **kwargs):
# 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])
Expand Down

0 comments on commit 09a1d3c

Please sign in to comment.