Delete xtuner_config.py
Browse files- xtuner_config.py +0 -208
xtuner_config.py
DELETED
@@ -1,208 +0,0 @@
|
|
1 |
-
SYSTEM = ''
|
2 |
-
accumulative_counts = 1
|
3 |
-
batch_size = 16
|
4 |
-
betas = (
|
5 |
-
0.9,
|
6 |
-
0.999,
|
7 |
-
)
|
8 |
-
custom_hooks = [
|
9 |
-
dict(
|
10 |
-
tokenizer=dict(
|
11 |
-
padding_side='right',
|
12 |
-
pretrained_model_name_or_path='lmsys/vicuna-7b-v1.5',
|
13 |
-
trust_remote_code=True,
|
14 |
-
type='transformers.AutoTokenizer.from_pretrained'),
|
15 |
-
type='xtuner.engine.DatasetInfoHook'),
|
16 |
-
dict(
|
17 |
-
evaluation_images='https://llava-vl.github.io/static/images/view.jpg',
|
18 |
-
evaluation_inputs=[
|
19 |
-
'请描述一下这张照片',
|
20 |
-
'Please describe this picture',
|
21 |
-
],
|
22 |
-
every_n_iters=500,
|
23 |
-
image_processor=dict(
|
24 |
-
pretrained_model_name_or_path='openai/clip-vit-large-patch14-336',
|
25 |
-
trust_remote_code=True,
|
26 |
-
type='transformers.CLIPImageProcessor.from_pretrained'),
|
27 |
-
prompt_template='xtuner.utils.PROMPT_TEMPLATE.vicuna',
|
28 |
-
system='',
|
29 |
-
tokenizer=dict(
|
30 |
-
padding_side='right',
|
31 |
-
pretrained_model_name_or_path='lmsys/vicuna-7b-v1.5',
|
32 |
-
trust_remote_code=True,
|
33 |
-
type='transformers.AutoTokenizer.from_pretrained'),
|
34 |
-
type='xtuner.engine.EvaluateChatHook'),
|
35 |
-
]
|
36 |
-
data_path = './data/llava_data/LLaVA-Instruct-150K/llava_v1_5_mix665k.json'
|
37 |
-
dataloader_num_workers = 0
|
38 |
-
default_hooks = dict(
|
39 |
-
checkpoint=dict(interval=1, type='mmengine.hooks.CheckpointHook'),
|
40 |
-
logger=dict(interval=10, type='mmengine.hooks.LoggerHook'),
|
41 |
-
param_scheduler=dict(type='mmengine.hooks.ParamSchedulerHook'),
|
42 |
-
sampler_seed=dict(type='mmengine.hooks.DistSamplerSeedHook'),
|
43 |
-
timer=dict(type='mmengine.hooks.IterTimerHook'))
|
44 |
-
env_cfg = dict(
|
45 |
-
cudnn_benchmark=False,
|
46 |
-
dist_cfg=dict(backend='nccl'),
|
47 |
-
mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0))
|
48 |
-
evaluation_freq = 500
|
49 |
-
evaluation_images = 'https://llava-vl.github.io/static/images/view.jpg'
|
50 |
-
evaluation_inputs = [
|
51 |
-
'请描述一下这张照片',
|
52 |
-
'Please describe this picture',
|
53 |
-
]
|
54 |
-
image_folder = './data/llava_data/llava_images'
|
55 |
-
launcher = 'pytorch'
|
56 |
-
llava_data_root = './data/llava_data/'
|
57 |
-
llava_dataset = dict(
|
58 |
-
data_path='./data/llava_data/LLaVA-Instruct-150K/llava_v1_5_mix665k.json',
|
59 |
-
dataset_map_fn='xtuner.dataset.map_fns.llava_map_fn',
|
60 |
-
image_folder='./data/llava_data/llava_images',
|
61 |
-
max_length=1472,
|
62 |
-
pad_image_to_square=True,
|
63 |
-
image_processor=dict(
|
64 |
-
pretrained_model_name_or_path='openai/clip-vit-large-patch14-336',
|
65 |
-
trust_remote_code=True,
|
66 |
-
type='transformers.CLIPImageProcessor.from_pretrained'),
|
67 |
-
template_map_fn=dict(
|
68 |
-
template='xtuner.utils.PROMPT_TEMPLATE.vicuna',
|
69 |
-
type='xtuner.dataset.map_fns.template_map_fn_factory'),
|
70 |
-
tokenizer=dict(
|
71 |
-
padding_side='right',
|
72 |
-
pretrained_model_name_or_path='lmsys/vicuna-7b-v1.5',
|
73 |
-
trust_remote_code=True,
|
74 |
-
type='transformers.AutoTokenizer.from_pretrained'),
|
75 |
-
type='xtuner.dataset.LLaVADataset')
|
76 |
-
llm_name_or_path = 'lmsys/vicuna-7b-v1.5'
|
77 |
-
load_from = None
|
78 |
-
log_level = 'INFO'
|
79 |
-
lr = 0.0002
|
80 |
-
max_epochs = 1
|
81 |
-
max_length = 1472
|
82 |
-
max_norm = 1
|
83 |
-
model = dict(
|
84 |
-
freeze_llm=True,
|
85 |
-
freeze_visual_encoder=True,
|
86 |
-
llm=dict(
|
87 |
-
pretrained_model_name_or_path='lmsys/vicuna-7b-v1.5',
|
88 |
-
quantization_config=dict(
|
89 |
-
bnb_4bit_compute_dtype='torch.float16',
|
90 |
-
bnb_4bit_quant_type='nf4',
|
91 |
-
bnb_4bit_use_double_quant=True,
|
92 |
-
llm_int8_has_fp16_weight=False,
|
93 |
-
llm_int8_threshold=6.0,
|
94 |
-
load_in_4bit=True,
|
95 |
-
load_in_8bit=False,
|
96 |
-
type='transformers.BitsAndBytesConfig'),
|
97 |
-
torch_dtype='torch.float16',
|
98 |
-
trust_remote_code=True,
|
99 |
-
type='transformers.AutoModelForCausalLM.from_pretrained'),
|
100 |
-
llm_lora=dict(
|
101 |
-
bias='none',
|
102 |
-
lora_alpha=256,
|
103 |
-
lora_dropout=0.05,
|
104 |
-
r=512,
|
105 |
-
task_type='CAUSAL_LM',
|
106 |
-
type='peft.LoraConfig'),
|
107 |
-
pretrained_pth=
|
108 |
-
'./work_dirs/llava_vicuna_7b_v15_clip_vit_large_p14_336_e1_gpu8_pretrain/epoch_1.pth',
|
109 |
-
type='xtuner.model.LLaVAModel',
|
110 |
-
visual_encoder=dict(
|
111 |
-
pretrained_model_name_or_path='openai/clip-vit-large-patch14-336',
|
112 |
-
type='transformers.CLIPVisionModel.from_pretrained'),
|
113 |
-
visual_encoder_lora=dict(
|
114 |
-
bias='none',
|
115 |
-
lora_alpha=16,
|
116 |
-
lora_dropout=0.05,
|
117 |
-
r=64,
|
118 |
-
type='peft.LoraConfig'))
|
119 |
-
optim_type = 'torch.optim.AdamW'
|
120 |
-
optim_wrapper = dict(
|
121 |
-
optimizer=dict(
|
122 |
-
betas=(
|
123 |
-
0.9,
|
124 |
-
0.999,
|
125 |
-
),
|
126 |
-
lr=0.0002,
|
127 |
-
type='torch.optim.AdamW',
|
128 |
-
weight_decay=0),
|
129 |
-
type='DeepSpeedOptimWrapper')
|
130 |
-
param_scheduler = [
|
131 |
-
dict(
|
132 |
-
begin=0,
|
133 |
-
by_epoch=True,
|
134 |
-
convert_to_iter_based=True,
|
135 |
-
end=0.03,
|
136 |
-
start_factor=1e-05,
|
137 |
-
type='mmengine.optim.LinearLR'),
|
138 |
-
dict(
|
139 |
-
T_max=1,
|
140 |
-
begin=0.03,
|
141 |
-
by_epoch=True,
|
142 |
-
convert_to_iter_based=True,
|
143 |
-
eta_min=0.0,
|
144 |
-
type='mmengine.optim.CosineAnnealingLR'),
|
145 |
-
]
|
146 |
-
pretrained_pth = './work_dirs/llava_vicuna_7b_v15_clip_vit_large_p14_336_e1_gpu8_pretrain/epoch_1.pth'
|
147 |
-
image_processor = dict(
|
148 |
-
pretrained_model_name_or_path='openai/clip-vit-large-patch14-336',
|
149 |
-
trust_remote_code=True,
|
150 |
-
type='transformers.CLIPImageProcessor.from_pretrained')
|
151 |
-
prompt_template = 'xtuner.utils.PROMPT_TEMPLATE.vicuna'
|
152 |
-
randomness = dict(deterministic=False, seed=None)
|
153 |
-
resume = False
|
154 |
-
runner_type = 'FlexibleRunner'
|
155 |
-
strategy = dict(
|
156 |
-
config=dict(
|
157 |
-
bf16=dict(enabled=True),
|
158 |
-
fp16=dict(enabled=False, initial_scale_power=16),
|
159 |
-
gradient_accumulation_steps='auto',
|
160 |
-
gradient_clipping='auto',
|
161 |
-
train_micro_batch_size_per_gpu='auto',
|
162 |
-
zero_allow_untested_optimizer=True,
|
163 |
-
zero_force_ds_cpu_optimizer=False,
|
164 |
-
zero_optimization=dict(overlap_comm=True, stage=2)),
|
165 |
-
exclude_frozen_parameters=True,
|
166 |
-
gradient_accumulation_steps=1,
|
167 |
-
gradient_clipping=1,
|
168 |
-
train_micro_batch_size_per_gpu=16,
|
169 |
-
type='xtuner.engine.DeepSpeedStrategy')
|
170 |
-
tokenizer = dict(
|
171 |
-
padding_side='right',
|
172 |
-
pretrained_model_name_or_path='lmsys/vicuna-7b-v1.5',
|
173 |
-
trust_remote_code=True,
|
174 |
-
type='transformers.AutoTokenizer.from_pretrained')
|
175 |
-
train_cfg = dict(by_epoch=True, max_epochs=1, val_interval=1)
|
176 |
-
train_dataloader = dict(
|
177 |
-
batch_size=16,
|
178 |
-
collate_fn=dict(type='xtuner.dataset.collate_fns.default_collate_fn'),
|
179 |
-
dataset=dict(
|
180 |
-
data_path=
|
181 |
-
'./data/llava_data/LLaVA-Instruct-150K/llava_v1_5_mix665k.json',
|
182 |
-
dataset_map_fn='xtuner.dataset.map_fns.llava_map_fn',
|
183 |
-
image_folder='./data/llava_data/llava_images',
|
184 |
-
max_length=1472,
|
185 |
-
pad_image_to_square=True,
|
186 |
-
image_processor=dict(
|
187 |
-
pretrained_model_name_or_path='openai/clip-vit-large-patch14-336',
|
188 |
-
trust_remote_code=True,
|
189 |
-
type='transformers.CLIPImageProcessor.from_pretrained'),
|
190 |
-
template_map_fn=dict(
|
191 |
-
template='xtuner.utils.PROMPT_TEMPLATE.vicuna',
|
192 |
-
type='xtuner.dataset.map_fns.template_map_fn_factory'),
|
193 |
-
tokenizer=dict(
|
194 |
-
padding_side='right',
|
195 |
-
pretrained_model_name_or_path='lmsys/vicuna-7b-v1.5',
|
196 |
-
trust_remote_code=True,
|
197 |
-
type='transformers.AutoTokenizer.from_pretrained'),
|
198 |
-
type='xtuner.dataset.LLaVADataset'),
|
199 |
-
num_workers=0,
|
200 |
-
sampler=dict(
|
201 |
-
length_property='modality_length',
|
202 |
-
per_device_batch_size=16,
|
203 |
-
type='xtuner.dataset.samplers.LengthGroupedSampler'))
|
204 |
-
visual_encoder_name_or_path = 'openai/clip-vit-large-patch14-336'
|
205 |
-
visualizer = None
|
206 |
-
warmup_ratio = 0.03
|
207 |
-
weight_decay = 0
|
208 |
-
work_dir = './work_dirs/llava_vicuna_7b_v15_qlora_clip_vit_large_p14_336_lora_e1_gpu8_finetune'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|