Update README.md
Browse files
README.md
CHANGED
@@ -49,7 +49,7 @@ def generate_prompt(text):
|
|
49 |
inputs = tokenizer(text, return_tensors='pt')
|
50 |
input_ids = inputs.input_ids.to(device)
|
51 |
attention_mask = inputs.attention_mask.to(device)
|
52 |
-
output = model.generate(input_ids, attention_mask=attention_mask, max_length=2048, eos_token_id=tokenizer.eos_token_id)
|
53 |
|
54 |
return tokenizer.decode(output[0], skip_special_tokens=False)
|
55 |
|
|
|
49 |
inputs = tokenizer(text, return_tensors='pt')
|
50 |
input_ids = inputs.input_ids.to(device)
|
51 |
attention_mask = inputs.attention_mask.to(device)
|
52 |
+
output = model.generate(input_ids, attention_mask=attention_mask, repetition_penalty=1.05, max_length=2048, eos_token_id=tokenizer.eos_token_id)
|
53 |
|
54 |
return tokenizer.decode(output[0], skip_special_tokens=False)
|
55 |
|