danielgombas commited on
Commit
01d32a4
·
verified ·
1 Parent(s): 68ccf37

danielgombas/llama_3b_step2_batch_v1

Browse files
.ipynb_checkpoints/args_v1-checkpoint.txt ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ max_seq_length = 500
2
+
3
+ def fmt(examples):
4
+ print(len(examples))
5
+ return examples
6
+
7
+ # 'lora_r' is the dimension of the LoRA attention.
8
+ lora_r = 32
9
+
10
+ # 'lora_alpha' is the alpha parameter for LoRA scaling.
11
+ lora_alpha = 16
12
+
13
+ # 'lora_dropout' is the dropout probability for LoRA layers.
14
+ lora_dropout = 0.05
15
+
16
+ # 'target_modules' is a list of the modules that should be targeted by LoRA.
17
+ target_modules= ['k_proj', 'q_proj', 'v_proj', 'o_proj', "gate_proj", "down_proj", "up_proj"]
18
+
19
+ # 'se
20
+
21
+ peft_config = LoraConfig(
22
+ r=lora_r,
23
+ lora_alpha=lora_alpha,
24
+ lora_dropout=lora_dropout,
25
+ task_type=TaskType.CAUSAL_LM,
26
+ target_modules=target_modules,
27
+ )
28
+
29
+ trainer = SFTTrainer(
30
+ model = model,
31
+ tokenizer = tokenizer,
32
+ train_dataset = qa_dataset['train'],
33
+ eval_dataset = qa_dataset['test'],
34
+ dataset_text_field = "text",
35
+ max_seq_length = max_seq_length,
36
+ dataset_num_proc = 4,
37
+ data_collator = collator,
38
+ # formatting_func = fmt,
39
+ # peft_config=peft_config,
40
+ args = TrainingArguments(
41
+ per_device_train_batch_size = 1,
42
+ gradient_checkpointing = True,
43
+ gradient_accumulation_steps = 4,
44
+ per_device_eval_batch_size = 40,
45
+ do_eval = True,
46
+ eval_strategy = 'steps',
47
+ eval_steps = 50,
48
+ # save_strategy = 'steps',
49
+ save_steps = 1000,
50
+
51
+ # Use num_train_epochs and warmup_ratio for longer runs!
52
+ # max_steps = 70,
53
+ # warmup_steps = 10,
54
+ # warmup_ratio = 0.1,
55
+ num_train_epochs = 2,
56
+
57
+ # Select a 2 to 10x smaller learning rate for the embedding matrices!
58
+ learning_rate = 1e-5,
59
+ # embedding_learning_rate = 1e-6,
60
+
61
+ # fp16 = not is_bfloat16_supported(),
62
+ bf16 = True,
63
+ logging_steps = 1,
64
+ optim = "adamw_torch",
65
+ weight_decay = 0.00,
66
+ lr_scheduler_type = "linear",
67
+ # seed = 3407,
68
+
69
+ output_dir = "llama_3b_step2_batch_v1",
70
+ ),
71
+ )
README.md CHANGED
@@ -3,199 +3,174 @@ library_name: transformers
3
  tags:
4
  - trl
5
  - sft
 
 
 
 
6
  ---
7
 
8
- # Model Card for Model ID
9
-
10
- <!-- Provide a quick summary of what the model is/does. -->
11
-
12
-
13
-
14
- ## Model Details
15
-
16
- ### Model Description
17
-
18
- <!-- Provide a longer summary of what this model is. -->
19
-
20
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
21
-
22
- - **Developed by:** [More Information Needed]
23
- - **Funded by [optional]:** [More Information Needed]
24
- - **Shared by [optional]:** [More Information Needed]
25
- - **Model type:** [More Information Needed]
26
- - **Language(s) (NLP):** [More Information Needed]
27
- - **License:** [More Information Needed]
28
- - **Finetuned from model [optional]:** [More Information Needed]
29
-
30
- ### Model Sources [optional]
31
-
32
- <!-- Provide the basic links for the model. -->
33
-
34
- - **Repository:** [More Information Needed]
35
- - **Paper [optional]:** [More Information Needed]
36
- - **Demo [optional]:** [More Information Needed]
37
-
38
- ## Uses
39
-
40
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
41
-
42
- ### Direct Use
43
-
44
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
45
-
46
- [More Information Needed]
47
-
48
- ### Downstream Use [optional]
49
-
50
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
51
-
52
- [More Information Needed]
53
-
54
- ### Out-of-Scope Use
55
-
56
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
57
-
58
- [More Information Needed]
59
-
60
- ## Bias, Risks, and Limitations
61
-
62
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
63
-
64
- [More Information Needed]
65
-
66
- ### Recommendations
67
-
68
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
69
-
70
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
71
-
72
- ## How to Get Started with the Model
73
-
74
- Use the code below to get started with the model.
75
-
76
- [More Information Needed]
77
-
78
- ## Training Details
79
-
80
- ### Training Data
81
-
82
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
83
-
84
- [More Information Needed]
85
-
86
- ### Training Procedure
87
-
88
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
89
-
90
- #### Preprocessing [optional]
91
-
92
- [More Information Needed]
93
-
94
-
95
- #### Training Hyperparameters
96
-
97
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
98
-
99
- #### Speeds, Sizes, Times [optional]
100
-
101
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
102
-
103
- [More Information Needed]
104
-
105
- ## Evaluation
106
-
107
- <!-- This section describes the evaluation protocols and provides the results. -->
108
-
109
- ### Testing Data, Factors & Metrics
110
-
111
- #### Testing Data
112
-
113
- <!-- This should link to a Dataset Card if possible. -->
114
-
115
- [More Information Needed]
116
-
117
- #### Factors
118
-
119
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
120
-
121
- [More Information Needed]
122
-
123
- #### Metrics
124
-
125
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
126
-
127
- [More Information Needed]
128
-
129
- ### Results
130
-
131
- [More Information Needed]
132
-
133
- #### Summary
134
-
135
-
136
-
137
- ## Model Examination [optional]
138
-
139
- <!-- Relevant interpretability work for the model goes here -->
140
-
141
- [More Information Needed]
142
-
143
- ## Environmental Impact
144
-
145
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
146
-
147
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
148
-
149
- - **Hardware Type:** [More Information Needed]
150
- - **Hours used:** [More Information Needed]
151
- - **Cloud Provider:** [More Information Needed]
152
- - **Compute Region:** [More Information Needed]
153
- - **Carbon Emitted:** [More Information Needed]
154
-
155
- ## Technical Specifications [optional]
156
-
157
- ### Model Architecture and Objective
158
-
159
- [More Information Needed]
160
-
161
- ### Compute Infrastructure
162
-
163
- [More Information Needed]
164
-
165
- #### Hardware
166
-
167
- [More Information Needed]
168
-
169
- #### Software
170
-
171
- [More Information Needed]
172
-
173
- ## Citation [optional]
174
-
175
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
176
-
177
- **BibTeX:**
178
-
179
- [More Information Needed]
180
-
181
- **APA:**
182
-
183
- [More Information Needed]
184
-
185
- ## Glossary [optional]
186
-
187
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
188
-
189
- [More Information Needed]
190
-
191
- ## More Information [optional]
192
-
193
- [More Information Needed]
194
-
195
- ## Model Card Authors [optional]
196
-
197
- [More Information Needed]
198
-
199
- ## Model Card Contact
200
-
201
- [More Information Needed]
 
3
  tags:
4
  - trl
5
  - sft
6
+ - generated_from_trainer
7
+ model-index:
8
+ - name: llama_3b_step2_batch_v1
9
+ results: []
10
  ---
11
 
12
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
+ should probably proofread and complete it, then remove this comment. -->
14
+
15
+ # llama_3b_step2_batch_v1
16
+
17
+ This model was trained from scratch on an unknown dataset.
18
+ It achieves the following results on the evaluation set:
19
+ - Loss: 0.5060
20
+
21
+ ## Model description
22
+
23
+ More information needed
24
+
25
+ ## Intended uses & limitations
26
+
27
+ More information needed
28
+
29
+ ## Training and evaluation data
30
+
31
+ More information needed
32
+
33
+ ## Training procedure
34
+
35
+ ### Training hyperparameters
36
+
37
+ The following hyperparameters were used during training:
38
+ - learning_rate: 1e-05
39
+ - train_batch_size: 1
40
+ - eval_batch_size: 40
41
+ - seed: 42
42
+ - gradient_accumulation_steps: 4
43
+ - total_train_batch_size: 4
44
+ - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
45
+ - lr_scheduler_type: linear
46
+ - num_epochs: 2
47
+
48
+ ### Training results
49
+
50
+ | Training Loss | Epoch | Step | Validation Loss |
51
+ |:-------------:|:------:|:----:|:---------------:|
52
+ | 1.0531 | 0.0170 | 50 | 1.2007 |
53
+ | 1.0336 | 0.0341 | 100 | 1.1242 |
54
+ | 0.9428 | 0.0511 | 150 | 1.0800 |
55
+ | 1.4386 | 0.0682 | 200 | 1.0408 |
56
+ | 0.8375 | 0.0852 | 250 | 1.0127 |
57
+ | 0.9193 | 0.1023 | 300 | 0.9817 |
58
+ | 1.0368 | 0.1193 | 350 | 0.9573 |
59
+ | 1.2018 | 0.1364 | 400 | 0.9319 |
60
+ | 1.2749 | 0.1534 | 450 | 0.9072 |
61
+ | 0.9881 | 0.1704 | 500 | 0.8820 |
62
+ | 0.9707 | 0.1875 | 550 | 0.8599 |
63
+ | 1.2377 | 0.2045 | 600 | 0.8412 |
64
+ | 0.9024 | 0.2216 | 650 | 0.8180 |
65
+ | 0.5889 | 0.2386 | 700 | 0.8024 |
66
+ | 0.8046 | 0.2557 | 750 | 0.7899 |
67
+ | 0.83 | 0.2727 | 800 | 0.7710 |
68
+ | 0.6852 | 0.2898 | 850 | 0.7548 |
69
+ | 0.8512 | 0.3068 | 900 | 0.7422 |
70
+ | 0.8377 | 0.3238 | 950 | 0.7345 |
71
+ | 0.5361 | 0.3409 | 1000 | 0.7220 |
72
+ | 0.7696 | 0.3579 | 1050 | 0.7105 |
73
+ | 0.8175 | 0.3750 | 1100 | 0.7013 |
74
+ | 0.6144 | 0.3920 | 1150 | 0.6886 |
75
+ | 0.3598 | 0.4091 | 1200 | 0.6809 |
76
+ | 0.7176 | 0.4261 | 1250 | 0.6692 |
77
+ | 0.5281 | 0.4432 | 1300 | 0.6644 |
78
+ | 0.3555 | 0.4602 | 1350 | 0.6547 |
79
+ | 0.9024 | 0.4772 | 1400 | 0.6471 |
80
+ | 0.7713 | 0.4943 | 1450 | 0.6386 |
81
+ | 0.6172 | 0.5113 | 1500 | 0.6322 |
82
+ | 0.6325 | 0.5284 | 1550 | 0.6266 |
83
+ | 0.7503 | 0.5454 | 1600 | 0.6206 |
84
+ | 0.349 | 0.5625 | 1650 | 0.6136 |
85
+ | 0.7 | 0.5795 | 1700 | 0.6085 |
86
+ | 0.5014 | 0.5966 | 1750 | 0.6023 |
87
+ | 0.6441 | 0.6136 | 1800 | 0.5975 |
88
+ | 0.5066 | 0.6306 | 1850 | 0.5921 |
89
+ | 0.6036 | 0.6477 | 1900 | 0.5883 |
90
+ | 0.6549 | 0.6647 | 1950 | 0.5840 |
91
+ | 0.3903 | 0.6818 | 2000 | 0.5789 |
92
+ | 0.8864 | 0.6988 | 2050 | 0.5754 |
93
+ | 0.7164 | 0.7159 | 2100 | 0.5709 |
94
+ | 0.5504 | 0.7329 | 2150 | 0.5687 |
95
+ | 0.4216 | 0.7500 | 2200 | 0.5646 |
96
+ | 0.4241 | 0.7670 | 2250 | 0.5618 |
97
+ | 0.6452 | 0.7840 | 2300 | 0.5590 |
98
+ | 0.7067 | 0.8011 | 2350 | 0.5558 |
99
+ | 0.4536 | 0.8181 | 2400 | 0.5537 |
100
+ | 0.8657 | 0.8352 | 2450 | 0.5508 |
101
+ | 0.7452 | 0.8522 | 2500 | 0.5483 |
102
+ | 0.3444 | 0.8693 | 2550 | 0.5458 |
103
+ | 0.2889 | 0.8863 | 2600 | 0.5437 |
104
+ | 0.2415 | 0.9034 | 2650 | 0.5401 |
105
+ | 0.5393 | 0.9204 | 2700 | 0.5385 |
106
+ | 0.4866 | 0.9374 | 2750 | 0.5372 |
107
+ | 0.9233 | 0.9545 | 2800 | 0.5347 |
108
+ | 0.4623 | 0.9715 | 2850 | 0.5318 |
109
+ | 0.4211 | 0.9886 | 2900 | 0.5299 |
110
+ | 0.4308 | 1.0056 | 2950 | 0.5283 |
111
+ | 0.618 | 1.0227 | 3000 | 0.5285 |
112
+ | 0.7693 | 1.0397 | 3050 | 0.5262 |
113
+ | 0.2893 | 1.0568 | 3100 | 0.5266 |
114
+ | 0.461 | 1.0738 | 3150 | 0.5273 |
115
+ | 0.3648 | 1.0908 | 3200 | 0.5230 |
116
+ | 0.4981 | 1.1079 | 3250 | 0.5253 |
117
+ | 0.5005 | 1.1249 | 3300 | 0.5222 |
118
+ | 0.4117 | 1.1420 | 3350 | 0.5217 |
119
+ | 0.3319 | 1.1590 | 3400 | 0.5188 |
120
+ | 0.2549 | 1.1761 | 3450 | 0.5190 |
121
+ | 0.3758 | 1.1931 | 3500 | 0.5186 |
122
+ | 0.2889 | 1.2102 | 3550 | 0.5173 |
123
+ | 0.6341 | 1.2272 | 3600 | 0.5167 |
124
+ | 0.3217 | 1.2442 | 3650 | 0.5155 |
125
+ | 0.4406 | 1.2613 | 3700 | 0.5150 |
126
+ | 0.7445 | 1.2783 | 3750 | 0.5148 |
127
+ | 0.5511 | 1.2954 | 3800 | 0.5133 |
128
+ | 0.3933 | 1.3124 | 3850 | 0.5125 |
129
+ | 0.39 | 1.3295 | 3900 | 0.5134 |
130
+ | 0.3015 | 1.3465 | 3950 | 0.5126 |
131
+ | 0.8124 | 1.3636 | 4000 | 0.5118 |
132
+ | 0.6512 | 1.3806 | 4050 | 0.5111 |
133
+ | 0.7011 | 1.3976 | 4100 | 0.5106 |
134
+ | 0.4556 | 1.4147 | 4150 | 0.5103 |
135
+ | 0.4563 | 1.4317 | 4200 | 0.5100 |
136
+ | 0.2651 | 1.4488 | 4250 | 0.5100 |
137
+ | 0.5674 | 1.4658 | 4300 | 0.5090 |
138
+ | 0.2869 | 1.4829 | 4350 | 0.5093 |
139
+ | 0.5327 | 1.4999 | 4400 | 0.5088 |
140
+ | 0.726 | 1.5170 | 4450 | 0.5086 |
141
+ | 0.2619 | 1.5340 | 4500 | 0.5084 |
142
+ | 0.6597 | 1.5510 | 4550 | 0.5081 |
143
+ | 0.4848 | 1.5681 | 4600 | 0.5083 |
144
+ | 0.412 | 1.5851 | 4650 | 0.5080 |
145
+ | 0.6712 | 1.6022 | 4700 | 0.5077 |
146
+ | 0.5523 | 1.6192 | 4750 | 0.5076 |
147
+ | 0.5105 | 1.6363 | 4800 | 0.5077 |
148
+ | 0.5315 | 1.6533 | 4850 | 0.5071 |
149
+ | 0.4166 | 1.6704 | 4900 | 0.5069 |
150
+ | 0.4081 | 1.6874 | 4950 | 0.5065 |
151
+ | 0.3154 | 1.7044 | 5000 | 0.5063 |
152
+ | 0.396 | 1.7215 | 5050 | 0.5063 |
153
+ | 0.6121 | 1.7385 | 5100 | 0.5064 |
154
+ | 0.379 | 1.7556 | 5150 | 0.5063 |
155
+ | 0.4534 | 1.7726 | 5200 | 0.5061 |
156
+ | 0.5572 | 1.7897 | 5250 | 0.5060 |
157
+ | 0.3847 | 1.8067 | 5300 | 0.5059 |
158
+ | 0.3751 | 1.8238 | 5350 | 0.5060 |
159
+ | 0.4346 | 1.8408 | 5400 | 0.5061 |
160
+ | 0.4928 | 1.8578 | 5450 | 0.5061 |
161
+ | 0.5215 | 1.8749 | 5500 | 0.5060 |
162
+ | 0.6156 | 1.8919 | 5550 | 0.5060 |
163
+ | 0.4041 | 1.9090 | 5600 | 0.5060 |
164
+ | 0.5604 | 1.9260 | 5650 | 0.5059 |
165
+ | 0.424 | 1.9431 | 5700 | 0.5060 |
166
+ | 0.1856 | 1.9601 | 5750 | 0.5060 |
167
+ | 0.3701 | 1.9772 | 5800 | 0.5061 |
168
+ | 0.4201 | 1.9942 | 5850 | 0.5060 |
169
+
170
+
171
+ ### Framework versions
172
+
173
+ - Transformers 4.46.1
174
+ - Pytorch 2.1.0+cu118
175
+ - Datasets 3.0.2
176
+ - Tokenizers 0.20.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
args_v1.txt ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ max_seq_length = 500
2
+
3
+ def fmt(examples):
4
+ print(len(examples))
5
+ return examples
6
+
7
+ # 'lora_r' is the dimension of the LoRA attention.
8
+ lora_r = 32
9
+
10
+ # 'lora_alpha' is the alpha parameter for LoRA scaling.
11
+ lora_alpha = 16
12
+
13
+ # 'lora_dropout' is the dropout probability for LoRA layers.
14
+ lora_dropout = 0.05
15
+
16
+ # 'target_modules' is a list of the modules that should be targeted by LoRA.
17
+ target_modules= ['k_proj', 'q_proj', 'v_proj', 'o_proj', "gate_proj", "down_proj", "up_proj"]
18
+
19
+ # 'se
20
+
21
+ peft_config = LoraConfig(
22
+ r=lora_r,
23
+ lora_alpha=lora_alpha,
24
+ lora_dropout=lora_dropout,
25
+ task_type=TaskType.CAUSAL_LM,
26
+ target_modules=target_modules,
27
+ )
28
+
29
+ trainer = SFTTrainer(
30
+ model = model,
31
+ tokenizer = tokenizer,
32
+ train_dataset = qa_dataset['train'],
33
+ eval_dataset = qa_dataset['test'],
34
+ dataset_text_field = "text",
35
+ max_seq_length = max_seq_length,
36
+ dataset_num_proc = 4,
37
+ data_collator = collator,
38
+ # formatting_func = fmt,
39
+ # peft_config=peft_config,
40
+ args = TrainingArguments(
41
+ per_device_train_batch_size = 1,
42
+ gradient_checkpointing = True,
43
+ gradient_accumulation_steps = 4,
44
+ per_device_eval_batch_size = 40,
45
+ do_eval = True,
46
+ eval_strategy = 'steps',
47
+ eval_steps = 50,
48
+ # save_strategy = 'steps',
49
+ save_steps = 1000,
50
+
51
+ # Use num_train_epochs and warmup_ratio for longer runs!
52
+ # max_steps = 70,
53
+ # warmup_steps = 10,
54
+ # warmup_ratio = 0.1,
55
+ num_train_epochs = 2,
56
+
57
+ # Select a 2 to 10x smaller learning rate for the embedding matrices!
58
+ learning_rate = 1e-5,
59
+ # embedding_learning_rate = 1e-6,
60
+
61
+ # fp16 = not is_bfloat16_supported(),
62
+ bf16 = True,
63
+ logging_steps = 1,
64
+ optim = "adamw_torch",
65
+ weight_decay = 0.00,
66
+ lr_scheduler_type = "linear",
67
+ # seed = 3407,
68
+
69
+ output_dir = "llama_3b_step2_batch_v1",
70
+ ),
71
+ )
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d1dda7f4027338634ae65de01b3aae9e2f272bfcb78432f7bb9f9dbbec1c69d
3
+ size 5240