Spaces:
Sleeping
Sleeping
Commit
·
a832fed
1
Parent(s):
91741b6
debug
Browse files
app.py
CHANGED
@@ -769,7 +769,8 @@ def generate_chat_optimized(
|
|
769 |
repetition_penalty=1.2,
|
770 |
penalize_len_below=50,
|
771 |
device=None,
|
772 |
-
batch_size=1 # Added parameter
|
|
|
773 |
):
|
774 |
if device is None:
|
775 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
@@ -1033,8 +1034,7 @@ def generate_text(prompt, max_new_tokens, top_k, top_p, temperature, repetition_
|
|
1033 |
repetition_penalty=repetition_penalty,
|
1034 |
penalize_len_below=penalize_len_below,
|
1035 |
device=device,
|
1036 |
-
batch_size=1
|
1037 |
-
clean_the_text=True
|
1038 |
)
|
1039 |
|
1040 |
|
|
|
769 |
repetition_penalty=1.2,
|
770 |
penalize_len_below=50,
|
771 |
device=None,
|
772 |
+
batch_size=1, # Added parameter
|
773 |
+
clean_the_text=True
|
774 |
):
|
775 |
if device is None:
|
776 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
1034 |
repetition_penalty=repetition_penalty,
|
1035 |
penalize_len_below=penalize_len_below,
|
1036 |
device=device,
|
1037 |
+
batch_size=1
|
|
|
1038 |
)
|
1039 |
|
1040 |
|