Commit
•
ec2da59
1
Parent(s):
5c12781
update inference parameters
Browse files
README.md
CHANGED
@@ -18,6 +18,15 @@ widget:
|
|
18 |
- text: We have our Dinner yesterday
|
19 |
example_title: Example 4
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
tags:
|
22 |
- context-correction
|
23 |
- error-correction
|
@@ -85,7 +94,7 @@ def correct_context(input_text, temperature=0.5):
|
|
85 |
|
86 |
return results
|
87 |
|
88 |
-
# Utility function to split the paragraph
|
89 |
def split_and_correct_context(sent):
|
90 |
sents = sent_tokenize(sent)
|
91 |
|
|
|
18 |
- text: We have our Dinner yesterday
|
19 |
example_title: Example 4
|
20 |
|
21 |
+
inference:
|
22 |
+
parameters:
|
23 |
+
max_length: 256
|
24 |
+
num_beams: 3
|
25 |
+
no_repeat_ngram_size: 2
|
26 |
+
repetition_penalty: 2.5
|
27 |
+
temperature: 0.7
|
28 |
+
do_sample: True
|
29 |
+
|
30 |
tags:
|
31 |
- context-correction
|
32 |
- error-correction
|
|
|
94 |
|
95 |
return results
|
96 |
|
97 |
+
# Utility function to split the paragraph into multiple sentences
|
98 |
def split_and_correct_context(sent):
|
99 |
sents = sent_tokenize(sent)
|
100 |
|