Update README.md
Browse files
README.md
CHANGED
|
@@ -49,10 +49,11 @@ from transformers import GenerationConfig
|
|
| 49 |
|
| 50 |
config = GenerationConfig(
|
| 51 |
temperature=0.1,
|
| 52 |
-
top_p=0.
|
| 53 |
top_k=40,
|
| 54 |
num_beams=4,
|
| 55 |
max_new_tokens=128,
|
|
|
|
| 56 |
)
|
| 57 |
|
| 58 |
def run(instruction, model, tokenizer):
|
|
@@ -67,4 +68,19 @@ def run(instruction, model, tokenizer):
|
|
| 67 |
return decoded[0].split("\n")[-1]
|
| 68 |
```
|
| 69 |
|
| 70 |
-
Example input/output
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
config = GenerationConfig(
|
| 51 |
temperature=0.1,
|
| 52 |
+
top_p=0.5,
|
| 53 |
top_k=40,
|
| 54 |
num_beams=4,
|
| 55 |
max_new_tokens=128,
|
| 56 |
+
repetition_penalty=1.2
|
| 57 |
)
|
| 58 |
|
| 59 |
def run(instruction, model, tokenizer):
|
|
|
|
| 68 |
return decoded[0].split("\n")[-1]
|
| 69 |
```
|
| 70 |
|
| 71 |
+
### Example input/output
|
| 72 |
+
input:
|
| 73 |
+
```
|
| 74 |
+
Wymyśl kilka zapytań w google na temat kodowania.
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
output
|
| 78 |
+
```
|
| 79 |
+
Jaki jest najpopularniejszy język programowania?
|
| 80 |
+
Jaki jest najbardziej powszechnie używany język programowania?
|
| 81 |
+
Jaki jest najnowszy język programowania?
|
| 82 |
+
Jaki jest najbardziej efektywny język programowania?
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
|