Closed nkcsjxd closed 8 months ago
不好意思,bash文件内容是这个,刚刚弄错了
exp_tag="h1" python finetune.py \ --base_model 'model/huozi-7b-rlhf' \ --data_path './data/llama_data.json' \ --output_dir './huozi-7b-rlhf-'$exp_tag \ --prompt_template_name 'bloom_deploy' \ --micro_batch_size 128 \ --batch_size 128 \ --wandb_run_name $exp_tag
您好,看您的模型名可能是使用的活字2.0,请下载活字1.0版本进行尝试,当前开源的lora基于活字1.0
您好,请问基于活字的finetune效果如何?
将原本设置改为
lora_target_modules: List[str] = [
# "q_proj",
# "v_proj",
"query_key_value"
],
完整的报错信息如下: nohup: ignoring input
===================================BUG REPORT=================================== Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues
CUDA SETUP: CUDA runtime path found: /home/gfr/miniconda3/envs/jxd-med/lib/libcudart.so CUDA SETUP: Highest compute capability among GPUs detected: 8.6 CUDA SETUP: Detected CUDA version 118 CUDA SETUP: Loading binary /home/gfr/miniconda3/envs/jxd-med/lib/python3.9/site-packages/bitsandbytes/libbitsandbytes_cuda118.so... Training Alpaca-LoRA model with params: base_model: model/huozi-7b-rlhf data_path: ./data/llama_data.json output_dir: ./huozi-7b-rlhf-h1 batch_size: 128 micro_batch_size: 128 num_epochs: 10 learning_rate: 0.0003 cutoff_len: 256 val_set_size: 500 lora_r: 8 lora_alpha: 16 lora_dropout: 0.05 lora_target_modules: ['q_proj', 'v_proj'] train_on_inputs: False group_by_length: False wandb_project: llama_med wandb_run_name: h1 wandb_watch: wandb_log_model: resume_from_checkpoint: False prompt template: bloom_deploy
Loading checkpoint shards: 100%|██████████| 15/15 [00:23<00:00, 1.55s/it] Traceback (most recent call last): File "/home/gfr/jxd/Huatuo-Llama-Med-Chinese-main/finetune.py", line 289, in
fire.Fire(train)
File "/home/gfr/miniconda3/envs/jxd-med/lib/python3.9/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/gfr/miniconda3/envs/jxd-med/lib/python3.9/site-packages/fire/core.py", line 475, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/home/gfr/miniconda3/envs/jxd-med/lib/python3.9/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/home/gfr/jxd/Huatuo-Llama-Med-Chinese-main/finetune.py", line 181, in train
model = get_peft_model(model, config)
File "/home/gfr/miniconda3/envs/jxd-med/lib/python3.9/site-packages/peft/mapping.py", line 120, in get_peft_model
return MODEL_TYPE_TO_PEFT_MODEL_MAPPING[peft_config.task_type](model, peft_config)
File "/home/gfr/miniconda3/envs/jxd-med/lib/python3.9/site-packages/peft/peft_model.py", line 662, in init
super().init(model, peft_config, adapter_name)
File "/home/gfr/miniconda3/envs/jxd-med/lib/python3.9/site-packages/peft/peft_model.py", line 99, in init
self.base_model = PEFT_TYPE_TO_MODEL_MAPPING[peft_config.peft_type](
File "/home/gfr/miniconda3/envs/jxd-med/lib/python3.9/site-packages/peft/tuners/lora.py", line 154, in init
self.add_adapter(adapter_name, self.peft_config[adapter_name])
File "/home/gfr/miniconda3/envs/jxd-med/lib/python3.9/site-packages/peft/tuners/lora.py", line 161, in add_adapter
self._find_and_replace(adapter_name)
File "/home/gfr/miniconda3/envs/jxd-med/lib/python3.9/site-packages/peft/tuners/lora.py", line 254, in _find_and_replace
raise ValueError(
ValueError: Target modules ['q_proj', 'v_proj'] not found in the base model. Please check the target modules and try again.
运行命令:
nohup bash ./scripts/huozi-finetune.sh > ./log/h1.log 2>&1 &
bash文件内容: `#!/bin/bashexp_tag="e1" python finetune.py \ --base_model 'decapoda-research/llama-7b-hf' \ --data_path './data/llama_data.json' \ --output_dir './lora-llama-med-'$exp_tag \ --prompt_template_name 'med_template' \ --micro_batch_size 128 \ --batch_size 128 \ --wandb_run_name $exp_tag`