sudy-super
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -43,19 +43,18 @@ with torch.no_grad():
|
|
43 |
token_ids = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
|
44 |
output_ids = model.generate(
|
45 |
token_ids.to(model.device),
|
46 |
-
max_new_tokens=
|
47 |
do_sample=True,
|
48 |
temperature=0.3,
|
49 |
top_p=0.95,
|
50 |
top_k=50,
|
51 |
-
repetition_penalty=1.1,
|
52 |
pad_token_id=tokenizer.pad_token_id,
|
53 |
eos_token_id=tokenizer.eos_token_id,
|
54 |
)
|
55 |
output = tokenizer.decode(output_ids.tolist()[0][token_ids.size(1) :], skip_special_tokens=False)
|
56 |
print(output)
|
57 |
"""
|
58 |
-
|
59 |
"""
|
60 |
```
|
61 |
|
@@ -67,7 +66,7 @@ print(output)
|
|
67 |
|
68 |
### Hyperparameter
|
69 |
```
|
70 |
-
num_train_epochs: 5
|
71 |
per_device_train_batch_size: 2
|
72 |
per_device_eval_batch_size: 2
|
73 |
gradient_accumulation_steps: 128
|
|
|
43 |
token_ids = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
|
44 |
output_ids = model.generate(
|
45 |
token_ids.to(model.device),
|
46 |
+
max_new_tokens=1024,
|
47 |
do_sample=True,
|
48 |
temperature=0.3,
|
49 |
top_p=0.95,
|
50 |
top_k=50,
|
|
|
51 |
pad_token_id=tokenizer.pad_token_id,
|
52 |
eos_token_id=tokenizer.eos_token_id,
|
53 |
)
|
54 |
output = tokenizer.decode(output_ids.tolist()[0][token_ids.size(1) :], skip_special_tokens=False)
|
55 |
print(output)
|
56 |
"""
|
57 |
+
旅行先の都市が急速に発展している可能性があります。高層ビルは一般的に、経済の成長、人口の増加、不動産開発の活発化など、都市の発展に関連する要因と結びついています。
|
58 |
"""
|
59 |
```
|
60 |
|
|
|
66 |
|
67 |
### Hyperparameter
|
68 |
```
|
69 |
+
num_train_epochs: ~5~ 4
|
70 |
per_device_train_batch_size: 2
|
71 |
per_device_eval_batch_size: 2
|
72 |
gradient_accumulation_steps: 128
|