update train script
Browse files
train.py
CHANGED
|
@@ -9,6 +9,7 @@ import numpy as np
|
|
| 9 |
import torch
|
| 10 |
from collections import Counter
|
| 11 |
|
|
|
|
| 12 |
# Load the dataset from Hugging Face Hub
|
| 13 |
dataset = load_dataset("Luigi/dinercall-intent")
|
| 14 |
|
|
@@ -91,12 +92,12 @@ training_args = TrainingArguments(
|
|
| 91 |
learning_rate=2e-5,
|
| 92 |
per_device_train_batch_size=16,
|
| 93 |
per_device_eval_batch_size=16,
|
| 94 |
-
num_train_epochs=
|
| 95 |
weight_decay=0.01,
|
| 96 |
logging_dir='./logs',
|
| 97 |
logging_steps=10,
|
| 98 |
save_total_limit=2,
|
| 99 |
-
push_to_hub=
|
| 100 |
hub_model_id="Luigi/albert-tiny-chinese-dinercall-intent", # optional, use if you want a custom name
|
| 101 |
hub_private_repo=False # optional, if you want a private repo
|
| 102 |
)
|
|
|
|
| 9 |
import torch
|
| 10 |
from collections import Counter
|
| 11 |
|
| 12 |
+
|
| 13 |
# Load the dataset from Hugging Face Hub
|
| 14 |
dataset = load_dataset("Luigi/dinercall-intent")
|
| 15 |
|
|
|
|
| 92 |
learning_rate=2e-5,
|
| 93 |
per_device_train_batch_size=16,
|
| 94 |
per_device_eval_batch_size=16,
|
| 95 |
+
num_train_epochs=100,
|
| 96 |
weight_decay=0.01,
|
| 97 |
logging_dir='./logs',
|
| 98 |
logging_steps=10,
|
| 99 |
save_total_limit=2,
|
| 100 |
+
push_to_hub=True,# 👈 This will push your model after training
|
| 101 |
hub_model_id="Luigi/albert-tiny-chinese-dinercall-intent", # optional, use if you want a custom name
|
| 102 |
hub_private_repo=False # optional, if you want a private repo
|
| 103 |
)
|