Update README.md
Browse files
README.md
CHANGED
@@ -61,11 +61,13 @@ generation_pipeline = pipeline("text-generation", model=model, tokenizer=tokeniz
|
|
61 |
# But encourage you to try different values
|
62 |
response = generation_pipeline(prompt,
|
63 |
pad_token_id=tokenizer.eos_token_id,
|
|
|
64 |
num_beams=4,
|
65 |
max_length=500,
|
66 |
top_p=0.1,
|
|
|
67 |
repetition_penalty = 3.0,
|
68 |
-
no_repeat_ngram_size
|
69 |
|
70 |
print(response)
|
71 |
```
|
|
|
61 |
# But encourage you to try different values
|
62 |
response = generation_pipeline(prompt,
|
63 |
pad_token_id=tokenizer.eos_token_id,
|
64 |
+
do_sample=False,
|
65 |
num_beams=4,
|
66 |
max_length=500,
|
67 |
top_p=0.1,
|
68 |
+
top_k=20,
|
69 |
repetition_penalty = 3.0,
|
70 |
+
no_repeat_ngram_size=3)[0]['generated_text']
|
71 |
|
72 |
print(response)
|
73 |
```
|