Spaces:
Sleeping
Sleeping
Elijahbodden
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -62,8 +62,9 @@ presets = {
|
|
62 |
|
63 |
|
64 |
def custom_lp_logits_processor(ids, logits, lp_start, lp_decay):
|
65 |
-
|
66 |
-
|
|
|
67 |
return logits
|
68 |
|
69 |
def respond(
|
|
|
62 |
|
63 |
|
64 |
def custom_lp_logits_processor(ids, logits, lp_start, lp_decay):
|
65 |
+
if (len(ids) > lp_start):
|
66 |
+
print(len(ids), lp_start, pow(lp_decay, len(ids)-lp_start))
|
67 |
+
logits[tokenizer.eos_token_id] *= pow(lp_decay, len(ids)-lp_start)
|
68 |
return logits
|
69 |
|
70 |
def respond(
|