phpaiola commited on
Commit
571da7a
·
verified ·
1 Parent(s): 61ca9d2

Delete xtuner_config.py

Browse files
Files changed (1) hide show
  1. xtuner_config.py +0 -207
xtuner_config.py DELETED
@@ -1,207 +0,0 @@
1
- SYSTEM = 'xtuner.utils.SYSTEM_TEMPLATE.alpaca'
2
- accumulative_counts = 16
3
- alpaca_en = dict(
4
- dataset=dict(
5
- data_files=
6
- '/petrobr/parceirosbr/home/rafael.rodrigues/.cache/huggingface/hub/datasets--recogna-nlp--ultra-alpaca-ptbr/snapshots/e69900d074177d370a911096fc30bdf407eff666/train.json',
7
- path='json',
8
- type='datasets.load_dataset'),
9
- dataset_map_fn='xtuner.dataset.map_fns.ultracabrita_map_fn',
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.qwen_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
- '/petrobr/parceirosbr/home/rafael.rodrigues/.cache/huggingface/hub/models--Qwen--Qwen1.5-1.8B-Chat/snapshots/99f64b6aee2077dc9787342a0eb747fb8126b761',
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 = '/petrobr/parceirosbr/home/rafael.rodrigues/.cache/huggingface/hub/datasets--recogna-nlp--ultra-alpaca-ptbr/snapshots/e69900d074177d370a911096fc30bdf407eff666/train.json'
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
- '/petrobr/parceirosbr/home/rafael.rodrigues/.cache/huggingface/hub/models--Qwen--Qwen1.5-1.8B-Chat/snapshots/99f64b6aee2077dc9787342a0eb747fb8126b761',
37
- trust_remote_code=True,
38
- type='transformers.AutoTokenizer.from_pretrained'),
39
- type='xtuner.engine.hooks.DatasetInfoHook'),
40
- dict(
41
- evaluation_inputs=[
42
- 'O que é um bode?',
43
- 'Qual a capital da França?',
44
- 'Você pode me explicar o Teorema de Pitágoras com um exemplo, por favor?',
45
- 'Olá, tudo bem? Estou procurando livros de ficção científica para ler, você teria sugestões para mim?',
46
- ],
47
- every_n_iters=500,
48
- prompt_template='xtuner.utils.PROMPT_TEMPLATE.qwen_chat',
49
- system='xtuner.utils.SYSTEM_TEMPLATE.alpaca',
50
- tokenizer=dict(
51
- padding_side='right',
52
- pretrained_model_name_or_path=
53
- '/petrobr/parceirosbr/home/rafael.rodrigues/.cache/huggingface/hub/models--Qwen--Qwen1.5-1.8B-Chat/snapshots/99f64b6aee2077dc9787342a0eb747fb8126b761',
54
- trust_remote_code=True,
55
- type='transformers.AutoTokenizer.from_pretrained'),
56
- type='xtuner.engine.hooks.EvaluateChatHook'),
57
- ]
58
- dataloader_num_workers = 0
59
- default_hooks = dict(
60
- checkpoint=dict(
61
- by_epoch=False,
62
- interval=500,
63
- max_keep_ckpts=2,
64
- type='mmengine.hooks.CheckpointHook'),
65
- logger=dict(
66
- interval=10,
67
- log_metric_by_epoch=False,
68
- type='mmengine.hooks.LoggerHook'),
69
- param_scheduler=dict(type='mmengine.hooks.ParamSchedulerHook'),
70
- sampler_seed=dict(type='mmengine.hooks.DistSamplerSeedHook'),
71
- timer=dict(type='mmengine.hooks.IterTimerHook'))
72
- env_cfg = dict(
73
- cudnn_benchmark=False,
74
- dist_cfg=dict(backend='nccl'),
75
- mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0))
76
- evaluation_freq = 500
77
- evaluation_inputs = [
78
- 'O que é um bode?',
79
- 'Qual a capital da França?',
80
- 'Você pode me explicar o Teorema de Pitágoras com um exemplo, por favor?',
81
- 'Olá, tudo bem? Estou procurando livros de ficção científica para ler, você teria sugestões para mim?',
82
- ]
83
- launcher = 'pytorch'
84
- load_from = None
85
- log_level = 'INFO'
86
- log_processor = dict(by_epoch=False)
87
- lr = 0.0002
88
- max_epochs = 1
89
- max_length = 2048
90
- max_norm = 1
91
- model = dict(
92
- llm=dict(
93
- pretrained_model_name_or_path=
94
- '/petrobr/parceirosbr/home/rafael.rodrigues/.cache/huggingface/hub/models--Qwen--Qwen1.5-1.8B-Chat/snapshots/99f64b6aee2077dc9787342a0eb747fb8126b761',
95
- quantization_config=dict(
96
- bnb_4bit_compute_dtype='torch.float16',
97
- bnb_4bit_quant_type='nf4',
98
- bnb_4bit_use_double_quant=True,
99
- llm_int8_has_fp16_weight=False,
100
- llm_int8_threshold=6.0,
101
- load_in_4bit=True,
102
- load_in_8bit=False,
103
- type='transformers.BitsAndBytesConfig'),
104
- torch_dtype='torch.float16',
105
- trust_remote_code=True,
106
- type='transformers.AutoModelForCausalLM.from_pretrained'),
107
- lora=dict(
108
- bias='none',
109
- lora_alpha=16,
110
- lora_dropout=0.1,
111
- r=64,
112
- task_type='CAUSAL_LM',
113
- type='peft.LoraConfig'),
114
- type='xtuner.model.SupervisedFinetune',
115
- use_varlen_attn=False)
116
- optim_type = 'torch.optim.AdamW'
117
- optim_wrapper = dict(
118
- optimizer=dict(
119
- betas=(
120
- 0.9,
121
- 0.999,
122
- ),
123
- lr=0.0002,
124
- type='torch.optim.AdamW',
125
- weight_decay=0),
126
- type='DeepSpeedOptimWrapper')
127
- pack_to_max_length = True
128
- param_scheduler = [
129
- dict(
130
- begin=0,
131
- by_epoch=True,
132
- convert_to_iter_based=True,
133
- end=0.03,
134
- start_factor=1e-05,
135
- type='mmengine.optim.LinearLR'),
136
- dict(
137
- begin=0.03,
138
- by_epoch=True,
139
- convert_to_iter_based=True,
140
- end=1,
141
- eta_min=0.0,
142
- type='mmengine.optim.CosineAnnealingLR'),
143
- ]
144
- pretrained_model_name_or_path = '/petrobr/parceirosbr/home/rafael.rodrigues/.cache/huggingface/hub/models--Qwen--Qwen1.5-1.8B-Chat/snapshots/99f64b6aee2077dc9787342a0eb747fb8126b761'
145
- prompt_template = 'xtuner.utils.PROMPT_TEMPLATE.qwen_chat'
146
- randomness = dict(deterministic=False, seed=None)
147
- resume = False
148
- runner_type = 'FlexibleRunner'
149
- save_steps = 500
150
- save_total_limit = 2
151
- strategy = dict(
152
- config=dict(
153
- bf16=dict(enabled=False),
154
- fp16=dict(enabled=True, initial_scale_power=16),
155
- gradient_accumulation_steps='auto',
156
- gradient_clipping='auto',
157
- train_micro_batch_size_per_gpu='auto',
158
- zero_allow_untested_optimizer=True,
159
- zero_force_ds_cpu_optimizer=False,
160
- zero_optimization=dict(overlap_comm=True, stage=2)),
161
- exclude_frozen_parameters=True,
162
- gradient_accumulation_steps=16,
163
- gradient_clipping=1,
164
- sequence_parallel_size=1,
165
- train_micro_batch_size_per_gpu=1,
166
- type='xtuner.engine.DeepSpeedStrategy')
167
- tokenizer = dict(
168
- padding_side='right',
169
- pretrained_model_name_or_path=
170
- '/petrobr/parceirosbr/home/rafael.rodrigues/.cache/huggingface/hub/models--Qwen--Qwen1.5-1.8B-Chat/snapshots/99f64b6aee2077dc9787342a0eb747fb8126b761',
171
- trust_remote_code=True,
172
- type='transformers.AutoTokenizer.from_pretrained')
173
- train_cfg = dict(max_epochs=1, type='xtuner.engine.runner.TrainLoop')
174
- train_dataloader = dict(
175
- batch_size=1,
176
- collate_fn=dict(
177
- type='xtuner.dataset.collate_fns.default_collate_fn',
178
- use_varlen_attn=False),
179
- dataset=dict(
180
- dataset=dict(
181
- data_files=
182
- '/petrobr/parceirosbr/home/rafael.rodrigues/.cache/huggingface/hub/datasets--recogna-nlp--ultra-alpaca-ptbr/snapshots/e69900d074177d370a911096fc30bdf407eff666/train.json',
183
- path='json',
184
- type='datasets.load_dataset'),
185
- dataset_map_fn='xtuner.dataset.map_fns.ultracabrita_map_fn',
186
- max_length=2048,
187
- pack_to_max_length=True,
188
- remove_unused_columns=True,
189
- shuffle_before_pack=True,
190
- template_map_fn=dict(
191
- template='xtuner.utils.PROMPT_TEMPLATE.qwen_chat',
192
- type='xtuner.dataset.map_fns.template_map_fn_factory'),
193
- tokenizer=dict(
194
- padding_side='right',
195
- pretrained_model_name_or_path=
196
- '/petrobr/parceirosbr/home/rafael.rodrigues/.cache/huggingface/hub/models--Qwen--Qwen1.5-1.8B-Chat/snapshots/99f64b6aee2077dc9787342a0eb747fb8126b761',
197
- trust_remote_code=True,
198
- type='transformers.AutoTokenizer.from_pretrained'),
199
- type='xtuner.dataset.process_hf_dataset',
200
- use_varlen_attn=False),
201
- num_workers=0,
202
- sampler=dict(shuffle=True, type='mmengine.dataset.DefaultSampler'))
203
- use_varlen_attn = False
204
- visualizer = None
205
- warmup_ratio = 0.03
206
- weight_decay = 0
207
- work_dir = './work_dirs/qwen1_5_1_8b_chat_qlora_ultraalpaca'