arefrazavi commited on
Commit
0ebc618
·
verified ·
1 Parent(s): 12fe412

Model save

Browse files
Files changed (4) hide show
  1. README.md +58 -0
  2. all_results.json +8 -0
  3. train_results.json +8 -0
  4. trainer_state.json +147 -0
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: google/gemma-3-4b-pt
3
+ library_name: transformers
4
+ model_name: gemma-3-4b-anomaly-detector
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - sft
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for gemma-3-4b-anomaly-detector
13
+
14
+ This model is a fine-tuned version of [google/gemma-3-4b-pt](https://huggingface.co/google/gemma-3-4b-pt).
15
+ It has been trained using [TRL](https://github.com/huggingface/trl).
16
+
17
+ ## Quick start
18
+
19
+ ```python
20
+ from transformers import pipeline
21
+
22
+ question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
23
+ generator = pipeline("text-generation", model="arefrazavi/gemma-3-4b-anomaly-detector", device="cuda")
24
+ output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
25
+ print(output["generated_text"])
26
+ ```
27
+
28
+ ## Training procedure
29
+
30
+
31
+
32
+
33
+ This model was trained with SFT.
34
+
35
+ ### Framework versions
36
+
37
+ - TRL: 0.15.2
38
+ - Transformers: 4.50.0.dev0
39
+ - Pytorch: 2.6.0
40
+ - Datasets: 3.4.1
41
+ - Tokenizers: 0.21.1
42
+
43
+ ## Citations
44
+
45
+
46
+
47
+ Cite TRL as:
48
+
49
+ ```bibtex
50
+ @misc{vonwerra2022trl,
51
+ title = {{TRL: Transformer Reinforcement Learning}},
52
+ author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
53
+ year = 2020,
54
+ journal = {GitHub repository},
55
+ publisher = {GitHub},
56
+ howpublished = {\url{https://github.com/huggingface/trl}}
57
+ }
58
+ ```
all_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 3.043890401016545e+17,
3
+ "train_loss": 0.2311508838485622,
4
+ "train_runtime": 4878.1888,
5
+ "train_samples": 7954,
6
+ "train_samples_per_second": 5.225,
7
+ "train_steps_per_second": 0.326
8
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 3.043890401016545e+17,
3
+ "train_loss": 0.2311508838485622,
4
+ "train_runtime": 4878.1888,
5
+ "train_samples": 7954,
6
+ "train_samples_per_second": 5.225,
7
+ "train_steps_per_second": 0.326
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 9.940438871473354,
5
+ "eval_steps": 500,
6
+ "global_step": 1590,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.6269592476489029,
13
+ "grad_norm": 0.4195554256439209,
14
+ "learning_rate": 0.0002,
15
+ "loss": 0.6385,
16
+ "step": 100
17
+ },
18
+ {
19
+ "epoch": 1.250783699059561,
20
+ "grad_norm": 0.3866879343986511,
21
+ "learning_rate": 0.0002,
22
+ "loss": 0.4144,
23
+ "step": 200
24
+ },
25
+ {
26
+ "epoch": 1.877742946708464,
27
+ "grad_norm": 0.34548789262771606,
28
+ "learning_rate": 0.0002,
29
+ "loss": 0.3602,
30
+ "step": 300
31
+ },
32
+ {
33
+ "epoch": 2.501567398119122,
34
+ "grad_norm": 0.40215349197387695,
35
+ "learning_rate": 0.0002,
36
+ "loss": 0.3016,
37
+ "step": 400
38
+ },
39
+ {
40
+ "epoch": 3.1253918495297803,
41
+ "grad_norm": 0.4264250099658966,
42
+ "learning_rate": 0.0002,
43
+ "loss": 0.2818,
44
+ "step": 500
45
+ },
46
+ {
47
+ "epoch": 3.7523510971786833,
48
+ "grad_norm": 0.38338279724121094,
49
+ "learning_rate": 0.0002,
50
+ "loss": 0.2397,
51
+ "step": 600
52
+ },
53
+ {
54
+ "epoch": 4.376175548589342,
55
+ "grad_norm": 0.4163173735141754,
56
+ "learning_rate": 0.0002,
57
+ "loss": 0.2157,
58
+ "step": 700
59
+ },
60
+ {
61
+ "epoch": 5.0,
62
+ "grad_norm": 0.644266664981842,
63
+ "learning_rate": 0.0002,
64
+ "loss": 0.2047,
65
+ "step": 800
66
+ },
67
+ {
68
+ "epoch": 5.6269592476489025,
69
+ "grad_norm": 0.4428400695323944,
70
+ "learning_rate": 0.0002,
71
+ "loss": 0.1671,
72
+ "step": 900
73
+ },
74
+ {
75
+ "epoch": 6.250783699059561,
76
+ "grad_norm": 0.3752143383026123,
77
+ "learning_rate": 0.0002,
78
+ "loss": 0.1598,
79
+ "step": 1000
80
+ },
81
+ {
82
+ "epoch": 6.877742946708464,
83
+ "grad_norm": 0.40711358189582825,
84
+ "learning_rate": 0.0002,
85
+ "loss": 0.1446,
86
+ "step": 1100
87
+ },
88
+ {
89
+ "epoch": 7.501567398119122,
90
+ "grad_norm": 0.45269152522087097,
91
+ "learning_rate": 0.0002,
92
+ "loss": 0.1257,
93
+ "step": 1200
94
+ },
95
+ {
96
+ "epoch": 8.12539184952978,
97
+ "grad_norm": 0.5310996174812317,
98
+ "learning_rate": 0.0002,
99
+ "loss": 0.1216,
100
+ "step": 1300
101
+ },
102
+ {
103
+ "epoch": 8.752351097178684,
104
+ "grad_norm": 0.3715245723724365,
105
+ "learning_rate": 0.0002,
106
+ "loss": 0.109,
107
+ "step": 1400
108
+ },
109
+ {
110
+ "epoch": 9.376175548589341,
111
+ "grad_norm": 0.4838401973247528,
112
+ "learning_rate": 0.0002,
113
+ "loss": 0.1009,
114
+ "step": 1500
115
+ },
116
+ {
117
+ "epoch": 9.940438871473354,
118
+ "step": 1590,
119
+ "total_flos": 3.043890401016545e+17,
120
+ "train_loss": 0.2311508838485622,
121
+ "train_runtime": 4878.1888,
122
+ "train_samples_per_second": 5.225,
123
+ "train_steps_per_second": 0.326
124
+ }
125
+ ],
126
+ "logging_steps": 100,
127
+ "max_steps": 1590,
128
+ "num_input_tokens_seen": 0,
129
+ "num_train_epochs": 10,
130
+ "save_steps": 500,
131
+ "stateful_callbacks": {
132
+ "TrainerControl": {
133
+ "args": {
134
+ "should_epoch_stop": false,
135
+ "should_evaluate": false,
136
+ "should_log": false,
137
+ "should_save": true,
138
+ "should_training_stop": true
139
+ },
140
+ "attributes": {}
141
+ }
142
+ },
143
+ "total_flos": 3.043890401016545e+17,
144
+ "train_batch_size": 8,
145
+ "trial_name": null,
146
+ "trial_params": null
147
+ }