Delete xtuner_config.py
Browse files- xtuner_config.py +0 -190
xtuner_config.py
DELETED
@@ -1,190 +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/radiar/llama_test/train_ultracabrita.json',
|
7 |
-
path='json',
|
8 |
-
type='datasets.load_dataset'),
|
9 |
-
dataset_map_fn='xtuner.dataset.map_fns.ultracabrita_map_fn',
|
10 |
-
max_length=4096,
|
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 |
-
'/petrobr/parceirosbr/home/luis.afonso/.cache/huggingface/hub/models--internlm--internlm2-chat-1_8b/snapshots/ecccbb5c87079ad84e5788baa55dd6e21a9c614d',
|
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/radiar/llama_test/train_ultracabrita.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/luis.afonso/.cache/huggingface/hub/models--internlm--internlm2-chat-1_8b/snapshots/ecccbb5c87079ad84e5788baa55dd6e21a9c614d',
|
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.internlm2_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/luis.afonso/.cache/huggingface/hub/models--internlm--internlm2-chat-1_8b/snapshots/ecccbb5c87079ad84e5788baa55dd6e21a9c614d',
|
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 = 2e-05
|
88 |
-
max_epochs = 3
|
89 |
-
max_length = 4096
|
90 |
-
max_norm = 1
|
91 |
-
model = dict(
|
92 |
-
llm=dict(
|
93 |
-
pretrained_model_name_or_path=
|
94 |
-
'/petrobr/parceirosbr/home/luis.afonso/.cache/huggingface/hub/models--internlm--internlm2-chat-1_8b/snapshots/ecccbb5c87079ad84e5788baa55dd6e21a9c614d',
|
95 |
-
trust_remote_code=True,
|
96 |
-
type='transformers.AutoModelForCausalLM.from_pretrained'),
|
97 |
-
type='xtuner.model.SupervisedFinetune',
|
98 |
-
use_varlen_attn=False)
|
99 |
-
optim_type = 'torch.optim.AdamW'
|
100 |
-
optim_wrapper = dict(
|
101 |
-
optimizer=dict(
|
102 |
-
betas=(
|
103 |
-
0.9,
|
104 |
-
0.999,
|
105 |
-
),
|
106 |
-
lr=2e-05,
|
107 |
-
type='torch.optim.AdamW',
|
108 |
-
weight_decay=0),
|
109 |
-
type='DeepSpeedOptimWrapper')
|
110 |
-
pack_to_max_length = True
|
111 |
-
param_scheduler = [
|
112 |
-
dict(
|
113 |
-
begin=0,
|
114 |
-
by_epoch=True,
|
115 |
-
convert_to_iter_based=True,
|
116 |
-
end=0.09,
|
117 |
-
start_factor=1e-05,
|
118 |
-
type='mmengine.optim.LinearLR'),
|
119 |
-
dict(
|
120 |
-
begin=0.09,
|
121 |
-
by_epoch=True,
|
122 |
-
convert_to_iter_based=True,
|
123 |
-
end=3,
|
124 |
-
eta_min=0.0,
|
125 |
-
type='mmengine.optim.CosineAnnealingLR'),
|
126 |
-
]
|
127 |
-
pretrained_model_name_or_path = '/petrobr/parceirosbr/home/luis.afonso/.cache/huggingface/hub/models--internlm--internlm2-chat-1_8b/snapshots/ecccbb5c87079ad84e5788baa55dd6e21a9c614d'
|
128 |
-
prompt_template = 'xtuner.utils.PROMPT_TEMPLATE.internlm2_chat'
|
129 |
-
randomness = dict(deterministic=False, seed=None)
|
130 |
-
resume = False
|
131 |
-
runner_type = 'FlexibleRunner'
|
132 |
-
save_steps = 500
|
133 |
-
save_total_limit = 2
|
134 |
-
strategy = dict(
|
135 |
-
config=dict(
|
136 |
-
bf16=dict(enabled=False),
|
137 |
-
fp16=dict(enabled=True, initial_scale_power=16),
|
138 |
-
gradient_accumulation_steps='auto',
|
139 |
-
gradient_clipping='auto',
|
140 |
-
train_micro_batch_size_per_gpu='auto',
|
141 |
-
zero_allow_untested_optimizer=True,
|
142 |
-
zero_force_ds_cpu_optimizer=False,
|
143 |
-
zero_optimization=dict(overlap_comm=True, stage=2)),
|
144 |
-
exclude_frozen_parameters=True,
|
145 |
-
gradient_accumulation_steps=16,
|
146 |
-
gradient_clipping=1,
|
147 |
-
sequence_parallel_size=1,
|
148 |
-
train_micro_batch_size_per_gpu=1,
|
149 |
-
type='xtuner.engine.DeepSpeedStrategy')
|
150 |
-
tokenizer = dict(
|
151 |
-
padding_side='right',
|
152 |
-
pretrained_model_name_or_path=
|
153 |
-
'/petrobr/parceirosbr/home/luis.afonso/.cache/huggingface/hub/models--internlm--internlm2-chat-1_8b/snapshots/ecccbb5c87079ad84e5788baa55dd6e21a9c614d',
|
154 |
-
trust_remote_code=True,
|
155 |
-
type='transformers.AutoTokenizer.from_pretrained')
|
156 |
-
train_cfg = dict(max_epochs=3, type='xtuner.engine.runner.TrainLoop')
|
157 |
-
train_dataloader = dict(
|
158 |
-
batch_size=1,
|
159 |
-
collate_fn=dict(
|
160 |
-
type='xtuner.dataset.collate_fns.default_collate_fn',
|
161 |
-
use_varlen_attn=False),
|
162 |
-
dataset=dict(
|
163 |
-
dataset=dict(
|
164 |
-
data_files=
|
165 |
-
'/petrobr/parceirosbr/radiar/llama_test/train_ultracabrita.json',
|
166 |
-
path='json',
|
167 |
-
type='datasets.load_dataset'),
|
168 |
-
dataset_map_fn='xtuner.dataset.map_fns.ultracabrita_map_fn',
|
169 |
-
max_length=4096,
|
170 |
-
pack_to_max_length=True,
|
171 |
-
remove_unused_columns=True,
|
172 |
-
shuffle_before_pack=True,
|
173 |
-
template_map_fn=dict(
|
174 |
-
template='xtuner.utils.PROMPT_TEMPLATE.internlm2_chat',
|
175 |
-
type='xtuner.dataset.map_fns.template_map_fn_factory'),
|
176 |
-
tokenizer=dict(
|
177 |
-
padding_side='right',
|
178 |
-
pretrained_model_name_or_path=
|
179 |
-
'/petrobr/parceirosbr/home/luis.afonso/.cache/huggingface/hub/models--internlm--internlm2-chat-1_8b/snapshots/ecccbb5c87079ad84e5788baa55dd6e21a9c614d',
|
180 |
-
trust_remote_code=True,
|
181 |
-
type='transformers.AutoTokenizer.from_pretrained'),
|
182 |
-
type='xtuner.dataset.process_hf_dataset',
|
183 |
-
use_varlen_attn=False),
|
184 |
-
num_workers=0,
|
185 |
-
sampler=dict(shuffle=True, type='mmengine.dataset.DefaultSampler'))
|
186 |
-
use_varlen_attn = False
|
187 |
-
visualizer = None
|
188 |
-
warmup_ratio = 0.03
|
189 |
-
weight_decay = 0
|
190 |
-
work_dir = './work_dirs/internlm2_chat_1_8b_full_ultracabrita'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|