Skip to content

Commit 6341a6b

Browse files
Update generative-proof-of-concept-CPU-preprocessing-in-memory.py
Set guardrail for min perplexity before we use .generate() to log samples of generated text.
1 parent 9a18534 commit 6341a6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def objective(trial: optuna.Trial) -> float:
106106

107107
GENERATION_PROMPT_LEN = 25
108108
MAX_NEW_TOKENS = 14
109-
RESULT_CUTOFF = 11 # Only print out verbose text samples when perplexity is < RESULT_CUTOFF
109+
RESULT_CUTOFF = 21 # Only print out verbose text samples when perplexity is < RESULT_CUTOFF
110110

111111
if GENERATION_PROMPT_LEN + MAX_NEW_TOKENS > MAX_SEQ_LENGTH:
112112
raise ValueError("Sequence length overflow: Generated text length (GENERATION_PROMPT_LEN + MAX_NEW_TOKENS) "

0 commit comments

Comments
 (0)