Delete pytorch_model.bin
Browse files- pytorch_model.bin +0 -24
pytorch_model.bin
DELETED
|
@@ -1,24 +0,0 @@
|
|
| 1 |
-
from transformers import AutoModelForQuestionAnswering, AutoTokenizer
|
| 2 |
-
|
| 3 |
-
model = AutoModelForQuestionAnswering.from_pretrained("bert-base-uncased")
|
| 4 |
-
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
|
| 5 |
-
|
| 6 |
-
from transformers import Trainer, TrainingArguments
|
| 7 |
-
|
| 8 |
-
training_args = TrainingArguments(
|
| 9 |
-
output_dir='./results', # This is where pytorch_model.bin will be saved
|
| 10 |
-
evaluation_strategy="epoch",
|
| 11 |
-
learning_rate=2e-5,
|
| 12 |
-
per_device_train_batch_size=16,
|
| 13 |
-
num_train_epochs=3,
|
| 14 |
-
weight_decay=0.01,
|
| 15 |
-
)
|
| 16 |
-
|
| 17 |
-
trainer = Trainer(
|
| 18 |
-
model=model,
|
| 19 |
-
args=training_args,
|
| 20 |
-
train_dataset=train_dataset,
|
| 21 |
-
eval_dataset=eval_dataset,
|
| 22 |
-
)
|
| 23 |
-
|
| 24 |
-
trainer.train()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|