Elijahbodden commited on
Commit
5271c72
·
verified ·
1 Parent(s): dd76a1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -62,8 +62,9 @@ presets = {
62
 
63
 
64
  def custom_lp_logits_processor(ids, logits, lp_start, lp_decay):
65
- # if (len(ids) > lp_start):
66
- # logits[tokenizer.eos_token_id] *= pow(lp_decay, len(ids)-lp_start)
 
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(