Tharun007 commited on
Commit
d6e6ec4
·
verified ·
1 Parent(s): 8684641

Upload folder using huggingface_hub

Browse files
Files changed (44) hide show
  1. .gitattributes +3 -0
  2. qwen2-7b-commitpackft-lora-final/README.md +207 -0
  3. qwen2-7b-commitpackft-lora-final/adapter_config.json +37 -0
  4. qwen2-7b-commitpackft-lora-final/adapter_model.safetensors +3 -0
  5. qwen2-7b-commitpackft-lora-final/added_tokens.json +5 -0
  6. qwen2-7b-commitpackft-lora-final/chat_template.jinja +6 -0
  7. qwen2-7b-commitpackft-lora-final/merges.txt +0 -0
  8. qwen2-7b-commitpackft-lora-final/special_tokens_map.json +14 -0
  9. qwen2-7b-commitpackft-lora-final/tokenizer.json +3 -0
  10. qwen2-7b-commitpackft-lora-final/tokenizer_config.json +43 -0
  11. qwen2-7b-commitpackft-lora-final/vocab.json +0 -0
  12. qwen2-7b-commitpackft-lora/checkpoint-352/README.md +207 -0
  13. qwen2-7b-commitpackft-lora/checkpoint-352/adapter_config.json +37 -0
  14. qwen2-7b-commitpackft-lora/checkpoint-352/adapter_model.safetensors +3 -0
  15. qwen2-7b-commitpackft-lora/checkpoint-352/added_tokens.json +5 -0
  16. qwen2-7b-commitpackft-lora/checkpoint-352/chat_template.jinja +6 -0
  17. qwen2-7b-commitpackft-lora/checkpoint-352/merges.txt +0 -0
  18. qwen2-7b-commitpackft-lora/checkpoint-352/optimizer.pt +3 -0
  19. qwen2-7b-commitpackft-lora/checkpoint-352/rng_state.pth +3 -0
  20. qwen2-7b-commitpackft-lora/checkpoint-352/scaler.pt +3 -0
  21. qwen2-7b-commitpackft-lora/checkpoint-352/scheduler.pt +3 -0
  22. qwen2-7b-commitpackft-lora/checkpoint-352/special_tokens_map.json +14 -0
  23. qwen2-7b-commitpackft-lora/checkpoint-352/tokenizer.json +3 -0
  24. qwen2-7b-commitpackft-lora/checkpoint-352/tokenizer_config.json +43 -0
  25. qwen2-7b-commitpackft-lora/checkpoint-352/trainer_state.json +83 -0
  26. qwen2-7b-commitpackft-lora/checkpoint-352/training_args.bin +3 -0
  27. qwen2-7b-commitpackft-lora/checkpoint-352/vocab.json +0 -0
  28. qwen2-7b-commitpackft-lora/checkpoint-528/README.md +207 -0
  29. qwen2-7b-commitpackft-lora/checkpoint-528/adapter_config.json +37 -0
  30. qwen2-7b-commitpackft-lora/checkpoint-528/adapter_model.safetensors +3 -0
  31. qwen2-7b-commitpackft-lora/checkpoint-528/added_tokens.json +5 -0
  32. qwen2-7b-commitpackft-lora/checkpoint-528/chat_template.jinja +6 -0
  33. qwen2-7b-commitpackft-lora/checkpoint-528/merges.txt +0 -0
  34. qwen2-7b-commitpackft-lora/checkpoint-528/optimizer.pt +3 -0
  35. qwen2-7b-commitpackft-lora/checkpoint-528/rng_state.pth +3 -0
  36. qwen2-7b-commitpackft-lora/checkpoint-528/scaler.pt +3 -0
  37. qwen2-7b-commitpackft-lora/checkpoint-528/scheduler.pt +3 -0
  38. qwen2-7b-commitpackft-lora/checkpoint-528/special_tokens_map.json +14 -0
  39. qwen2-7b-commitpackft-lora/checkpoint-528/tokenizer.json +3 -0
  40. qwen2-7b-commitpackft-lora/checkpoint-528/tokenizer_config.json +43 -0
  41. qwen2-7b-commitpackft-lora/checkpoint-528/trainer_state.json +104 -0
  42. qwen2-7b-commitpackft-lora/checkpoint-528/training_args.bin +3 -0
  43. qwen2-7b-commitpackft-lora/checkpoint-528/vocab.json +0 -0
  44. qwen2-finetune.ipynb +522 -0
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ qwen2-7b-commitpackft-lora/checkpoint-352/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ qwen2-7b-commitpackft-lora/checkpoint-528/tokenizer.json filter=lfs diff=lfs merge=lfs -text
38
+ qwen2-7b-commitpackft-lora-final/tokenizer.json filter=lfs diff=lfs merge=lfs -text
qwen2-7b-commitpackft-lora-final/README.md ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen2-7B-Instruct
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:Qwen/Qwen2-7B-Instruct
7
+ - lora
8
+ - transformers
9
+ ---
10
+
11
+ # Model Card for Model ID
12
+
13
+ <!-- Provide a quick summary of what the model is/does. -->
14
+
15
+
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+
21
+ <!-- Provide a longer summary of what this model is. -->
22
+
23
+
24
+
25
+ - **Developed by:** [More Information Needed]
26
+ - **Funded by [optional]:** [More Information Needed]
27
+ - **Shared by [optional]:** [More Information Needed]
28
+ - **Model type:** [More Information Needed]
29
+ - **Language(s) (NLP):** [More Information Needed]
30
+ - **License:** [More Information Needed]
31
+ - **Finetuned from model [optional]:** [More Information Needed]
32
+
33
+ ### Model Sources [optional]
34
+
35
+ <!-- Provide the basic links for the model. -->
36
+
37
+ - **Repository:** [More Information Needed]
38
+ - **Paper [optional]:** [More Information Needed]
39
+ - **Demo [optional]:** [More Information Needed]
40
+
41
+ ## Uses
42
+
43
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
44
+
45
+ ### Direct Use
46
+
47
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
48
+
49
+ [More Information Needed]
50
+
51
+ ### Downstream Use [optional]
52
+
53
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
54
+
55
+ [More Information Needed]
56
+
57
+ ### Out-of-Scope Use
58
+
59
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
60
+
61
+ [More Information Needed]
62
+
63
+ ## Bias, Risks, and Limitations
64
+
65
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
66
+
67
+ [More Information Needed]
68
+
69
+ ### Recommendations
70
+
71
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
72
+
73
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
74
+
75
+ ## How to Get Started with the Model
76
+
77
+ Use the code below to get started with the model.
78
+
79
+ [More Information Needed]
80
+
81
+ ## Training Details
82
+
83
+ ### Training Data
84
+
85
+ <!-- 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. -->
86
+
87
+ [More Information Needed]
88
+
89
+ ### Training Procedure
90
+
91
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
92
+
93
+ #### Preprocessing [optional]
94
+
95
+ [More Information Needed]
96
+
97
+
98
+ #### Training Hyperparameters
99
+
100
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
101
+
102
+ #### Speeds, Sizes, Times [optional]
103
+
104
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
105
+
106
+ [More Information Needed]
107
+
108
+ ## Evaluation
109
+
110
+ <!-- This section describes the evaluation protocols and provides the results. -->
111
+
112
+ ### Testing Data, Factors & Metrics
113
+
114
+ #### Testing Data
115
+
116
+ <!-- This should link to a Dataset Card if possible. -->
117
+
118
+ [More Information Needed]
119
+
120
+ #### Factors
121
+
122
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
123
+
124
+ [More Information Needed]
125
+
126
+ #### Metrics
127
+
128
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
129
+
130
+ [More Information Needed]
131
+
132
+ ### Results
133
+
134
+ [More Information Needed]
135
+
136
+ #### Summary
137
+
138
+
139
+
140
+ ## Model Examination [optional]
141
+
142
+ <!-- Relevant interpretability work for the model goes here -->
143
+
144
+ [More Information Needed]
145
+
146
+ ## Environmental Impact
147
+
148
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
149
+
150
+ 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).
151
+
152
+ - **Hardware Type:** [More Information Needed]
153
+ - **Hours used:** [More Information Needed]
154
+ - **Cloud Provider:** [More Information Needed]
155
+ - **Compute Region:** [More Information Needed]
156
+ - **Carbon Emitted:** [More Information Needed]
157
+
158
+ ## Technical Specifications [optional]
159
+
160
+ ### Model Architecture and Objective
161
+
162
+ [More Information Needed]
163
+
164
+ ### Compute Infrastructure
165
+
166
+ [More Information Needed]
167
+
168
+ #### Hardware
169
+
170
+ [More Information Needed]
171
+
172
+ #### Software
173
+
174
+ [More Information Needed]
175
+
176
+ ## Citation [optional]
177
+
178
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
179
+
180
+ **BibTeX:**
181
+
182
+ [More Information Needed]
183
+
184
+ **APA:**
185
+
186
+ [More Information Needed]
187
+
188
+ ## Glossary [optional]
189
+
190
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
191
+
192
+ [More Information Needed]
193
+
194
+ ## More Information [optional]
195
+
196
+ [More Information Needed]
197
+
198
+ ## Model Card Authors [optional]
199
+
200
+ [More Information Needed]
201
+
202
+ ## Model Card Contact
203
+
204
+ [More Information Needed]
205
+ ### Framework versions
206
+
207
+ - PEFT 0.17.1
qwen2-7b-commitpackft-lora-final/adapter_config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "Qwen/Qwen2-7B-Instruct",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 32,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0.05,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "qalora_group_size": 16,
24
+ "r": 16,
25
+ "rank_pattern": {},
26
+ "revision": null,
27
+ "target_modules": [
28
+ "q_proj",
29
+ "v_proj"
30
+ ],
31
+ "target_parameters": null,
32
+ "task_type": "CAUSAL_LM",
33
+ "trainable_token_indices": null,
34
+ "use_dora": false,
35
+ "use_qalora": false,
36
+ "use_rslora": false
37
+ }
qwen2-7b-commitpackft-lora-final/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73daf2e5d58f6bc6c45949042c4d30ae952c1c941427e5d9f4e25d750c0ae45e
3
+ size 20200056
qwen2-7b-commitpackft-lora-final/added_tokens.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "<|endoftext|>": 151643,
3
+ "<|im_end|>": 151645,
4
+ "<|im_start|>": 151644
5
+ }
qwen2-7b-commitpackft-lora-final/chat_template.jinja ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system
2
+ You are a helpful assistant.<|im_end|>
3
+ ' }}{% endif %}{{'<|im_start|>' + message['role'] + '
4
+ ' + message['content'] + '<|im_end|>' + '
5
+ '}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
6
+ ' }}{% endif %}
qwen2-7b-commitpackft-lora-final/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
qwen2-7b-commitpackft-lora-final/special_tokens_map.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>"
5
+ ],
6
+ "eos_token": {
7
+ "content": "<|im_end|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "pad_token": "<|im_end|>"
14
+ }
qwen2-7b-commitpackft-lora-final/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcfe42da0a4497e8b2b172c1f9f4ec423a46dc12907f4349c55025f670422ba9
3
+ size 11418266
qwen2-7b-commitpackft-lora-final/tokenizer_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "151643": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "151644": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "151645": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ }
28
+ },
29
+ "additional_special_tokens": [
30
+ "<|im_start|>",
31
+ "<|im_end|>"
32
+ ],
33
+ "bos_token": null,
34
+ "clean_up_tokenization_spaces": false,
35
+ "eos_token": "<|im_end|>",
36
+ "errors": "replace",
37
+ "extra_special_tokens": {},
38
+ "model_max_length": 131072,
39
+ "pad_token": "<|im_end|>",
40
+ "split_special_tokens": false,
41
+ "tokenizer_class": "Qwen2Tokenizer",
42
+ "unk_token": null
43
+ }
qwen2-7b-commitpackft-lora-final/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
qwen2-7b-commitpackft-lora/checkpoint-352/README.md ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen2-7B-Instruct
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:Qwen/Qwen2-7B-Instruct
7
+ - lora
8
+ - transformers
9
+ ---
10
+
11
+ # Model Card for Model ID
12
+
13
+ <!-- Provide a quick summary of what the model is/does. -->
14
+
15
+
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+
21
+ <!-- Provide a longer summary of what this model is. -->
22
+
23
+
24
+
25
+ - **Developed by:** [More Information Needed]
26
+ - **Funded by [optional]:** [More Information Needed]
27
+ - **Shared by [optional]:** [More Information Needed]
28
+ - **Model type:** [More Information Needed]
29
+ - **Language(s) (NLP):** [More Information Needed]
30
+ - **License:** [More Information Needed]
31
+ - **Finetuned from model [optional]:** [More Information Needed]
32
+
33
+ ### Model Sources [optional]
34
+
35
+ <!-- Provide the basic links for the model. -->
36
+
37
+ - **Repository:** [More Information Needed]
38
+ - **Paper [optional]:** [More Information Needed]
39
+ - **Demo [optional]:** [More Information Needed]
40
+
41
+ ## Uses
42
+
43
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
44
+
45
+ ### Direct Use
46
+
47
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
48
+
49
+ [More Information Needed]
50
+
51
+ ### Downstream Use [optional]
52
+
53
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
54
+
55
+ [More Information Needed]
56
+
57
+ ### Out-of-Scope Use
58
+
59
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
60
+
61
+ [More Information Needed]
62
+
63
+ ## Bias, Risks, and Limitations
64
+
65
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
66
+
67
+ [More Information Needed]
68
+
69
+ ### Recommendations
70
+
71
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
72
+
73
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
74
+
75
+ ## How to Get Started with the Model
76
+
77
+ Use the code below to get started with the model.
78
+
79
+ [More Information Needed]
80
+
81
+ ## Training Details
82
+
83
+ ### Training Data
84
+
85
+ <!-- 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. -->
86
+
87
+ [More Information Needed]
88
+
89
+ ### Training Procedure
90
+
91
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
92
+
93
+ #### Preprocessing [optional]
94
+
95
+ [More Information Needed]
96
+
97
+
98
+ #### Training Hyperparameters
99
+
100
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
101
+
102
+ #### Speeds, Sizes, Times [optional]
103
+
104
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
105
+
106
+ [More Information Needed]
107
+
108
+ ## Evaluation
109
+
110
+ <!-- This section describes the evaluation protocols and provides the results. -->
111
+
112
+ ### Testing Data, Factors & Metrics
113
+
114
+ #### Testing Data
115
+
116
+ <!-- This should link to a Dataset Card if possible. -->
117
+
118
+ [More Information Needed]
119
+
120
+ #### Factors
121
+
122
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
123
+
124
+ [More Information Needed]
125
+
126
+ #### Metrics
127
+
128
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
129
+
130
+ [More Information Needed]
131
+
132
+ ### Results
133
+
134
+ [More Information Needed]
135
+
136
+ #### Summary
137
+
138
+
139
+
140
+ ## Model Examination [optional]
141
+
142
+ <!-- Relevant interpretability work for the model goes here -->
143
+
144
+ [More Information Needed]
145
+
146
+ ## Environmental Impact
147
+
148
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
149
+
150
+ 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).
151
+
152
+ - **Hardware Type:** [More Information Needed]
153
+ - **Hours used:** [More Information Needed]
154
+ - **Cloud Provider:** [More Information Needed]
155
+ - **Compute Region:** [More Information Needed]
156
+ - **Carbon Emitted:** [More Information Needed]
157
+
158
+ ## Technical Specifications [optional]
159
+
160
+ ### Model Architecture and Objective
161
+
162
+ [More Information Needed]
163
+
164
+ ### Compute Infrastructure
165
+
166
+ [More Information Needed]
167
+
168
+ #### Hardware
169
+
170
+ [More Information Needed]
171
+
172
+ #### Software
173
+
174
+ [More Information Needed]
175
+
176
+ ## Citation [optional]
177
+
178
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
179
+
180
+ **BibTeX:**
181
+
182
+ [More Information Needed]
183
+
184
+ **APA:**
185
+
186
+ [More Information Needed]
187
+
188
+ ## Glossary [optional]
189
+
190
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
191
+
192
+ [More Information Needed]
193
+
194
+ ## More Information [optional]
195
+
196
+ [More Information Needed]
197
+
198
+ ## Model Card Authors [optional]
199
+
200
+ [More Information Needed]
201
+
202
+ ## Model Card Contact
203
+
204
+ [More Information Needed]
205
+ ### Framework versions
206
+
207
+ - PEFT 0.17.1
qwen2-7b-commitpackft-lora/checkpoint-352/adapter_config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "Qwen/Qwen2-7B-Instruct",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 32,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0.05,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "qalora_group_size": 16,
24
+ "r": 16,
25
+ "rank_pattern": {},
26
+ "revision": null,
27
+ "target_modules": [
28
+ "q_proj",
29
+ "v_proj"
30
+ ],
31
+ "target_parameters": null,
32
+ "task_type": "CAUSAL_LM",
33
+ "trainable_token_indices": null,
34
+ "use_dora": false,
35
+ "use_qalora": false,
36
+ "use_rslora": false
37
+ }
qwen2-7b-commitpackft-lora/checkpoint-352/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16c3c11b05de2b97aaefdf7a68e10cf46accf46aa85264f140c9195dd57f15a8
3
+ size 20200056
qwen2-7b-commitpackft-lora/checkpoint-352/added_tokens.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "<|endoftext|>": 151643,
3
+ "<|im_end|>": 151645,
4
+ "<|im_start|>": 151644
5
+ }
qwen2-7b-commitpackft-lora/checkpoint-352/chat_template.jinja ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system
2
+ You are a helpful assistant.<|im_end|>
3
+ ' }}{% endif %}{{'<|im_start|>' + message['role'] + '
4
+ ' + message['content'] + '<|im_end|>' + '
5
+ '}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
6
+ ' }}{% endif %}
qwen2-7b-commitpackft-lora/checkpoint-352/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
qwen2-7b-commitpackft-lora/checkpoint-352/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:835152a734a83b9683275fa5ba1907304e3fd50d16a35cb503d5db7158b9e434
3
+ size 40466443
qwen2-7b-commitpackft-lora/checkpoint-352/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1308f6b2fade250ef62416ffe329f2383295ca36bacfb10a7f84d8acd690afa
3
+ size 14645
qwen2-7b-commitpackft-lora/checkpoint-352/scaler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:edfe6f2786141265307b771141da9e10c3bd8b16f7cf5e238280fdd25f38e919
3
+ size 1383
qwen2-7b-commitpackft-lora/checkpoint-352/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27f6d97bd79641ac48a4eca561192eeec39003cb5168dc16074a35d937944926
3
+ size 1465
qwen2-7b-commitpackft-lora/checkpoint-352/special_tokens_map.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>"
5
+ ],
6
+ "eos_token": {
7
+ "content": "<|im_end|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "pad_token": "<|im_end|>"
14
+ }
qwen2-7b-commitpackft-lora/checkpoint-352/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcfe42da0a4497e8b2b172c1f9f4ec423a46dc12907f4349c55025f670422ba9
3
+ size 11418266
qwen2-7b-commitpackft-lora/checkpoint-352/tokenizer_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "151643": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "151644": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "151645": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ }
28
+ },
29
+ "additional_special_tokens": [
30
+ "<|im_start|>",
31
+ "<|im_end|>"
32
+ ],
33
+ "bos_token": null,
34
+ "clean_up_tokenization_spaces": false,
35
+ "eos_token": "<|im_end|>",
36
+ "errors": "replace",
37
+ "extra_special_tokens": {},
38
+ "model_max_length": 131072,
39
+ "pad_token": "<|im_end|>",
40
+ "split_special_tokens": false,
41
+ "tokenizer_class": "Qwen2Tokenizer",
42
+ "unk_token": null
43
+ }
qwen2-7b-commitpackft-lora/checkpoint-352/trainer_state.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 2.0,
6
+ "eval_steps": 500,
7
+ "global_step": 352,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.28551034975017847,
14
+ "grad_norm": 0.1307421177625656,
15
+ "learning_rate": 0.00018143939393939395,
16
+ "loss": 0.6947,
17
+ "step": 50
18
+ },
19
+ {
20
+ "epoch": 0.5710206995003569,
21
+ "grad_norm": 0.13502074778079987,
22
+ "learning_rate": 0.00016250000000000002,
23
+ "loss": 0.5291,
24
+ "step": 100
25
+ },
26
+ {
27
+ "epoch": 0.8565310492505354,
28
+ "grad_norm": 0.11538226157426834,
29
+ "learning_rate": 0.00014356060606060607,
30
+ "loss": 0.5294,
31
+ "step": 150
32
+ },
33
+ {
34
+ "epoch": 1.1370449678800856,
35
+ "grad_norm": 0.12343299388885498,
36
+ "learning_rate": 0.00012462121212121211,
37
+ "loss": 0.5218,
38
+ "step": 200
39
+ },
40
+ {
41
+ "epoch": 1.422555317630264,
42
+ "grad_norm": 0.10965840518474579,
43
+ "learning_rate": 0.00010568181818181819,
44
+ "loss": 0.5029,
45
+ "step": 250
46
+ },
47
+ {
48
+ "epoch": 1.7080656673804424,
49
+ "grad_norm": 0.11586486548185349,
50
+ "learning_rate": 8.674242424242425e-05,
51
+ "loss": 0.5026,
52
+ "step": 300
53
+ },
54
+ {
55
+ "epoch": 1.993576017130621,
56
+ "grad_norm": 0.1560799926519394,
57
+ "learning_rate": 6.78030303030303e-05,
58
+ "loss": 0.5231,
59
+ "step": 350
60
+ }
61
+ ],
62
+ "logging_steps": 50,
63
+ "max_steps": 528,
64
+ "num_input_tokens_seen": 0,
65
+ "num_train_epochs": 3,
66
+ "save_steps": 500,
67
+ "stateful_callbacks": {
68
+ "TrainerControl": {
69
+ "args": {
70
+ "should_epoch_stop": false,
71
+ "should_evaluate": false,
72
+ "should_log": false,
73
+ "should_save": true,
74
+ "should_training_stop": false
75
+ },
76
+ "attributes": {}
77
+ }
78
+ },
79
+ "total_flos": 1.2176756003517235e+17,
80
+ "train_batch_size": 2,
81
+ "trial_name": null,
82
+ "trial_params": null
83
+ }
qwen2-7b-commitpackft-lora/checkpoint-352/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67d35dafe077b66520bf707bd5b750e11840108d94f0dbc9a06e3580c3a40c2a
3
+ size 5777
qwen2-7b-commitpackft-lora/checkpoint-352/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
qwen2-7b-commitpackft-lora/checkpoint-528/README.md ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen2-7B-Instruct
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:Qwen/Qwen2-7B-Instruct
7
+ - lora
8
+ - transformers
9
+ ---
10
+
11
+ # Model Card for Model ID
12
+
13
+ <!-- Provide a quick summary of what the model is/does. -->
14
+
15
+
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+
21
+ <!-- Provide a longer summary of what this model is. -->
22
+
23
+
24
+
25
+ - **Developed by:** [More Information Needed]
26
+ - **Funded by [optional]:** [More Information Needed]
27
+ - **Shared by [optional]:** [More Information Needed]
28
+ - **Model type:** [More Information Needed]
29
+ - **Language(s) (NLP):** [More Information Needed]
30
+ - **License:** [More Information Needed]
31
+ - **Finetuned from model [optional]:** [More Information Needed]
32
+
33
+ ### Model Sources [optional]
34
+
35
+ <!-- Provide the basic links for the model. -->
36
+
37
+ - **Repository:** [More Information Needed]
38
+ - **Paper [optional]:** [More Information Needed]
39
+ - **Demo [optional]:** [More Information Needed]
40
+
41
+ ## Uses
42
+
43
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
44
+
45
+ ### Direct Use
46
+
47
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
48
+
49
+ [More Information Needed]
50
+
51
+ ### Downstream Use [optional]
52
+
53
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
54
+
55
+ [More Information Needed]
56
+
57
+ ### Out-of-Scope Use
58
+
59
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
60
+
61
+ [More Information Needed]
62
+
63
+ ## Bias, Risks, and Limitations
64
+
65
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
66
+
67
+ [More Information Needed]
68
+
69
+ ### Recommendations
70
+
71
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
72
+
73
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
74
+
75
+ ## How to Get Started with the Model
76
+
77
+ Use the code below to get started with the model.
78
+
79
+ [More Information Needed]
80
+
81
+ ## Training Details
82
+
83
+ ### Training Data
84
+
85
+ <!-- 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. -->
86
+
87
+ [More Information Needed]
88
+
89
+ ### Training Procedure
90
+
91
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
92
+
93
+ #### Preprocessing [optional]
94
+
95
+ [More Information Needed]
96
+
97
+
98
+ #### Training Hyperparameters
99
+
100
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
101
+
102
+ #### Speeds, Sizes, Times [optional]
103
+
104
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
105
+
106
+ [More Information Needed]
107
+
108
+ ## Evaluation
109
+
110
+ <!-- This section describes the evaluation protocols and provides the results. -->
111
+
112
+ ### Testing Data, Factors & Metrics
113
+
114
+ #### Testing Data
115
+
116
+ <!-- This should link to a Dataset Card if possible. -->
117
+
118
+ [More Information Needed]
119
+
120
+ #### Factors
121
+
122
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
123
+
124
+ [More Information Needed]
125
+
126
+ #### Metrics
127
+
128
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
129
+
130
+ [More Information Needed]
131
+
132
+ ### Results
133
+
134
+ [More Information Needed]
135
+
136
+ #### Summary
137
+
138
+
139
+
140
+ ## Model Examination [optional]
141
+
142
+ <!-- Relevant interpretability work for the model goes here -->
143
+
144
+ [More Information Needed]
145
+
146
+ ## Environmental Impact
147
+
148
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
149
+
150
+ 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).
151
+
152
+ - **Hardware Type:** [More Information Needed]
153
+ - **Hours used:** [More Information Needed]
154
+ - **Cloud Provider:** [More Information Needed]
155
+ - **Compute Region:** [More Information Needed]
156
+ - **Carbon Emitted:** [More Information Needed]
157
+
158
+ ## Technical Specifications [optional]
159
+
160
+ ### Model Architecture and Objective
161
+
162
+ [More Information Needed]
163
+
164
+ ### Compute Infrastructure
165
+
166
+ [More Information Needed]
167
+
168
+ #### Hardware
169
+
170
+ [More Information Needed]
171
+
172
+ #### Software
173
+
174
+ [More Information Needed]
175
+
176
+ ## Citation [optional]
177
+
178
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
179
+
180
+ **BibTeX:**
181
+
182
+ [More Information Needed]
183
+
184
+ **APA:**
185
+
186
+ [More Information Needed]
187
+
188
+ ## Glossary [optional]
189
+
190
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
191
+
192
+ [More Information Needed]
193
+
194
+ ## More Information [optional]
195
+
196
+ [More Information Needed]
197
+
198
+ ## Model Card Authors [optional]
199
+
200
+ [More Information Needed]
201
+
202
+ ## Model Card Contact
203
+
204
+ [More Information Needed]
205
+ ### Framework versions
206
+
207
+ - PEFT 0.17.1
qwen2-7b-commitpackft-lora/checkpoint-528/adapter_config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "Qwen/Qwen2-7B-Instruct",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 32,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0.05,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "qalora_group_size": 16,
24
+ "r": 16,
25
+ "rank_pattern": {},
26
+ "revision": null,
27
+ "target_modules": [
28
+ "q_proj",
29
+ "v_proj"
30
+ ],
31
+ "target_parameters": null,
32
+ "task_type": "CAUSAL_LM",
33
+ "trainable_token_indices": null,
34
+ "use_dora": false,
35
+ "use_qalora": false,
36
+ "use_rslora": false
37
+ }
qwen2-7b-commitpackft-lora/checkpoint-528/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73daf2e5d58f6bc6c45949042c4d30ae952c1c941427e5d9f4e25d750c0ae45e
3
+ size 20200056
qwen2-7b-commitpackft-lora/checkpoint-528/added_tokens.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "<|endoftext|>": 151643,
3
+ "<|im_end|>": 151645,
4
+ "<|im_start|>": 151644
5
+ }
qwen2-7b-commitpackft-lora/checkpoint-528/chat_template.jinja ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system
2
+ You are a helpful assistant.<|im_end|>
3
+ ' }}{% endif %}{{'<|im_start|>' + message['role'] + '
4
+ ' + message['content'] + '<|im_end|>' + '
5
+ '}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
6
+ ' }}{% endif %}
qwen2-7b-commitpackft-lora/checkpoint-528/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
qwen2-7b-commitpackft-lora/checkpoint-528/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:142af714adc3574c15975a453aa271337ac75e7672b0f4ef5eb26181a50c66f9
3
+ size 40466443
qwen2-7b-commitpackft-lora/checkpoint-528/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d423fa4d00cbc6a351787764a0cbce8eb5c10e46c3382024ce3dcd8648a5f641
3
+ size 14645
qwen2-7b-commitpackft-lora/checkpoint-528/scaler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5fdd1a36f3bbbcea6b8062f359c0175b0022085d16d0e16e66eae10443c4cb3
3
+ size 1383
qwen2-7b-commitpackft-lora/checkpoint-528/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e49b91544c4a1784c4e83826d64bde15557e0f648672231532efef1b8eef895
3
+ size 1465
qwen2-7b-commitpackft-lora/checkpoint-528/special_tokens_map.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>"
5
+ ],
6
+ "eos_token": {
7
+ "content": "<|im_end|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "pad_token": "<|im_end|>"
14
+ }
qwen2-7b-commitpackft-lora/checkpoint-528/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcfe42da0a4497e8b2b172c1f9f4ec423a46dc12907f4349c55025f670422ba9
3
+ size 11418266
qwen2-7b-commitpackft-lora/checkpoint-528/tokenizer_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "151643": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "151644": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "151645": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ }
28
+ },
29
+ "additional_special_tokens": [
30
+ "<|im_start|>",
31
+ "<|im_end|>"
32
+ ],
33
+ "bos_token": null,
34
+ "clean_up_tokenization_spaces": false,
35
+ "eos_token": "<|im_end|>",
36
+ "errors": "replace",
37
+ "extra_special_tokens": {},
38
+ "model_max_length": 131072,
39
+ "pad_token": "<|im_end|>",
40
+ "split_special_tokens": false,
41
+ "tokenizer_class": "Qwen2Tokenizer",
42
+ "unk_token": null
43
+ }
qwen2-7b-commitpackft-lora/checkpoint-528/trainer_state.json ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 3.0,
6
+ "eval_steps": 500,
7
+ "global_step": 528,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.28551034975017847,
14
+ "grad_norm": 0.1307421177625656,
15
+ "learning_rate": 0.00018143939393939395,
16
+ "loss": 0.6947,
17
+ "step": 50
18
+ },
19
+ {
20
+ "epoch": 0.5710206995003569,
21
+ "grad_norm": 0.13502074778079987,
22
+ "learning_rate": 0.00016250000000000002,
23
+ "loss": 0.5291,
24
+ "step": 100
25
+ },
26
+ {
27
+ "epoch": 0.8565310492505354,
28
+ "grad_norm": 0.11538226157426834,
29
+ "learning_rate": 0.00014356060606060607,
30
+ "loss": 0.5294,
31
+ "step": 150
32
+ },
33
+ {
34
+ "epoch": 1.1370449678800856,
35
+ "grad_norm": 0.12343299388885498,
36
+ "learning_rate": 0.00012462121212121211,
37
+ "loss": 0.5218,
38
+ "step": 200
39
+ },
40
+ {
41
+ "epoch": 1.422555317630264,
42
+ "grad_norm": 0.10965840518474579,
43
+ "learning_rate": 0.00010568181818181819,
44
+ "loss": 0.5029,
45
+ "step": 250
46
+ },
47
+ {
48
+ "epoch": 1.7080656673804424,
49
+ "grad_norm": 0.11586486548185349,
50
+ "learning_rate": 8.674242424242425e-05,
51
+ "loss": 0.5026,
52
+ "step": 300
53
+ },
54
+ {
55
+ "epoch": 1.993576017130621,
56
+ "grad_norm": 0.1560799926519394,
57
+ "learning_rate": 6.78030303030303e-05,
58
+ "loss": 0.5231,
59
+ "step": 350
60
+ },
61
+ {
62
+ "epoch": 2.274089935760171,
63
+ "grad_norm": 0.1398245394229889,
64
+ "learning_rate": 4.886363636363637e-05,
65
+ "loss": 0.5195,
66
+ "step": 400
67
+ },
68
+ {
69
+ "epoch": 2.5596002855103497,
70
+ "grad_norm": 0.1260460615158081,
71
+ "learning_rate": 2.9924242424242427e-05,
72
+ "loss": 0.5049,
73
+ "step": 450
74
+ },
75
+ {
76
+ "epoch": 2.845110635260528,
77
+ "grad_norm": 0.11539369821548462,
78
+ "learning_rate": 1.0984848484848486e-05,
79
+ "loss": 0.4878,
80
+ "step": 500
81
+ }
82
+ ],
83
+ "logging_steps": 50,
84
+ "max_steps": 528,
85
+ "num_input_tokens_seen": 0,
86
+ "num_train_epochs": 3,
87
+ "save_steps": 500,
88
+ "stateful_callbacks": {
89
+ "TrainerControl": {
90
+ "args": {
91
+ "should_epoch_stop": false,
92
+ "should_evaluate": false,
93
+ "should_log": false,
94
+ "should_save": true,
95
+ "should_training_stop": true
96
+ },
97
+ "attributes": {}
98
+ }
99
+ },
100
+ "total_flos": 1.8265134005275853e+17,
101
+ "train_batch_size": 2,
102
+ "trial_name": null,
103
+ "trial_params": null
104
+ }
qwen2-7b-commitpackft-lora/checkpoint-528/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67d35dafe077b66520bf707bd5b750e11840108d94f0dbc9a06e3580c3a40c2a
3
+ size 5777
qwen2-7b-commitpackft-lora/checkpoint-528/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
qwen2-finetune.ipynb ADDED
@@ -0,0 +1,522 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "666ac2b7",
6
+ "metadata": {},
7
+ "source": [
8
+ "# Qwen2-7B-Instruct LoRA Fine-tuning with bigcode/commitpackft\n",
9
+ "\n",
10
+ "## Install required libraries"
11
+ ]
12
+ },
13
+ {
14
+ "cell_type": "code",
15
+ "execution_count": 1,
16
+ "id": "457fec89",
17
+ "metadata": {},
18
+ "outputs": [
19
+ {
20
+ "name": "stdout",
21
+ "output_type": "stream",
22
+ "text": [
23
+ "Note: you may need to restart the kernel to use updated packages.\n"
24
+ ]
25
+ }
26
+ ],
27
+ "source": [
28
+ "%pip install -q transformers accelerate peft datasets bitsandbytes trl"
29
+ ]
30
+ },
31
+ {
32
+ "cell_type": "markdown",
33
+ "id": "a1fc5166",
34
+ "metadata": {},
35
+ "source": [
36
+ "## Imports"
37
+ ]
38
+ },
39
+ {
40
+ "cell_type": "code",
41
+ "execution_count": 2,
42
+ "id": "aa2eba59",
43
+ "metadata": {},
44
+ "outputs": [
45
+ {
46
+ "name": "stderr",
47
+ "output_type": "stream",
48
+ "text": [
49
+ "c:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
50
+ " from .autonotebook import tqdm as notebook_tqdm\n"
51
+ ]
52
+ },
53
+ {
54
+ "name": "stdout",
55
+ "output_type": "stream",
56
+ "text": [
57
+ "WARNING:tensorflow:From c:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\keras\\src\\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.\n",
58
+ "\n"
59
+ ]
60
+ },
61
+ {
62
+ "name": "stderr",
63
+ "output_type": "stream",
64
+ "text": [
65
+ "W0919 09:55:13.094000 10452 site-packages\\torch\\distributed\\elastic\\multiprocessing\\redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.\n"
66
+ ]
67
+ }
68
+ ],
69
+ "source": [
70
+ "import torch\n",
71
+ "from datasets import load_dataset\n",
72
+ "from transformers import AutoModelForCausalLM, AutoTokenizer, TrainingArguments, Trainer\n",
73
+ "from peft import LoraConfig, get_peft_model, prepare_model_for_kbit_training"
74
+ ]
75
+ },
76
+ {
77
+ "cell_type": "markdown",
78
+ "id": "580fb870",
79
+ "metadata": {},
80
+ "source": [
81
+ "## 1. Load dataset"
82
+ ]
83
+ },
84
+ {
85
+ "cell_type": "code",
86
+ "execution_count": 3,
87
+ "id": "3ed2eec5",
88
+ "metadata": {},
89
+ "outputs": [
90
+ {
91
+ "name": "stdout",
92
+ "output_type": "stream",
93
+ "text": [
94
+ "Dataset columns: ['commit', 'old_file', 'new_file', 'old_contents', 'new_contents', 'subject', 'message', 'lang', 'license', 'repos']\n",
95
+ "First example:\n",
96
+ "commit: e905334869af72025592de586b81650cb3468b8a\n",
97
+ "old_file: sentry/queue/client.py\n",
98
+ "new_file: sentry/queue/client.py\n",
99
+ "old_contents: \"\"\"\n",
100
+ "sentry.queue.client\n",
101
+ "~~~~~~~~~~~~~~~~~~~\n",
102
+ "\n",
103
+ ":copyright: (c) 2010 by the Sentry Team, see AUTHORS fo...\n",
104
+ "new_contents: \"\"\"\n",
105
+ "sentry.queue.client\n",
106
+ "~~~~~~~~~~~~~~~~~~~\n",
107
+ "\n",
108
+ ":copyright: (c) 2010 by the Sentry Team, see AUTHORS fo...\n",
109
+ "subject: Declare queues when broker is instantiated\n",
110
+ "message: Declare queues when broker is instantiated\n",
111
+ "\n",
112
+ "lang: Python\n",
113
+ "license: bsd-3-clause\n",
114
+ "repos: imankulov/sentry,BuildingLink/sentry,zenefits/sentry,korealerts1/sentry,kevinastone/sentry,fotinakis...\n"
115
+ ]
116
+ }
117
+ ],
118
+ "source": [
119
+ "# Load dataset with python config (you can choose another language if preferred)\n",
120
+ "dataset = load_dataset(\"bigcode/commitpackft\", \"python\", split=\"train[:5%]\") # Using 5% of data to keep training time reasonable\n",
121
+ "\n",
122
+ "# Let's examine the dataset structure\n",
123
+ "print(\"Dataset columns:\", dataset.column_names)\n",
124
+ "print(\"First example:\")\n",
125
+ "for key, value in dataset[0].items():\n",
126
+ " if isinstance(value, str) and len(value) > 100:\n",
127
+ " print(f\"{key}: {value[:100]}...\")\n",
128
+ " else:\n",
129
+ " print(f\"{key}: {value}\")"
130
+ ]
131
+ },
132
+ {
133
+ "cell_type": "markdown",
134
+ "id": "aa276c12",
135
+ "metadata": {},
136
+ "source": [
137
+ "## 2. Load tokenizer & model (Qwen3-4B)"
138
+ ]
139
+ },
140
+ {
141
+ "cell_type": "code",
142
+ "execution_count": 4,
143
+ "id": "7204f957",
144
+ "metadata": {},
145
+ "outputs": [],
146
+ "source": [
147
+ "# The correct model name for Qwen models\n",
148
+ "model_name = \"Qwen/Qwen2-7B-Instruct\" # Using Qwen2 7B Instruct model\n",
149
+ "tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)\n",
150
+ "tokenizer.pad_token = tokenizer.eos_token"
151
+ ]
152
+ },
153
+ {
154
+ "cell_type": "markdown",
155
+ "id": "e29a46e0",
156
+ "metadata": {},
157
+ "source": [
158
+ "## Load in 4-bit quantized mode (saves VRAM)"
159
+ ]
160
+ },
161
+ {
162
+ "cell_type": "code",
163
+ "execution_count": 5,
164
+ "id": "e0d06509",
165
+ "metadata": {},
166
+ "outputs": [
167
+ {
168
+ "name": "stderr",
169
+ "output_type": "stream",
170
+ "text": [
171
+ "The `load_in_4bit` and `load_in_8bit` arguments are deprecated and will be removed in the future versions. Please, pass a `BitsAndBytesConfig` object in `quantization_config` argument instead.\n",
172
+ "Loading checkpoint shards: 100%|██████████| 4/4 [00:12<00:00, 3.20s/it]\n",
173
+ "\n"
174
+ ]
175
+ }
176
+ ],
177
+ "source": [
178
+ "# Load model in 4-bit quantized mode to save VRAM\n",
179
+ "model = AutoModelForCausalLM.from_pretrained(\n",
180
+ " model_name,\n",
181
+ " device_map=\"auto\",\n",
182
+ " load_in_4bit=True,\n",
183
+ " trust_remote_code=True\n",
184
+ ")"
185
+ ]
186
+ },
187
+ {
188
+ "cell_type": "markdown",
189
+ "id": "b061b83c",
190
+ "metadata": {},
191
+ "source": [
192
+ "## 3. Prepare model for LoRA training"
193
+ ]
194
+ },
195
+ {
196
+ "cell_type": "code",
197
+ "execution_count": 6,
198
+ "id": "35b3b2cd",
199
+ "metadata": {},
200
+ "outputs": [],
201
+ "source": [
202
+ "model = prepare_model_for_kbit_training(model)\n",
203
+ "\n",
204
+ "lora_config = LoraConfig(\n",
205
+ " r=16, # Rank\n",
206
+ " lora_alpha=32, \n",
207
+ " target_modules=[\"q_proj\", \"v_proj\"], # LoRA on attention layers\n",
208
+ " lora_dropout=0.05,\n",
209
+ " bias=\"none\",\n",
210
+ " task_type=\"CAUSAL_LM\"\n",
211
+ ")\n",
212
+ "\n",
213
+ "model = get_peft_model(model, lora_config)"
214
+ ]
215
+ },
216
+ {
217
+ "cell_type": "markdown",
218
+ "id": "6d17bd85",
219
+ "metadata": {},
220
+ "source": [
221
+ "## 4. Tokenize dataset"
222
+ ]
223
+ },
224
+ {
225
+ "cell_type": "code",
226
+ "execution_count": 7,
227
+ "id": "174e630b",
228
+ "metadata": {},
229
+ "outputs": [],
230
+ "source": [
231
+ "def tokenize_function(examples):\n",
232
+ " # Create instruction-based prompts for code fixing\n",
233
+ " # Use the correct column names based on the dataset structure\n",
234
+ " # Commonly used names in commitpackft are \"old_contents\" and \"new_contents\"\n",
235
+ " \n",
236
+ " prompts = [\n",
237
+ " f\"### Instruction:\\nFix the following buggy code:\\n{before}\\n\\n### Response:\\n{after}\"\n",
238
+ " for before, after in zip(examples[\"old_contents\"], examples[\"new_contents\"])\n",
239
+ " ]\n",
240
+ " \n",
241
+ " # Tokenize the prompts\n",
242
+ " tokenized = tokenizer(\n",
243
+ " prompts,\n",
244
+ " padding=\"max_length\", \n",
245
+ " truncation=True, \n",
246
+ " max_length=512,\n",
247
+ " return_tensors=\"pt\"\n",
248
+ " )\n",
249
+ " \n",
250
+ " # For causal language modeling, labels are the input_ids\n",
251
+ " tokenized[\"labels\"] = tokenized[\"input_ids\"].clone()\n",
252
+ " \n",
253
+ " return tokenized\n",
254
+ "\n",
255
+ "# After examining the dataset structure, apply the tokenization\n",
256
+ "tokenized_dataset = dataset.map(tokenize_function, batched=True, remove_columns=dataset.column_names)"
257
+ ]
258
+ },
259
+ {
260
+ "cell_type": "markdown",
261
+ "id": "2701bd75",
262
+ "metadata": {},
263
+ "source": [
264
+ "## 5. Training arguments"
265
+ ]
266
+ },
267
+ {
268
+ "cell_type": "code",
269
+ "execution_count": 8,
270
+ "id": "3f0218bd",
271
+ "metadata": {},
272
+ "outputs": [
273
+ {
274
+ "name": "stdout",
275
+ "output_type": "stream",
276
+ "text": [
277
+ "Training configuration:\n",
278
+ "- Output directory: ./qwen2-7b-commitpackft-lora\n",
279
+ "- Batch size: 2 (x8 grad accum)\n",
280
+ "- Learning rate: 0.0002\n",
281
+ "- Epochs: 3\n",
282
+ "- FP16: True\n"
283
+ ]
284
+ }
285
+ ],
286
+ "source": [
287
+ "training_args = TrainingArguments(\n",
288
+ " output_dir=\"./qwen2-7b-commitpackft-lora\",\n",
289
+ " per_device_train_batch_size=2,\n",
290
+ " gradient_accumulation_steps=8,\n",
291
+ " num_train_epochs=3,\n",
292
+ " learning_rate=2e-4,\n",
293
+ " fp16=True,\n",
294
+ " logging_steps=50,\n",
295
+ " save_strategy=\"epoch\",\n",
296
+ " # Removed evaluation_strategy parameter as it's not supported in this version\n",
297
+ " save_total_limit=2,\n",
298
+ " push_to_hub=False,\n",
299
+ " report_to=\"none\"\n",
300
+ ")\n",
301
+ "\n",
302
+ "# Print training configuration for verification\n",
303
+ "print(f\"Training configuration:\")\n",
304
+ "print(f\"- Output directory: {training_args.output_dir}\")\n",
305
+ "print(f\"- Batch size: {training_args.per_device_train_batch_size} (x{training_args.gradient_accumulation_steps} grad accum)\")\n",
306
+ "print(f\"- Learning rate: {training_args.learning_rate}\")\n",
307
+ "print(f\"- Epochs: {training_args.num_train_epochs}\")\n",
308
+ "print(f\"- FP16: {training_args.fp16}\")"
309
+ ]
310
+ },
311
+ {
312
+ "cell_type": "markdown",
313
+ "id": "ff6fa420",
314
+ "metadata": {},
315
+ "source": [
316
+ "## 6. Trainer"
317
+ ]
318
+ },
319
+ {
320
+ "cell_type": "code",
321
+ "execution_count": 9,
322
+ "id": "20744ef0",
323
+ "metadata": {},
324
+ "outputs": [
325
+ {
326
+ "name": "stderr",
327
+ "output_type": "stream",
328
+ "text": [
329
+ "C:\\Users\\Admin\\AppData\\Local\\Temp\\ipykernel_10452\\3424097219.py:1: FutureWarning: `tokenizer` is deprecated and will be removed in version 5.0.0 for `Trainer.__init__`. Use `processing_class` instead.\n",
330
+ " trainer = Trainer(\n"
331
+ ]
332
+ }
333
+ ],
334
+ "source": [
335
+ "trainer = Trainer(\n",
336
+ " model=model,\n",
337
+ " args=training_args,\n",
338
+ " train_dataset=tokenized_dataset,\n",
339
+ " tokenizer=tokenizer\n",
340
+ ")"
341
+ ]
342
+ },
343
+ {
344
+ "cell_type": "markdown",
345
+ "id": "dd392bb1",
346
+ "metadata": {},
347
+ "source": [
348
+ "## 7. Start training"
349
+ ]
350
+ },
351
+ {
352
+ "cell_type": "code",
353
+ "execution_count": 10,
354
+ "id": "32152c46",
355
+ "metadata": {},
356
+ "outputs": [
357
+ {
358
+ "name": "stderr",
359
+ "output_type": "stream",
360
+ "text": [
361
+ "The tokenizer has new PAD/BOS/EOS tokens that differ from the model config and generation config. The model config and generation config were aligned accordingly, being updated with the tokenizer's values. Updated tokens: {'bos_token_id': None, 'pad_token_id': 151645}.\n",
362
+ "`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`.\n",
363
+ "`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`.\n",
364
+ "c:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\torch\\_dynamo\\eval_frame.py:929: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.5 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n",
365
+ " return fn(*args, **kwargs)\n",
366
+ "c:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\torch\\_dynamo\\eval_frame.py:929: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.5 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n",
367
+ " return fn(*args, **kwargs)\n"
368
+ ]
369
+ },
370
+ {
371
+ "data": {
372
+ "text/html": [
373
+ "\n",
374
+ " <div>\n",
375
+ " \n",
376
+ " <progress value='528' max='528' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
377
+ " [528/528 1:10:15, Epoch 3/3]\n",
378
+ " </div>\n",
379
+ " <table border=\"1\" class=\"dataframe\">\n",
380
+ " <thead>\n",
381
+ " <tr style=\"text-align: left;\">\n",
382
+ " <th>Step</th>\n",
383
+ " <th>Training Loss</th>\n",
384
+ " </tr>\n",
385
+ " </thead>\n",
386
+ " <tbody>\n",
387
+ " <tr>\n",
388
+ " <td>50</td>\n",
389
+ " <td>0.694700</td>\n",
390
+ " </tr>\n",
391
+ " <tr>\n",
392
+ " <td>100</td>\n",
393
+ " <td>0.529100</td>\n",
394
+ " </tr>\n",
395
+ " <tr>\n",
396
+ " <td>150</td>\n",
397
+ " <td>0.529400</td>\n",
398
+ " </tr>\n",
399
+ " <tr>\n",
400
+ " <td>200</td>\n",
401
+ " <td>0.521800</td>\n",
402
+ " </tr>\n",
403
+ " <tr>\n",
404
+ " <td>250</td>\n",
405
+ " <td>0.502900</td>\n",
406
+ " </tr>\n",
407
+ " <tr>\n",
408
+ " <td>300</td>\n",
409
+ " <td>0.502600</td>\n",
410
+ " </tr>\n",
411
+ " <tr>\n",
412
+ " <td>350</td>\n",
413
+ " <td>0.523100</td>\n",
414
+ " </tr>\n",
415
+ " <tr>\n",
416
+ " <td>400</td>\n",
417
+ " <td>0.519500</td>\n",
418
+ " </tr>\n",
419
+ " <tr>\n",
420
+ " <td>450</td>\n",
421
+ " <td>0.504900</td>\n",
422
+ " </tr>\n",
423
+ " <tr>\n",
424
+ " <td>500</td>\n",
425
+ " <td>0.487800</td>\n",
426
+ " </tr>\n",
427
+ " </tbody>\n",
428
+ "</table><p>"
429
+ ],
430
+ "text/plain": [
431
+ "<IPython.core.display.HTML object>"
432
+ ]
433
+ },
434
+ "metadata": {},
435
+ "output_type": "display_data"
436
+ },
437
+ {
438
+ "name": "stderr",
439
+ "output_type": "stream",
440
+ "text": [
441
+ "c:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\torch\\_dynamo\\eval_frame.py:929: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.5 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n",
442
+ " return fn(*args, **kwargs)\n",
443
+ "c:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\torch\\_dynamo\\eval_frame.py:929: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.5 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n",
444
+ " return fn(*args, **kwargs)\n",
445
+ "c:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\torch\\_dynamo\\eval_frame.py:929: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.5 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n",
446
+ " return fn(*args, **kwargs)\n"
447
+ ]
448
+ },
449
+ {
450
+ "data": {
451
+ "text/plain": [
452
+ "TrainOutput(global_step=528, training_loss=0.5297952763962023, metrics={'train_runtime': 4224.0462, 'train_samples_per_second': 1.989, 'train_steps_per_second': 0.125, 'total_flos': 1.8265134005275853e+17, 'train_loss': 0.5297952763962023, 'epoch': 3.0})"
453
+ ]
454
+ },
455
+ "execution_count": 10,
456
+ "metadata": {},
457
+ "output_type": "execute_result"
458
+ }
459
+ ],
460
+ "source": [
461
+ "trainer.train()"
462
+ ]
463
+ },
464
+ {
465
+ "cell_type": "markdown",
466
+ "id": "44e0c3df",
467
+ "metadata": {},
468
+ "source": [
469
+ "## 8. Save final LoRA adapter"
470
+ ]
471
+ },
472
+ {
473
+ "cell_type": "code",
474
+ "execution_count": 11,
475
+ "id": "d9f0c7e2",
476
+ "metadata": {},
477
+ "outputs": [
478
+ {
479
+ "data": {
480
+ "text/plain": [
481
+ "('./qwen2-7b-commitpackft-lora-final\\\\tokenizer_config.json',\n",
482
+ " './qwen2-7b-commitpackft-lora-final\\\\special_tokens_map.json',\n",
483
+ " './qwen2-7b-commitpackft-lora-final\\\\chat_template.jinja',\n",
484
+ " './qwen2-7b-commitpackft-lora-final\\\\vocab.json',\n",
485
+ " './qwen2-7b-commitpackft-lora-final\\\\merges.txt',\n",
486
+ " './qwen2-7b-commitpackft-lora-final\\\\added_tokens.json',\n",
487
+ " './qwen2-7b-commitpackft-lora-final\\\\tokenizer.json')"
488
+ ]
489
+ },
490
+ "execution_count": 11,
491
+ "metadata": {},
492
+ "output_type": "execute_result"
493
+ }
494
+ ],
495
+ "source": [
496
+ "model.save_pretrained(\"./qwen2-7b-commitpackft-lora-final\")\n",
497
+ "tokenizer.save_pretrained(\"./qwen2-7b-commitpackft-lora-final\")"
498
+ ]
499
+ }
500
+ ],
501
+ "metadata": {
502
+ "kernelspec": {
503
+ "display_name": "Python 3",
504
+ "language": "python",
505
+ "name": "python3"
506
+ },
507
+ "language_info": {
508
+ "codemirror_mode": {
509
+ "name": "ipython",
510
+ "version": 3
511
+ },
512
+ "file_extension": ".py",
513
+ "mimetype": "text/x-python",
514
+ "name": "python",
515
+ "nbconvert_exporter": "python",
516
+ "pygments_lexer": "ipython3",
517
+ "version": "3.11.5"
518
+ }
519
+ },
520
+ "nbformat": 4,
521
+ "nbformat_minor": 5
522
+ }