I wish to fine-tune a base LLM model using LoRA with multiple datasets that are structured differently (different columns and data types). I have two questions:
Can I fine-tune the model with the first dataset, then add/fine-tune the generated LoRA bin with the subsequent datasets? I want to end up with one LoRA bin trained on all of my different datasets. Is that possible?
If it's not, I will create a separate LoRA bin for each dataset. Can I load the multiple generated LoRA bins on top of the base model in the same session and use them simultaneously?
I can see on this page (https://github.com/huggingface/peft) that multi-adapter support is now available, but the code isn't clear on how to use it for fine-tuning and inferencing:
compute_environment: LOCAL_MACHINE
deepspeed_config:
gradient_accumulation_steps: 1
gradient_clipping: 1.0
offload_optimizer_device: cpu
offload_param_device: cpu
zero3_init_flag: true
zero3_save_16bit_model: true
zero_stage: 3
distributed_type: DEEPSPEED
downcast_bf16: 'no'
dynamo_backend: 'NO'
fsdp_config: {}
machine_rank: 0
main_training_function: main
megatron_lm_config: {}
mixed_precision: 'no'
num_machines: 1
num_processes: 1
rdzv_backend: static
same_network: true
use_cpu: false
The adapter-transformers library can "stack" or "fuse" different adapters as long as they are done through LoRA, unfortunately. You can see more here: https://docs.adapterhub.ml/adapter_composition.html#stack