SYSTEM = '' accumulative_counts = 2 batch_size = 8 betas = ( 0.9, 0.999, ) custom_hooks = [ dict( tokenizer=dict( padding_side='right', pretrained_model_name_or_path='internlm/internlm2-1_8b', trust_remote_code=True, type='transformers.AutoTokenizer.from_pretrained'), type='xtuner.engine.hooks.DatasetInfoHook'), dict( evaluation_images='https://llava-vl.github.io/static/images/view.jpg', evaluation_inputs=[ '请描述一下这张照片', 'Please describe this picture', ], every_n_iters=500, image_processor=dict( pretrained_model_name_or_path='google/siglip-so400m-patch14-384', trust_remote_code=True, type='transformers.SiglipImageProcessor.from_pretrained'), prompt_template='xtuner.utils.PROMPT_TEMPLATE.internlm2_chat', system='', tokenizer=dict( padding_side='right', pretrained_model_name_or_path='internlm/internlm2-1_8b', trust_remote_code=True, type='transformers.AutoTokenizer.from_pretrained'), type='xtuner.engine.hooks.EvaluateChatHook'), ] data_path = './llava_data/llava_v1_5_lrv_mix1008k.json' data_root = './llava_data/' dataloader_num_workers = 4 default_hooks = dict( checkpoint=dict( by_epoch=False, interval=500, max_keep_ckpts=2, type='mmengine.hooks.CheckpointHook'), logger=dict( interval=10, log_metric_by_epoch=False, type='mmengine.hooks.LoggerHook'), param_scheduler=dict(type='mmengine.hooks.ParamSchedulerHook'), sampler_seed=dict(type='mmengine.hooks.DistSamplerSeedHook'), timer=dict(type='mmengine.hooks.IterTimerHook')) dino_path = 'facebook/dinov2-large' env_cfg = dict( cudnn_benchmark=False, dist_cfg=dict(backend='nccl'), mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0)) evaluation_freq = 500 evaluation_images = 'https://llava-vl.github.io/static/images/view.jpg' evaluation_inputs = [ '请描述一下这张照片', 'Please describe this picture', ] image_folder = './llava_data/llava_images' image_processor = dict( pretrained_model_name_or_path='google/siglip-so400m-patch14-384', trust_remote_code=True, type='transformers.SiglipImageProcessor.from_pretrained') image_processor_path = 'google/siglip-so400m-patch14-384' launcher = 'pytorch' llava_dataset = dict( data_path='./llava_data/llava_v1_5_lrv_mix1008k.json', dataset_map_fn='xtuner.dataset.map_fns.llava_map_fn', image_folder='./llava_data/llava_images', image_processor=dict( pretrained_model_name_or_path='google/siglip-so400m-patch14-384', trust_remote_code=True, type='transformers.SiglipImageProcessor.from_pretrained'), max_length=1472, pad_image_to_square=False, template_map_fn=dict( template='xtuner.utils.PROMPT_TEMPLATE.internlm2_chat', type='xtuner.dataset.map_fns.template_map_fn_factory'), tokenizer=dict( padding_side='right', pretrained_model_name_or_path='internlm/internlm2-1_8b', trust_remote_code=True, type='transformers.AutoTokenizer.from_pretrained'), type='xtuner.dataset.LLaVADataset') llm_name_or_path = 'internlm/internlm2-1_8b' load_from = None log_level = 'INFO' log_processor = dict(by_epoch=False) lr = 2e-05 max_epochs = 2 max_length = 1472 max_norm = 1 model = dict( dino=dict( pretrained_model_name_or_path='facebook/dinov2-large', type='transformers.Dinov2Model.from_pretrained'), freeze_llm=False, freeze_visual_encoder=True, llm=dict( pretrained_model_name_or_path='internlm/internlm2-1_8b', quantization_config=dict( bnb_4bit_compute_dtype='torch.float16', bnb_4bit_quant_type='nf4', bnb_4bit_use_double_quant=True, llm_int8_has_fp16_weight=False, llm_int8_threshold=6.0, load_in_4bit=True, load_in_8bit=False, type='transformers.BitsAndBytesConfig'), torch_dtype='torch.float16', trust_remote_code=True, type='transformers.AutoModelForCausalLM.from_pretrained'), siglip=dict( pretrained_model_name_or_path='google/siglip-so400m-patch14-384', type='transformers.SiglipVisionModel.from_pretrained'), type='xtuner.model.LLaVAModel') optim_type = 'torch.optim.AdamW' optim_wrapper = dict( optimizer=dict( betas=( 0.9, 0.999, ), lr=2e-05, type='torch.optim.AdamW', weight_decay=0.1), type='DeepSpeedOptimWrapper') param_scheduler = [ dict( begin=0, by_epoch=True, convert_to_iter_based=True, end=0.06, start_factor=1e-05, type='mmengine.optim.LinearLR'), dict( begin=0.06, by_epoch=True, convert_to_iter_based=True, end=2, eta_min=0.0, type='mmengine.optim.CosineAnnealingLR'), ] prompt_template = 'xtuner.utils.PROMPT_TEMPLATE.internlm2_chat' randomness = dict(deterministic=False, seed=None) resume = False runner_type = 'FlexibleRunner' save_steps = 500 save_total_limit = 2 siglip_path = 'google/siglip-so400m-patch14-384' strategy = dict( config=dict( bf16=dict(enabled=True), fp16=dict(enabled=False, initial_scale_power=16), gradient_accumulation_steps='auto', gradient_clipping='auto', train_micro_batch_size_per_gpu='auto', zero_allow_untested_optimizer=True, zero_force_ds_cpu_optimizer=False, zero_optimization=dict(overlap_comm=True, stage=2)), exclude_frozen_parameters=True, gradient_accumulation_steps=2, gradient_clipping=1, train_micro_batch_size_per_gpu=8, type='xtuner.engine.DeepSpeedStrategy') tokenizer = dict( padding_side='right', pretrained_model_name_or_path='internlm/internlm2-1_8b', trust_remote_code=True, type='transformers.AutoTokenizer.from_pretrained') train_cfg = dict(max_epochs=2, type='xtuner.engine.runner.TrainLoop') train_dataloader = dict( batch_size=8, collate_fn=dict(type='xtuner.dataset.collate_fns.default_collate_fn'), dataset=dict( data_path='./llava_data/llava_v1_5_lrv_mix1008k.json', dataset_map_fn='xtuner.dataset.map_fns.llava_map_fn', image_folder='./llava_data/llava_images', image_processor=dict( pretrained_model_name_or_path='google/siglip-so400m-patch14-384', trust_remote_code=True, type='transformers.SiglipImageProcessor.from_pretrained'), max_length=1472, pad_image_to_square=False, template_map_fn=dict( template='xtuner.utils.PROMPT_TEMPLATE.internlm2_chat', type='xtuner.dataset.map_fns.template_map_fn_factory'), tokenizer=dict( padding_side='right', pretrained_model_name_or_path='internlm/internlm2-1_8b', trust_remote_code=True, type='transformers.AutoTokenizer.from_pretrained'), type='xtuner.dataset.LLaVADataset'), num_workers=4, sampler=dict(shuffle=True, type='mmengine.dataset.DefaultSampler')) visualizer = dict( type='mmengine.visualization.Visualizer', vis_backends=[ dict(type='mmengine.visualization.TensorboardVisBackend'), ]) warmup_ratio = 0.03 weight_decay = 0.1 work_dir = './work_dirs/train_config'