added model
Browse files- all_results.json +12 -0
- config.json +46 -0
- eval_results.json +8 -0
- preprocessor_config.json +14 -0
- pytorch_model.bin +3 -0
- train.py +211 -0
- train_results.json +7 -0
- trainer_state.json +310 -0
- training_args.bin +3 -0
all_results.json
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 6.0,
|
3 |
+
"eval_accuracy": 0.9852222222222222,
|
4 |
+
"eval_loss": 0.05230661854147911,
|
5 |
+
"eval_runtime": 2.6574,
|
6 |
+
"eval_samples_per_second": 3386.794,
|
7 |
+
"eval_steps_per_second": 423.349,
|
8 |
+
"train_loss": 0.1922683648263396,
|
9 |
+
"train_runtime": 134.4457,
|
10 |
+
"train_samples_per_second": 2276.012,
|
11 |
+
"train_steps_per_second": 71.137
|
12 |
+
}
|
config.json
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"ResNetForImageClassification"
|
4 |
+
],
|
5 |
+
"depths": [
|
6 |
+
2,
|
7 |
+
2
|
8 |
+
],
|
9 |
+
"downsample_in_first_stage": false,
|
10 |
+
"embedding_size": 64,
|
11 |
+
"hidden_act": "relu",
|
12 |
+
"hidden_sizes": [
|
13 |
+
32,
|
14 |
+
64
|
15 |
+
],
|
16 |
+
"id2label": {
|
17 |
+
"0": "LABEL_0",
|
18 |
+
"1": "LABEL_1",
|
19 |
+
"2": "LABEL_2",
|
20 |
+
"3": "LABEL_3",
|
21 |
+
"4": "LABEL_4",
|
22 |
+
"5": "LABEL_5",
|
23 |
+
"6": "LABEL_6",
|
24 |
+
"7": "LABEL_7",
|
25 |
+
"8": "LABEL_8",
|
26 |
+
"9": "LABEL_9"
|
27 |
+
},
|
28 |
+
"label2id": {
|
29 |
+
"LABEL_0": 0,
|
30 |
+
"LABEL_1": 1,
|
31 |
+
"LABEL_2": 2,
|
32 |
+
"LABEL_3": 3,
|
33 |
+
"LABEL_4": 4,
|
34 |
+
"LABEL_5": 5,
|
35 |
+
"LABEL_6": 6,
|
36 |
+
"LABEL_7": 7,
|
37 |
+
"LABEL_8": 8,
|
38 |
+
"LABEL_9": 9
|
39 |
+
},
|
40 |
+
"layer_type": "basic",
|
41 |
+
"model_type": "resnet",
|
42 |
+
"num_channels": 1,
|
43 |
+
"problem_type": "single_label_classification",
|
44 |
+
"torch_dtype": "float32",
|
45 |
+
"transformers_version": "4.19.0.dev0"
|
46 |
+
}
|
eval_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 6.0,
|
3 |
+
"eval_accuracy": 0.9852222222222222,
|
4 |
+
"eval_loss": 0.05230661854147911,
|
5 |
+
"eval_runtime": 2.6574,
|
6 |
+
"eval_samples_per_second": 3386.794,
|
7 |
+
"eval_steps_per_second": 423.349
|
8 |
+
}
|
preprocessor_config.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"crop_pct": null,
|
3 |
+
"do_normalize": false,
|
4 |
+
"do_resize": false,
|
5 |
+
"feature_extractor_type": "ConvNextFeatureExtractor",
|
6 |
+
"image_mean": [
|
7 |
+
0.45
|
8 |
+
],
|
9 |
+
"image_std": [
|
10 |
+
0.22
|
11 |
+
],
|
12 |
+
"resample": 3,
|
13 |
+
"size": 224
|
14 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:72b3ed2e1f131afbe98687a782109fa539b77a1b60713d8be2cb09dab092db7f
|
3 |
+
size 763481
|
train.py
ADDED
@@ -0,0 +1,211 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import logging
|
2 |
+
import sys
|
3 |
+
from dataclasses import dataclass, field
|
4 |
+
from typing import Optional
|
5 |
+
|
6 |
+
import datasets
|
7 |
+
import torch
|
8 |
+
import transformers
|
9 |
+
from torchinfo import summary
|
10 |
+
from torchvision.transforms import Compose, Normalize, ToTensor
|
11 |
+
from transformers import (
|
12 |
+
ConvNextFeatureExtractor,
|
13 |
+
HfArgumentParser,
|
14 |
+
ResNetConfig,
|
15 |
+
ResNetForImageClassification,
|
16 |
+
Trainer,
|
17 |
+
TrainingArguments,
|
18 |
+
)
|
19 |
+
from transformers.utils import check_min_version
|
20 |
+
from transformers.utils.versions import require_version
|
21 |
+
|
22 |
+
import numpy as np
|
23 |
+
|
24 |
+
|
25 |
+
@dataclass
|
26 |
+
class DataTrainingArguments:
|
27 |
+
"""
|
28 |
+
Arguments pertaining to what data we are going to input our model for training and eval.
|
29 |
+
Using `HfArgumentParser` we can turn this class into argparse arguments to be able to specify
|
30 |
+
them on the command line.
|
31 |
+
"""
|
32 |
+
|
33 |
+
train_val_split: Optional[float] = field(
|
34 |
+
default=0.15, metadata={"help": "Percent to split off of train for validation."}
|
35 |
+
)
|
36 |
+
max_train_samples: Optional[int] = field(
|
37 |
+
default=None,
|
38 |
+
metadata={
|
39 |
+
"help": "For debugging purposes or quicker training, truncate the number of training examples to this "
|
40 |
+
"value if set."
|
41 |
+
},
|
42 |
+
)
|
43 |
+
max_eval_samples: Optional[int] = field(
|
44 |
+
default=None,
|
45 |
+
metadata={
|
46 |
+
"help": "For debugging purposes or quicker training, truncate the number of evaluation examples to this "
|
47 |
+
"value if set."
|
48 |
+
},
|
49 |
+
)
|
50 |
+
|
51 |
+
|
52 |
+
def collate_fn(examples):
|
53 |
+
pixel_values = torch.stack([example["pixel_values"] for example in examples])
|
54 |
+
labels = torch.tensor([example["label"] for example in examples])
|
55 |
+
return {"pixel_values": pixel_values, "labels": labels}
|
56 |
+
|
57 |
+
|
58 |
+
# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
|
59 |
+
check_min_version("4.19.0.dev0")
|
60 |
+
|
61 |
+
require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/image-classification/requirements.txt")
|
62 |
+
|
63 |
+
logger = logging.getLogger(__name__)
|
64 |
+
|
65 |
+
def main():
|
66 |
+
parser = HfArgumentParser((DataTrainingArguments, TrainingArguments))
|
67 |
+
if len(sys.argv) == 2 and sys.argv[1].endswith(".json"):
|
68 |
+
# If we pass only one argument to the script and it's the path to a json file,
|
69 |
+
# let's parse it to get our arguments.
|
70 |
+
data_args, training_args = parser.parse_json_file(
|
71 |
+
json_file=os.path.abspath(sys.argv[1])
|
72 |
+
)
|
73 |
+
else:
|
74 |
+
data_args, training_args = parser.parse_args_into_dataclasses()
|
75 |
+
|
76 |
+
# Setup logging
|
77 |
+
logging.basicConfig(
|
78 |
+
format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
|
79 |
+
datefmt="%m/%d/%Y %H:%M:%S",
|
80 |
+
handlers=[logging.StreamHandler(sys.stdout)],
|
81 |
+
)
|
82 |
+
|
83 |
+
log_level = training_args.get_process_log_level()
|
84 |
+
logger.setLevel(log_level)
|
85 |
+
transformers.utils.logging.set_verbosity(log_level)
|
86 |
+
transformers.utils.logging.enable_default_handler()
|
87 |
+
transformers.utils.logging.enable_explicit_format()
|
88 |
+
|
89 |
+
# Log on each process the small summary:
|
90 |
+
logger.warning(
|
91 |
+
f"Process rank: {training_args.local_rank}, device: {training_args.device}, n_gpu: {training_args.n_gpu}"
|
92 |
+
+ f"distributed training: {bool(training_args.local_rank != -1)}, 16-bits training: {training_args.fp16}"
|
93 |
+
)
|
94 |
+
|
95 |
+
dataset = datasets.load_dataset("mnist")
|
96 |
+
|
97 |
+
data_args.train_val_split = (
|
98 |
+
None if "validation" in dataset.keys() else data_args.train_val_split
|
99 |
+
)
|
100 |
+
if isinstance(data_args.train_val_split, float) and data_args.train_val_split > 0.0:
|
101 |
+
split = dataset["train"].train_test_split(data_args.train_val_split)
|
102 |
+
dataset["train"] = split["train"]
|
103 |
+
dataset["validation"] = split["test"]
|
104 |
+
|
105 |
+
feature_extractor = ConvNextFeatureExtractor(
|
106 |
+
do_resize=False, do_normalize=False, image_mean=[0.45], image_std=[0.22]
|
107 |
+
)
|
108 |
+
|
109 |
+
config = ResNetConfig(
|
110 |
+
num_channels=1,
|
111 |
+
layer_type="basic",
|
112 |
+
depths=[2, 2],
|
113 |
+
hidden_sizes=[32, 64],
|
114 |
+
num_labels=10,
|
115 |
+
)
|
116 |
+
|
117 |
+
model = ResNetForImageClassification(config)
|
118 |
+
|
119 |
+
# Define torchvision transforms to be applied to each image.
|
120 |
+
normalize = Normalize(mean=feature_extractor.image_mean, std=feature_extractor.image_std)
|
121 |
+
_transforms = Compose([ToTensor(), normalize])
|
122 |
+
|
123 |
+
def transforms(example_batch):
|
124 |
+
"""Apply _train_transforms across a batch."""
|
125 |
+
# black and white
|
126 |
+
example_batch["pixel_values"] = [_transforms(pil_img.convert("L")) for pil_img in example_batch["image"]]
|
127 |
+
return example_batch
|
128 |
+
|
129 |
+
# Load the accuracy metric from the datasets package
|
130 |
+
metric = datasets.load_metric("accuracy")
|
131 |
+
|
132 |
+
# Define our compute_metrics function. It takes an `EvalPrediction` object (a namedtuple with a
|
133 |
+
# predictions and label_ids field) and has to return a dictionary string to float.
|
134 |
+
def compute_metrics(p):
|
135 |
+
"""Computes accuracy on a batch of predictions"""
|
136 |
+
|
137 |
+
accuracy = metric.compute(predictions=np.argmax(p.predictions, axis=1), references=p.label_ids)
|
138 |
+
return accuracy
|
139 |
+
|
140 |
+
if training_args.do_train:
|
141 |
+
if data_args.max_train_samples is not None:
|
142 |
+
dataset["train"] = (
|
143 |
+
dataset["train"]
|
144 |
+
.shuffle(seed=training_args.seed)
|
145 |
+
.select(range(data_args.max_train_samples))
|
146 |
+
)
|
147 |
+
|
148 |
+
logger.info("Setting train transform")
|
149 |
+
# Set the training transforms
|
150 |
+
dataset["train"].set_transform(transforms)
|
151 |
+
|
152 |
+
if training_args.do_eval:
|
153 |
+
if "validation" not in dataset:
|
154 |
+
raise ValueError("--do_eval requires a validation dataset")
|
155 |
+
if data_args.max_eval_samples is not None:
|
156 |
+
dataset["validation"] = (
|
157 |
+
dataset["validation"]
|
158 |
+
.shuffle(seed=training_args.seed)
|
159 |
+
.select(range(data_args.max_eval_samples))
|
160 |
+
)
|
161 |
+
|
162 |
+
logger.info("Setting validation transform")
|
163 |
+
# Set the validation transforms
|
164 |
+
dataset["validation"].set_transform(transforms)
|
165 |
+
|
166 |
+
from transformers import trainer_utils
|
167 |
+
|
168 |
+
print(dataset)
|
169 |
+
|
170 |
+
training_args = transformers.TrainingArguments(
|
171 |
+
output_dir=training_args.output_dir,
|
172 |
+
do_eval=training_args.do_eval,
|
173 |
+
do_train=training_args.do_train,
|
174 |
+
logging_steps = 500,
|
175 |
+
eval_steps = 500,
|
176 |
+
save_steps= 500,
|
177 |
+
remove_unused_columns = False, # we need to pass the `label` and `image`
|
178 |
+
per_device_train_batch_size = 32,
|
179 |
+
save_total_limit = 2,
|
180 |
+
evaluation_strategy = "steps",
|
181 |
+
num_train_epochs = 6,
|
182 |
+
)
|
183 |
+
|
184 |
+
logger.info(f"Training/evaluation parameters {training_args}")
|
185 |
+
|
186 |
+
trainer = Trainer(
|
187 |
+
model=model,
|
188 |
+
args=training_args,
|
189 |
+
train_dataset=dataset["train"] if training_args.do_train else None,
|
190 |
+
eval_dataset=dataset["validation"] if training_args.do_eval else None,
|
191 |
+
compute_metrics=compute_metrics,
|
192 |
+
tokenizer=feature_extractor,
|
193 |
+
data_collator=collate_fn,
|
194 |
+
)
|
195 |
+
|
196 |
+
# Training
|
197 |
+
if training_args.do_train:
|
198 |
+
train_result = trainer.train()
|
199 |
+
trainer.save_model()
|
200 |
+
trainer.log_metrics("train", train_result.metrics)
|
201 |
+
trainer.save_metrics("train", train_result.metrics)
|
202 |
+
trainer.save_state()
|
203 |
+
|
204 |
+
# Evaluation
|
205 |
+
if training_args.do_eval:
|
206 |
+
metrics = trainer.evaluate()
|
207 |
+
trainer.log_metrics("eval", metrics)
|
208 |
+
trainer.save_metrics("eval", metrics)
|
209 |
+
|
210 |
+
if __name__ == "__main__":
|
211 |
+
main()
|
train_results.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 6.0,
|
3 |
+
"train_loss": 0.1922683648263396,
|
4 |
+
"train_runtime": 134.4457,
|
5 |
+
"train_samples_per_second": 2276.012,
|
6 |
+
"train_steps_per_second": 71.137
|
7 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,310 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 6.0,
|
5 |
+
"global_step": 9564,
|
6 |
+
"is_hyper_param_search": false,
|
7 |
+
"is_local_process_zero": true,
|
8 |
+
"is_world_process_zero": true,
|
9 |
+
"log_history": [
|
10 |
+
{
|
11 |
+
"epoch": 0.31,
|
12 |
+
"learning_rate": 4.7386030949393564e-05,
|
13 |
+
"loss": 1.4207,
|
14 |
+
"step": 500
|
15 |
+
},
|
16 |
+
{
|
17 |
+
"epoch": 0.31,
|
18 |
+
"eval_accuracy": 0.9008888888888889,
|
19 |
+
"eval_loss": 0.7066789269447327,
|
20 |
+
"eval_runtime": 2.6965,
|
21 |
+
"eval_samples_per_second": 3337.621,
|
22 |
+
"eval_steps_per_second": 417.203,
|
23 |
+
"step": 500
|
24 |
+
},
|
25 |
+
{
|
26 |
+
"epoch": 0.63,
|
27 |
+
"learning_rate": 4.477206189878712e-05,
|
28 |
+
"loss": 0.5086,
|
29 |
+
"step": 1000
|
30 |
+
},
|
31 |
+
{
|
32 |
+
"epoch": 0.63,
|
33 |
+
"eval_accuracy": 0.9516666666666667,
|
34 |
+
"eval_loss": 0.3055577874183655,
|
35 |
+
"eval_runtime": 2.6576,
|
36 |
+
"eval_samples_per_second": 3386.509,
|
37 |
+
"eval_steps_per_second": 423.314,
|
38 |
+
"step": 1000
|
39 |
+
},
|
40 |
+
{
|
41 |
+
"epoch": 0.94,
|
42 |
+
"learning_rate": 4.215809284818068e-05,
|
43 |
+
"loss": 0.2731,
|
44 |
+
"step": 1500
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"epoch": 0.94,
|
48 |
+
"eval_accuracy": 0.9648888888888889,
|
49 |
+
"eval_loss": 0.18555375933647156,
|
50 |
+
"eval_runtime": 2.6597,
|
51 |
+
"eval_samples_per_second": 3383.793,
|
52 |
+
"eval_steps_per_second": 422.974,
|
53 |
+
"step": 1500
|
54 |
+
},
|
55 |
+
{
|
56 |
+
"epoch": 1.25,
|
57 |
+
"learning_rate": 3.954412379757424e-05,
|
58 |
+
"loss": 0.1976,
|
59 |
+
"step": 2000
|
60 |
+
},
|
61 |
+
{
|
62 |
+
"epoch": 1.25,
|
63 |
+
"eval_accuracy": 0.9701111111111111,
|
64 |
+
"eval_loss": 0.14159560203552246,
|
65 |
+
"eval_runtime": 2.715,
|
66 |
+
"eval_samples_per_second": 3314.86,
|
67 |
+
"eval_steps_per_second": 414.357,
|
68 |
+
"step": 2000
|
69 |
+
},
|
70 |
+
{
|
71 |
+
"epoch": 1.57,
|
72 |
+
"learning_rate": 3.69301547469678e-05,
|
73 |
+
"loss": 0.1565,
|
74 |
+
"step": 2500
|
75 |
+
},
|
76 |
+
{
|
77 |
+
"epoch": 1.57,
|
78 |
+
"eval_accuracy": 0.9738888888888889,
|
79 |
+
"eval_loss": 0.11081045866012573,
|
80 |
+
"eval_runtime": 2.6963,
|
81 |
+
"eval_samples_per_second": 3337.905,
|
82 |
+
"eval_steps_per_second": 417.238,
|
83 |
+
"step": 2500
|
84 |
+
},
|
85 |
+
{
|
86 |
+
"epoch": 1.88,
|
87 |
+
"learning_rate": 3.431618569636136e-05,
|
88 |
+
"loss": 0.128,
|
89 |
+
"step": 3000
|
90 |
+
},
|
91 |
+
{
|
92 |
+
"epoch": 1.88,
|
93 |
+
"eval_accuracy": 0.976,
|
94 |
+
"eval_loss": 0.09747562557458878,
|
95 |
+
"eval_runtime": 2.6961,
|
96 |
+
"eval_samples_per_second": 3338.209,
|
97 |
+
"eval_steps_per_second": 417.276,
|
98 |
+
"step": 3000
|
99 |
+
},
|
100 |
+
{
|
101 |
+
"epoch": 2.2,
|
102 |
+
"learning_rate": 3.170221664575492e-05,
|
103 |
+
"loss": 0.1133,
|
104 |
+
"step": 3500
|
105 |
+
},
|
106 |
+
{
|
107 |
+
"epoch": 2.2,
|
108 |
+
"eval_accuracy": 0.9788888888888889,
|
109 |
+
"eval_loss": 0.08474569022655487,
|
110 |
+
"eval_runtime": 2.7245,
|
111 |
+
"eval_samples_per_second": 3303.375,
|
112 |
+
"eval_steps_per_second": 412.922,
|
113 |
+
"step": 3500
|
114 |
+
},
|
115 |
+
{
|
116 |
+
"epoch": 2.51,
|
117 |
+
"learning_rate": 2.9088247595148475e-05,
|
118 |
+
"loss": 0.1031,
|
119 |
+
"step": 4000
|
120 |
+
},
|
121 |
+
{
|
122 |
+
"epoch": 2.51,
|
123 |
+
"eval_accuracy": 0.9804444444444445,
|
124 |
+
"eval_loss": 0.07724875211715698,
|
125 |
+
"eval_runtime": 2.6363,
|
126 |
+
"eval_samples_per_second": 3413.847,
|
127 |
+
"eval_steps_per_second": 426.731,
|
128 |
+
"step": 4000
|
129 |
+
},
|
130 |
+
{
|
131 |
+
"epoch": 2.82,
|
132 |
+
"learning_rate": 2.6474278544542037e-05,
|
133 |
+
"loss": 0.09,
|
134 |
+
"step": 4500
|
135 |
+
},
|
136 |
+
{
|
137 |
+
"epoch": 2.82,
|
138 |
+
"eval_accuracy": 0.9818888888888889,
|
139 |
+
"eval_loss": 0.0697416290640831,
|
140 |
+
"eval_runtime": 2.6295,
|
141 |
+
"eval_samples_per_second": 3422.689,
|
142 |
+
"eval_steps_per_second": 427.836,
|
143 |
+
"step": 4500
|
144 |
+
},
|
145 |
+
{
|
146 |
+
"epoch": 3.14,
|
147 |
+
"learning_rate": 2.386030949393559e-05,
|
148 |
+
"loss": 0.0871,
|
149 |
+
"step": 5000
|
150 |
+
},
|
151 |
+
{
|
152 |
+
"epoch": 3.14,
|
153 |
+
"eval_accuracy": 0.9815555555555555,
|
154 |
+
"eval_loss": 0.066066212952137,
|
155 |
+
"eval_runtime": 2.6946,
|
156 |
+
"eval_samples_per_second": 3340.06,
|
157 |
+
"eval_steps_per_second": 417.507,
|
158 |
+
"step": 5000
|
159 |
+
},
|
160 |
+
{
|
161 |
+
"epoch": 3.45,
|
162 |
+
"learning_rate": 2.1246340443329153e-05,
|
163 |
+
"loss": 0.0733,
|
164 |
+
"step": 5500
|
165 |
+
},
|
166 |
+
{
|
167 |
+
"epoch": 3.45,
|
168 |
+
"eval_accuracy": 0.9822222222222222,
|
169 |
+
"eval_loss": 0.06342040002346039,
|
170 |
+
"eval_runtime": 2.6897,
|
171 |
+
"eval_samples_per_second": 3346.09,
|
172 |
+
"eval_steps_per_second": 418.261,
|
173 |
+
"step": 5500
|
174 |
+
},
|
175 |
+
{
|
176 |
+
"epoch": 3.76,
|
177 |
+
"learning_rate": 1.863237139272271e-05,
|
178 |
+
"loss": 0.0761,
|
179 |
+
"step": 6000
|
180 |
+
},
|
181 |
+
{
|
182 |
+
"epoch": 3.76,
|
183 |
+
"eval_accuracy": 0.983,
|
184 |
+
"eval_loss": 0.06072380393743515,
|
185 |
+
"eval_runtime": 2.6938,
|
186 |
+
"eval_samples_per_second": 3340.98,
|
187 |
+
"eval_steps_per_second": 417.623,
|
188 |
+
"step": 6000
|
189 |
+
},
|
190 |
+
{
|
191 |
+
"epoch": 4.08,
|
192 |
+
"learning_rate": 1.601840234211627e-05,
|
193 |
+
"loss": 0.0739,
|
194 |
+
"step": 6500
|
195 |
+
},
|
196 |
+
{
|
197 |
+
"epoch": 4.08,
|
198 |
+
"eval_accuracy": 0.9832222222222222,
|
199 |
+
"eval_loss": 0.05795769765973091,
|
200 |
+
"eval_runtime": 2.6767,
|
201 |
+
"eval_samples_per_second": 3362.391,
|
202 |
+
"eval_steps_per_second": 420.299,
|
203 |
+
"step": 6500
|
204 |
+
},
|
205 |
+
{
|
206 |
+
"epoch": 4.39,
|
207 |
+
"learning_rate": 1.340443329150983e-05,
|
208 |
+
"loss": 0.0643,
|
209 |
+
"step": 7000
|
210 |
+
},
|
211 |
+
{
|
212 |
+
"epoch": 4.39,
|
213 |
+
"eval_accuracy": 0.9844444444444445,
|
214 |
+
"eval_loss": 0.05685265362262726,
|
215 |
+
"eval_runtime": 2.6876,
|
216 |
+
"eval_samples_per_second": 3348.672,
|
217 |
+
"eval_steps_per_second": 418.584,
|
218 |
+
"step": 7000
|
219 |
+
},
|
220 |
+
{
|
221 |
+
"epoch": 4.71,
|
222 |
+
"learning_rate": 1.0790464240903388e-05,
|
223 |
+
"loss": 0.0678,
|
224 |
+
"step": 7500
|
225 |
+
},
|
226 |
+
{
|
227 |
+
"epoch": 4.71,
|
228 |
+
"eval_accuracy": 0.984,
|
229 |
+
"eval_loss": 0.05617769435048103,
|
230 |
+
"eval_runtime": 2.6484,
|
231 |
+
"eval_samples_per_second": 3398.278,
|
232 |
+
"eval_steps_per_second": 424.785,
|
233 |
+
"step": 7500
|
234 |
+
},
|
235 |
+
{
|
236 |
+
"epoch": 5.02,
|
237 |
+
"learning_rate": 8.176495190296946e-06,
|
238 |
+
"loss": 0.0617,
|
239 |
+
"step": 8000
|
240 |
+
},
|
241 |
+
{
|
242 |
+
"epoch": 5.02,
|
243 |
+
"eval_accuracy": 0.9853333333333333,
|
244 |
+
"eval_loss": 0.053985536098480225,
|
245 |
+
"eval_runtime": 2.672,
|
246 |
+
"eval_samples_per_second": 3368.244,
|
247 |
+
"eval_steps_per_second": 421.03,
|
248 |
+
"step": 8000
|
249 |
+
},
|
250 |
+
{
|
251 |
+
"epoch": 5.33,
|
252 |
+
"learning_rate": 5.562526139690506e-06,
|
253 |
+
"loss": 0.0571,
|
254 |
+
"step": 8500
|
255 |
+
},
|
256 |
+
{
|
257 |
+
"epoch": 5.33,
|
258 |
+
"eval_accuracy": 0.9847777777777778,
|
259 |
+
"eval_loss": 0.05352585390210152,
|
260 |
+
"eval_runtime": 2.7082,
|
261 |
+
"eval_samples_per_second": 3323.274,
|
262 |
+
"eval_steps_per_second": 415.409,
|
263 |
+
"step": 8500
|
264 |
+
},
|
265 |
+
{
|
266 |
+
"epoch": 5.65,
|
267 |
+
"learning_rate": 2.9485570890840656e-06,
|
268 |
+
"loss": 0.0608,
|
269 |
+
"step": 9000
|
270 |
+
},
|
271 |
+
{
|
272 |
+
"epoch": 5.65,
|
273 |
+
"eval_accuracy": 0.9851111111111112,
|
274 |
+
"eval_loss": 0.053133774548769,
|
275 |
+
"eval_runtime": 2.6753,
|
276 |
+
"eval_samples_per_second": 3364.134,
|
277 |
+
"eval_steps_per_second": 420.517,
|
278 |
+
"step": 9000
|
279 |
+
},
|
280 |
+
{
|
281 |
+
"epoch": 5.96,
|
282 |
+
"learning_rate": 3.345880384776244e-07,
|
283 |
+
"loss": 0.0571,
|
284 |
+
"step": 9500
|
285 |
+
},
|
286 |
+
{
|
287 |
+
"epoch": 5.96,
|
288 |
+
"eval_accuracy": 0.9847777777777778,
|
289 |
+
"eval_loss": 0.05344167724251747,
|
290 |
+
"eval_runtime": 2.6425,
|
291 |
+
"eval_samples_per_second": 3405.863,
|
292 |
+
"eval_steps_per_second": 425.733,
|
293 |
+
"step": 9500
|
294 |
+
},
|
295 |
+
{
|
296 |
+
"epoch": 6.0,
|
297 |
+
"step": 9564,
|
298 |
+
"total_flos": 264960533376000.0,
|
299 |
+
"train_loss": 0.1922683648263396,
|
300 |
+
"train_runtime": 134.4457,
|
301 |
+
"train_samples_per_second": 2276.012,
|
302 |
+
"train_steps_per_second": 71.137
|
303 |
+
}
|
304 |
+
],
|
305 |
+
"max_steps": 9564,
|
306 |
+
"num_train_epochs": 6,
|
307 |
+
"total_flos": 264960533376000.0,
|
308 |
+
"trial_name": null,
|
309 |
+
"trial_params": null
|
310 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:aa4e95a4ea032aa40c0216647955b0d7d2e98a98aba8f2db221e4606d6d0d474
|
3 |
+
size 3055
|