Kc-12 commited on
Commit
31cb92e
1 Parent(s): 88ac7ef

Upload better_transformer.py

Browse files
Files changed (1) hide show
  1. better_transformer.py +1 -1
better_transformer.py CHANGED
@@ -394,7 +394,7 @@ def generate(model, tokenizer, device, method=None, k=None,
394
  res = re.sub(r'“', '"', res)
395
  res = re.sub(r'’', "'", res)
396
  res = re.sub(r'â€', '"', res)
397
- res = res + " [END]" ## better end token
398
  return res
399
 
400
 
 
394
  res = re.sub(r'“', '"', res)
395
  res = re.sub(r'’', "'", res)
396
  res = re.sub(r'â€', '"', res)
397
+ res = res + " <|endoftext|>" ## better end token
398
  return res
399
 
400