Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Peter
commited on
Commit
•
b9e8529
1
Parent(s):
4aad54f
add max_length and default beams
Browse files
app.py
CHANGED
@@ -68,8 +68,9 @@ def proc_submission(
|
|
68 |
"no_repeat_ngram_size": no_repeat_ngram_size,
|
69 |
"encoder_no_repeat_ngram_size": 4,
|
70 |
"num_beams": num_beams,
|
|
|
|
|
71 |
"early_stopping": True,
|
72 |
-
"min_length": 10,
|
73 |
"do_sample": False,
|
74 |
}
|
75 |
|
@@ -130,7 +131,7 @@ def load_examples(examples_dir="examples"):
|
|
130 |
for example in examples:
|
131 |
with open(example, "r") as f:
|
132 |
text = f.read()
|
133 |
-
text_examples.append([text, "large",
|
134 |
|
135 |
return text_examples
|
136 |
|
|
|
68 |
"no_repeat_ngram_size": no_repeat_ngram_size,
|
69 |
"encoder_no_repeat_ngram_size": 4,
|
70 |
"num_beams": num_beams,
|
71 |
+
"min_length": 4,
|
72 |
+
"max_length": int(token_batch_length // 4),
|
73 |
"early_stopping": True,
|
|
|
74 |
"do_sample": False,
|
75 |
}
|
76 |
|
|
|
131 |
for example in examples:
|
132 |
with open(example, "r") as f:
|
133 |
text = f.read()
|
134 |
+
text_examples.append([text, "large", 2, 512, 0.7, 3.5, 3])
|
135 |
|
136 |
return text_examples
|
137 |
|