Kevin Fink
commited on
Commit
·
6c1ed42
1
Parent(s):
c0d76c2
init
Browse files
app.py
CHANGED
@@ -60,10 +60,10 @@ def fine_tune_model(model_name, dataset_name, hub_id, api_key, num_epochs, batch
|
|
60 |
greater_is_better=True,
|
61 |
logging_dir='./logs',
|
62 |
logging_steps=10,
|
63 |
-
push_to_hub=True,
|
64 |
hub_model_id=hub_id.strip(),
|
65 |
fp16=True,
|
66 |
-
|
67 |
)
|
68 |
|
69 |
# Create Trainer
|
@@ -71,7 +71,8 @@ def fine_tune_model(model_name, dataset_name, hub_id, api_key, num_epochs, batch
|
|
71 |
model=model,
|
72 |
args=training_args,
|
73 |
train_dataset=tokenized_datasets['train'],
|
74 |
-
eval_dataset=tokenized_datasets['
|
|
|
75 |
callbacks=[LoggingCallback()],
|
76 |
)
|
77 |
|
|
|
60 |
greater_is_better=True,
|
61 |
logging_dir='./logs',
|
62 |
logging_steps=10,
|
63 |
+
#push_to_hub=True,
|
64 |
hub_model_id=hub_id.strip(),
|
65 |
fp16=True,
|
66 |
+
lr_scheduler_type='cosine',
|
67 |
)
|
68 |
|
69 |
# Create Trainer
|
|
|
71 |
model=model,
|
72 |
args=training_args,
|
73 |
train_dataset=tokenized_datasets['train'],
|
74 |
+
eval_dataset=tokenized_datasets['test'],
|
75 |
+
test_dataset=tokenized_datasets['validation'],
|
76 |
callbacks=[LoggingCallback()],
|
77 |
)
|
78 |
|