Update utils.py
Browse files
utils.py
CHANGED
@@ -396,7 +396,7 @@ def llm_chain2(prompt, context):
|
|
396 |
max_new_tokens=1024,
|
397 |
do_sample=True,
|
398 |
temperature=0.9,
|
399 |
-
pad_token_id=
|
400 |
)
|
401 |
#outputs = modell_rag.generate(inputs['input_ids'], max_new_tokens=1024, num_beams=2, early_stopping=True)
|
402 |
answer = tokenizer_rag.decode(outputs[0], skip_special_tokens=True)
|
|
|
396 |
max_new_tokens=1024,
|
397 |
do_sample=True,
|
398 |
temperature=0.9,
|
399 |
+
pad_token_id=tokenizer_rag.eos_token_id
|
400 |
)
|
401 |
#outputs = modell_rag.generate(inputs['input_ids'], max_new_tokens=1024, num_beams=2, early_stopping=True)
|
402 |
answer = tokenizer_rag.decode(outputs[0], skip_special_tokens=True)
|