Should I use both of CPT lora and SFT lora for inference? #4954
Unanswered
BlueAnthony
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Reminder
System Info
LLaMA Factory: version 0.7.2.dev0
Reproduction
The following is my llama3_lora_sft.yaml.
model
model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
cache_dir: /home/llama-factory/
adapter_name_or_path: saves/llama3-8b/lora/cpt_bat32_20epoch_outlook
method
stage: sft
do_train: true
finetuning_type: lora
lora_target: q_proj,v_proj
dataset
dataset: openorca,lima
template: llama3
cutoff_len: 1024
max_samples: 1000
overwrite_cache: true
preprocessing_num_workers: 16
output
output_dir: saves/llama3-8b/lora/sft_bat32_10epoch_outlook
logging_steps: 10
save_steps: 100
plot_loss: true
overwrite_output_dir: true
train
per_device_train_batch_size: 8
gradient_accumulation_steps: 4
learning_rate: 0.0001
num_train_epochs: 10.0
lr_scheduler_type: cosine
warmup_steps: 0.1
fp16: true
eval
val_size: 0.1
per_device_eval_batch_size: 1
evaluation_strategy: steps
eval_steps: 500
Expected behavior
Can I use the LoRA generated from the CPT stage for SFT like the above yaml?
And during inference, should I list the paths for these two LoRAs in the YAML file in sequence?
It seems that when both the CPT and SFT LoRAs are added simultaneously, the inference results become talking nonsense. However, if only the SFT LoRA is used, the responses are more normal.
Others
No response
Beta Was this translation helpful? Give feedback.
All reactions