Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Fix issue with max length and LLM pipeline, closes #912

davidmezzetti61fa8a3f9941
diff --git a/src/python/txtai/pipeline/llm/huggingface.py b/src/python/txtai/pipeline/llm/huggingface.py
index 09c5f7bf..1f43a648 100644
--- a/src/python/txtai/pipeline/llm/huggingface.py
+++ b/src/python/txtai/pipeline/llm/huggingface.py
@@ -99,7 +99,7 @@ class HFLLM(HFPipeline):
"""
# Set defaults and get underlying model
- defaults, model = {"max_length": maxlength, "num_workers": workers}, self.pipeline.model
+ defaults, model = {"max_length": maxlength, "max_new_tokens": None, "num_workers": workers}, self.pipeline.model
# Set parameters for vision models and return
if self.pipeline.task == "image-text-to-text":