Spaces:
Sleeping
Sleeping
Update chatbot_rag.py
Browse files- chatbot_rag.py +2 -2
chatbot_rag.py
CHANGED
|
@@ -52,8 +52,8 @@ def build_qa():
|
|
| 52 |
"text-generation",
|
| 53 |
model=model,
|
| 54 |
tokenizer=tokenizer,
|
| 55 |
-
max_new_tokens=
|
| 56 |
-
temperature=0.
|
| 57 |
do_sample=True, # allow some randomness
|
| 58 |
top_p=0.9, # nucleus sampling to avoid loops
|
| 59 |
repetition_penalty=1.2, # 🚀 penalize repeats
|
|
|
|
| 52 |
"text-generation",
|
| 53 |
model=model,
|
| 54 |
tokenizer=tokenizer,
|
| 55 |
+
max_new_tokens=256,
|
| 56 |
+
temperature=0.2, # keeps answers deterministic but less rigid than 0
|
| 57 |
do_sample=True, # allow some randomness
|
| 58 |
top_p=0.9, # nucleus sampling to avoid loops
|
| 59 |
repetition_penalty=1.2, # 🚀 penalize repeats
|