rx0206 commited on
Commit
38ccc08
·
verified ·
1 Parent(s): ef676f1

Upload 4 files

Browse files
README (1).md ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: /root/finetune/models/internlm2_5-7b-chat
3
+ library_name: peft
4
+ ---
5
+
6
+ # Model Card for Model ID
7
+
8
+ <!-- Provide a quick summary of what the model is/does. -->
9
+
10
+
11
+
12
+ ## Model Details
13
+
14
+ ### Model Description
15
+
16
+ <!-- Provide a longer summary of what this model is. -->
17
+
18
+
19
+
20
+ - **Developed by:** [More Information Needed]
21
+ - **Funded by [optional]:** [More Information Needed]
22
+ - **Shared by [optional]:** [More Information Needed]
23
+ - **Model type:** [More Information Needed]
24
+ - **Language(s) (NLP):** [More Information Needed]
25
+ - **License:** [More Information Needed]
26
+ - **Finetuned from model [optional]:** [More Information Needed]
27
+
28
+ ### Model Sources [optional]
29
+
30
+ <!-- Provide the basic links for the model. -->
31
+
32
+ - **Repository:** [More Information Needed]
33
+ - **Paper [optional]:** [More Information Needed]
34
+ - **Demo [optional]:** [More Information Needed]
35
+
36
+ ## Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+
40
+ ### Direct Use
41
+
42
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
+
44
+ [More Information Needed]
45
+
46
+ ### Downstream Use [optional]
47
+
48
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Out-of-Scope Use
53
+
54
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
+
56
+ [More Information Needed]
57
+
58
+ ## Bias, Risks, and Limitations
59
+
60
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ### Recommendations
65
+
66
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
+
68
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
+
70
+ ## How to Get Started with the Model
71
+
72
+ Use the code below to get started with the model.
73
+
74
+ [More Information Needed]
75
+
76
+ ## Training Details
77
+
78
+ ### Training Data
79
+
80
+ <!-- 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. -->
81
+
82
+ [More Information Needed]
83
+
84
+ ### Training Procedure
85
+
86
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
+
88
+ #### Preprocessing [optional]
89
+
90
+ [More Information Needed]
91
+
92
+
93
+ #### Training Hyperparameters
94
+
95
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
+
97
+ #### Speeds, Sizes, Times [optional]
98
+
99
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
+
101
+ [More Information Needed]
102
+
103
+ ## Evaluation
104
+
105
+ <!-- This section describes the evaluation protocols and provides the results. -->
106
+
107
+ ### Testing Data, Factors & Metrics
108
+
109
+ #### Testing Data
110
+
111
+ <!-- This should link to a Dataset Card if possible. -->
112
+
113
+ [More Information Needed]
114
+
115
+ #### Factors
116
+
117
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
+
119
+ [More Information Needed]
120
+
121
+ #### Metrics
122
+
123
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
+
125
+ [More Information Needed]
126
+
127
+ ### Results
128
+
129
+ [More Information Needed]
130
+
131
+ #### Summary
132
+
133
+
134
+
135
+ ## Model Examination [optional]
136
+
137
+ <!-- Relevant interpretability work for the model goes here -->
138
+
139
+ [More Information Needed]
140
+
141
+ ## Environmental Impact
142
+
143
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
+
145
+ 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).
146
+
147
+ - **Hardware Type:** [More Information Needed]
148
+ - **Hours used:** [More Information Needed]
149
+ - **Cloud Provider:** [More Information Needed]
150
+ - **Compute Region:** [More Information Needed]
151
+ - **Carbon Emitted:** [More Information Needed]
152
+
153
+ ## Technical Specifications [optional]
154
+
155
+ ### Model Architecture and Objective
156
+
157
+ [More Information Needed]
158
+
159
+ ### Compute Infrastructure
160
+
161
+ [More Information Needed]
162
+
163
+ #### Hardware
164
+
165
+ [More Information Needed]
166
+
167
+ #### Software
168
+
169
+ [More Information Needed]
170
+
171
+ ## Citation [optional]
172
+
173
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
+
175
+ **BibTeX:**
176
+
177
+ [More Information Needed]
178
+
179
+ **APA:**
180
+
181
+ [More Information Needed]
182
+
183
+ ## Glossary [optional]
184
+
185
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
+
187
+ [More Information Needed]
188
+
189
+ ## More Information [optional]
190
+
191
+ [More Information Needed]
192
+
193
+ ## Model Card Authors [optional]
194
+
195
+ [More Information Needed]
196
+
197
+ ## Model Card Contact
198
+
199
+ [More Information Needed]
200
+ ### Framework versions
201
+
202
+ - PEFT 0.13.2
adapter_config (1).json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "/root/finetune/models/internlm2_5-7b-chat",
5
+ "bias": "none",
6
+ "fan_in_fan_out": false,
7
+ "inference_mode": true,
8
+ "init_lora_weights": true,
9
+ "layer_replication": null,
10
+ "layers_pattern": null,
11
+ "layers_to_transform": null,
12
+ "loftq_config": {},
13
+ "lora_alpha": 16,
14
+ "lora_dropout": 0.1,
15
+ "megatron_config": null,
16
+ "megatron_core": "megatron.core",
17
+ "modules_to_save": null,
18
+ "peft_type": "LORA",
19
+ "r": 64,
20
+ "rank_pattern": {},
21
+ "revision": null,
22
+ "target_modules": [
23
+ "wqkv",
24
+ "w2",
25
+ "wo",
26
+ "w3",
27
+ "output",
28
+ "w1"
29
+ ],
30
+ "task_type": "CAUSAL_LM",
31
+ "use_dora": false,
32
+ "use_rslora": false
33
+ }
adapter_model (1).bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dda19d55bbefde35a269bfd0ce1c16e61302f471217379736b3c3e8dd5cdff4b
3
+ size 314471634
xtuner_config (1).py ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ SYSTEM = 'xtuner.utils.SYSTEM_TEMPLATE.alpaca'
2
+ accumulative_counts = 1
3
+ alpaca_en = dict(
4
+ dataset=dict(
5
+ data_files=dict(
6
+ train='/root/finetune/data/assistant_Tuner_change.jsonl'),
7
+ path='json',
8
+ type='datasets.load_dataset'),
9
+ dataset_map_fn=None,
10
+ max_length=2048,
11
+ pack_to_max_length=True,
12
+ remove_unused_columns=True,
13
+ shuffle_before_pack=True,
14
+ template_map_fn=dict(
15
+ template='xtuner.utils.PROMPT_TEMPLATE.internlm2_chat',
16
+ type='xtuner.dataset.map_fns.template_map_fn_factory'),
17
+ tokenizer=dict(
18
+ padding_side='right',
19
+ pretrained_model_name_or_path=
20
+ '/root/finetune/models/internlm2_5-7b-chat',
21
+ trust_remote_code=True,
22
+ type='transformers.AutoTokenizer.from_pretrained'),
23
+ type='xtuner.dataset.process_hf_dataset',
24
+ use_varlen_attn=False)
25
+ alpaca_en_path = '/root/finetune/data/assistant_Tuner_change.jsonl'
26
+ batch_size = 1
27
+ betas = (
28
+ 0.9,
29
+ 0.999,
30
+ )
31
+ custom_hooks = [
32
+ dict(
33
+ tokenizer=dict(
34
+ padding_side='right',
35
+ pretrained_model_name_or_path=
36
+ '/root/finetune/models/internlm2_5-7b-chat',
37
+ trust_remote_code=True,
38
+ type='transformers.AutoTokenizer.from_pretrained'),
39
+ type='xtuner.engine.hooks.DatasetInfoHook'),
40
+ dict(
41
+ evaluation_inputs=[
42
+ '请介绍一下你自己',
43
+ 'Please introduce yourself',
44
+ ],
45
+ every_n_iters=500,
46
+ prompt_template='xtuner.utils.PROMPT_TEMPLATE.internlm2_chat',
47
+ system='xtuner.utils.SYSTEM_TEMPLATE.alpaca',
48
+ tokenizer=dict(
49
+ padding_side='right',
50
+ pretrained_model_name_or_path=
51
+ '/root/finetune/models/internlm2_5-7b-chat',
52
+ trust_remote_code=True,
53
+ type='transformers.AutoTokenizer.from_pretrained'),
54
+ type='xtuner.engine.hooks.EvaluateChatHook'),
55
+ ]
56
+ dataloader_num_workers = 0
57
+ default_hooks = dict(
58
+ checkpoint=dict(
59
+ by_epoch=False,
60
+ interval=500,
61
+ max_keep_ckpts=2,
62
+ type='mmengine.hooks.CheckpointHook'),
63
+ logger=dict(
64
+ interval=10,
65
+ log_metric_by_epoch=False,
66
+ type='mmengine.hooks.LoggerHook'),
67
+ param_scheduler=dict(type='mmengine.hooks.ParamSchedulerHook'),
68
+ sampler_seed=dict(type='mmengine.hooks.DistSamplerSeedHook'),
69
+ timer=dict(type='mmengine.hooks.IterTimerHook'))
70
+ env_cfg = dict(
71
+ cudnn_benchmark=False,
72
+ dist_cfg=dict(backend='nccl'),
73
+ mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0))
74
+ evaluation_freq = 500
75
+ evaluation_inputs = [
76
+ '请介绍一下你自己',
77
+ 'Please introduce yourself',
78
+ ]
79
+ launcher = 'none'
80
+ load_from = None
81
+ log_level = 'INFO'
82
+ log_processor = dict(by_epoch=False)
83
+ lr = 0.0002
84
+ max_epochs = 3
85
+ max_length = 2048
86
+ max_norm = 1
87
+ model = dict(
88
+ llm=dict(
89
+ pretrained_model_name_or_path=
90
+ '/root/finetune/models/internlm2_5-7b-chat',
91
+ quantization_config=dict(
92
+ bnb_4bit_compute_dtype='torch.float16',
93
+ bnb_4bit_quant_type='nf4',
94
+ bnb_4bit_use_double_quant=True,
95
+ llm_int8_has_fp16_weight=False,
96
+ llm_int8_threshold=6.0,
97
+ load_in_4bit=True,
98
+ load_in_8bit=False,
99
+ type='transformers.BitsAndBytesConfig'),
100
+ torch_dtype='torch.float16',
101
+ trust_remote_code=True,
102
+ type='transformers.AutoModelForCausalLM.from_pretrained'),
103
+ lora=dict(
104
+ bias='none',
105
+ lora_alpha=16,
106
+ lora_dropout=0.1,
107
+ r=64,
108
+ task_type='CAUSAL_LM',
109
+ type='peft.LoraConfig'),
110
+ type='xtuner.model.SupervisedFinetune',
111
+ use_varlen_attn=False)
112
+ optim_type = 'torch.optim.AdamW'
113
+ optim_wrapper = dict(
114
+ optimizer=dict(
115
+ betas=(
116
+ 0.9,
117
+ 0.999,
118
+ ),
119
+ lr=0.0002,
120
+ type='torch.optim.AdamW',
121
+ weight_decay=0),
122
+ type='DeepSpeedOptimWrapper')
123
+ pack_to_max_length = True
124
+ param_scheduler = [
125
+ dict(
126
+ begin=0,
127
+ by_epoch=True,
128
+ convert_to_iter_based=True,
129
+ end=0.09,
130
+ start_factor=1e-05,
131
+ type='mmengine.optim.LinearLR'),
132
+ dict(
133
+ begin=0.09,
134
+ by_epoch=True,
135
+ convert_to_iter_based=True,
136
+ end=3,
137
+ eta_min=0.0,
138
+ type='mmengine.optim.CosineAnnealingLR'),
139
+ ]
140
+ pretrained_model_name_or_path = '/root/finetune/models/internlm2_5-7b-chat'
141
+ prompt_template = 'xtuner.utils.PROMPT_TEMPLATE.internlm2_chat'
142
+ randomness = dict(deterministic=False, seed=None)
143
+ resume = False
144
+ runner_type = 'FlexibleRunner'
145
+ sampler = 'mmengine.dataset.DefaultSampler'
146
+ save_steps = 500
147
+ save_total_limit = 2
148
+ sequence_parallel_size = 1
149
+ strategy = dict(
150
+ config=dict(
151
+ bf16=dict(enabled=True),
152
+ fp16=dict(enabled=False, initial_scale_power=16),
153
+ gradient_accumulation_steps='auto',
154
+ gradient_clipping='auto',
155
+ train_micro_batch_size_per_gpu='auto',
156
+ zero_allow_untested_optimizer=True,
157
+ zero_force_ds_cpu_optimizer=False,
158
+ zero_optimization=dict(overlap_comm=True, stage=2)),
159
+ exclude_frozen_parameters=True,
160
+ gradient_accumulation_steps=1,
161
+ gradient_clipping=1,
162
+ sequence_parallel_size=1,
163
+ train_micro_batch_size_per_gpu=1,
164
+ type='xtuner.engine.DeepSpeedStrategy')
165
+ tokenizer = dict(
166
+ padding_side='right',
167
+ pretrained_model_name_or_path='/root/finetune/models/internlm2_5-7b-chat',
168
+ trust_remote_code=True,
169
+ type='transformers.AutoTokenizer.from_pretrained')
170
+ train_cfg = dict(max_epochs=3, type='xtuner.engine.runner.TrainLoop')
171
+ train_dataloader = dict(
172
+ batch_size=1,
173
+ collate_fn=dict(
174
+ type='xtuner.dataset.collate_fns.default_collate_fn',
175
+ use_varlen_attn=False),
176
+ dataset=dict(
177
+ dataset=dict(
178
+ data_files=dict(
179
+ train='/root/finetune/data/assistant_Tuner_change.jsonl'),
180
+ path='json',
181
+ type='datasets.load_dataset'),
182
+ dataset_map_fn=None,
183
+ max_length=2048,
184
+ pack_to_max_length=True,
185
+ remove_unused_columns=True,
186
+ shuffle_before_pack=True,
187
+ template_map_fn=dict(
188
+ template='xtuner.utils.PROMPT_TEMPLATE.internlm2_chat',
189
+ type='xtuner.dataset.map_fns.template_map_fn_factory'),
190
+ tokenizer=dict(
191
+ padding_side='right',
192
+ pretrained_model_name_or_path=
193
+ '/root/finetune/models/internlm2_5-7b-chat',
194
+ trust_remote_code=True,
195
+ type='transformers.AutoTokenizer.from_pretrained'),
196
+ type='xtuner.dataset.process_hf_dataset',
197
+ use_varlen_attn=False),
198
+ num_workers=0,
199
+ sampler=dict(shuffle=True, type='mmengine.dataset.DefaultSampler'))
200
+ use_varlen_attn = False
201
+ visualizer = None
202
+ warmup_ratio = 0.03
203
+ weight_decay = 0
204
+ work_dir = './work_dirs/assistTuner'