Remove commas from preset files

This commit is contained in:
oobabooga 2023-02-11 14:54:29 -03:00
parent 144857acfe
commit b3c4657c47
18 changed files with 96 additions and 96 deletions

View File

@ -1 +1 @@
do_sample=False, do_sample=False

View File

@ -1,3 +1,3 @@
do_sample=True, do_sample=True
top_k=100, top_k=100
top_p=0.9, top_p=0.9

View File

@ -1,6 +1,6 @@
do_sample=True, do_sample=True
top_p=0.9, top_p=0.9
top_k=50, top_k=50
temperature=1.39, temperature=1.39
repetition_penalty=1.08, repetition_penalty=1.08
typical_p=0.2, typical_p=0.2

View File

@ -1,5 +1,5 @@
top_p=0.95, top_p=0.95
temperature=0.5, temperature=0.5
penalty_alpha=0.6, penalty_alpha=0.6
top_k=4, top_k=4
repetition_penalty=1.03, repetition_penalty=1.03

View File

@ -1,6 +1,6 @@
do_sample=True, do_sample=True
top_p=0.5, top_p=0.5
top_k=0, top_k=0
temperature=0.7, temperature=0.7
repetition_penalty=1.1, repetition_penalty=1.1
typical_p=0.19, typical_p=0.19

View File

@ -1,6 +1,6 @@
do_sample=True, do_sample=True
top_p=1.0, top_p=1.0
top_k=0, top_k=0
temperature=0.66, temperature=0.66
repetition_penalty=1.1, repetition_penalty=1.1
typical_p=0.6, typical_p=0.6

View File

@ -1,4 +1,4 @@
do_sample=True, do_sample=True
top_p=1, top_p=1
typical_p=0.3, typical_p=0.3
temperature=0.7, temperature=0.7

View File

@ -1,6 +1,6 @@
do_sample=True, do_sample=True
top_p=0.9, top_p=0.9
top_k=100, top_k=100
temperature=0.8, temperature=0.8
repetition_penalty=1.15, repetition_penalty=1.15
typical_p=1.0, typical_p=1.0

View File

@ -1,6 +1,6 @@
do_sample=True, do_sample=True
top_p=1.0, top_p=1.0
top_k=100, top_k=100
temperature=2, temperature=2
repetition_penalty=1, repetition_penalty=1
typical_p=0.97, typical_p=0.97

View File

@ -1,6 +1,6 @@
do_sample=True, do_sample=True
top_p=0.98, top_p=0.98
top_k=0, top_k=0
temperature=0.63, temperature=0.63
repetition_penalty=1.05, repetition_penalty=1.05
typical_p=1.0, typical_p=1.0

View File

@ -1,6 +1,6 @@
do_sample=True, do_sample=True
top_p=0.85, top_p=0.85
top_k=12, top_k=12
temperature=2, temperature=2
repetition_penalty=1.15, repetition_penalty=1.15
typical_p=1.0, typical_p=1.0

View File

@ -1,6 +1,6 @@
do_sample=True, do_sample=True
top_p=1.0, top_p=1.0
top_k=100, top_k=100
temperature=1.07, temperature=1.07
repetition_penalty=1.05, repetition_penalty=1.05
typical_p=1.0, typical_p=1.0

View File

@ -1,6 +1,6 @@
do_sample=True, do_sample=True
top_p=1.0, top_p=1.0
top_k=0, top_k=0
temperature=0.44, temperature=0.44
repetition_penalty=1.15, repetition_penalty=1.15
typical_p=1.0, typical_p=1.0

View File

@ -1,6 +1,6 @@
do_sample=True, do_sample=True
top_p=0.18, top_p=0.18
top_k=30, top_k=30
temperature=2.0, temperature=2.0
repetition_penalty=1.15, repetition_penalty=1.15
typical_p=1.0, typical_p=1.0

View File

@ -1,6 +1,6 @@
do_sample=True, do_sample=True
top_p=0.73, top_p=0.73
top_k=0, top_k=0
temperature=0.72, temperature=0.72
repetition_penalty=1.1, repetition_penalty=1.1
typical_p=1.0, typical_p=1.0

View File

@ -1,6 +1,6 @@
do_sample=True, do_sample=True
top_p=0.9, top_p=0.9
top_k=0, top_k=0
temperature=0.5, temperature=0.5
repetition_penalty=1.05, repetition_penalty=1.05
typical_p=1.0, typical_p=1.0

View File

@ -1,9 +1,9 @@
num_beams=10, num_beams=10
min_length=200, min_length=200
length_penalty =1.4, length_penalty =1.4
no_repeat_ngram_size=2, no_repeat_ngram_size=2
early_stopping=True, early_stopping=True
temperature=0.7, temperature=0.7
top_k=150, top_k=150
top_p=0.92, top_p=0.92
repetition_penalty=4.5, repetition_penalty=4.5

View File

@ -182,8 +182,8 @@ def load_preset_values(preset_menu, return_dict=False):
} }
with open(Path(f'presets/{preset_menu}.txt'), 'r') as infile: with open(Path(f'presets/{preset_menu}.txt'), 'r') as infile:
preset = infile.read() preset = infile.read()
for i in preset.split(','): for i in preset.splitlines():
i = i.strip().split('=') i = i.rstrip(',').strip().split('=')
if len(i) == 2 and i[0].strip() != 'tokens': if len(i) == 2 and i[0].strip() != 'tokens':
generate_params[i[0].strip()] = eval(i[1].strip()) generate_params[i[0].strip()] = eval(i[1].strip())