Skip to content

Commit 96deb86

Browse files
Update generative-proof-of-concept-CPU-preprocessing-in-memory.py
Try more permutations of hyperparmas with the new dataset.
1 parent 96ae54c commit 96deb86

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

generative-proof-of-concept-CPU-preprocessing-in-memory.py

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,8 +1159,25 @@ def test_text(test_prompt: str, max_new_tokens: int, sample_number: int, result:
11591159
'repetition_penalty': None,
11601160
'presence_penalty': 1.4,
11611161
'frequency_penalty': 1.4
1162+
},
1163+
{
1164+
'max_new_tokens': max_new_tokens,
1165+
'temperature': 0.6,
1166+
'top_k': 40,
1167+
'top_p': 0.96,
1168+
'repetition_penalty': None,
1169+
'presence_penalty': 1.4,
1170+
'frequency_penalty': 1.4
1171+
},
1172+
{
1173+
'max_new_tokens': max_new_tokens,
1174+
'temperature': 0.7,
1175+
'top_k': 45,
1176+
'top_p': 0.97,
1177+
'repetition_penalty': None,
1178+
'presence_penalty': 1.4,
1179+
'frequency_penalty': 1.3
11621180
}
1163-
11641181
]
11651182
# Default cases, no params
11661183
response_1 = response = complete_text_greedy(text=test_prompt, max_new_tokens=max_new_tokens)
@@ -1190,19 +1207,19 @@ def test_text(test_prompt: str, max_new_tokens: int, sample_number: int, result:
11901207
# Sample prompts to test:
11911208

11921209
prompt_samples = [
1193-
# "I saw the sun and it was as shining on the",
1210+
"I saw the sun and it was as shining on the",
11941211
# "And God said to Moses:",
11951212
# "In the beginning God created the ",
11961213
# "And the earth was without form, and",
1197-
# "And God said, Let there be light: and there ",
1214+
"And God said, Let there be light: and there ",
11981215
# "Shall we all go to the river and"
11991216
"Try to",
1200-
"You must go and",
1217+
# "You must go and",
12011218
"In the beginning God created the heavens",
12021219
"The earth was formless and empty, with darkness over",
1203-
"God called the light 'day' and the darkness 'night,' marking evening and morning",
1204-
"God called the expanse 'sky,' and there was",
1205-
"The earth brought forth grass, seed-bearing"
1220+
# "God called the light 'day' and the darkness 'night,' marking evening and morning",
1221+
# "God called the expanse 'sky,' and there was",
1222+
# "The earth brought forth grass, seed-bearing"
12061223
]
12071224

12081225

0 commit comments

Comments
 (0)