Yaming Yang*, Dilxat Muhtar*, Yelong Shen* , Yuefeng Zhan, Jianfeng Liu, Yujing Wang, Hao Sun, Denvy Deng, Feng Sun, Qi Zhang, Weizhu Chen, and Yunhai tong
(*Equal Contribution)
MTL-LoRA enhances the multi-task learning capabilities of LoRA by introducing task-adaptive parameters that distinguish task-specific information while efficiently capturing shared knowledge across tasks in low-dimensional spaces. MTL-LoRA outperforms LoRA and its variants with comparable or fewer learnable parameters in multi-task learning scenarios.
The standalone implementation of MTL-LoRA can be found here. Currently, we only support for tuning linear layer.
-
Setup
conda create -n mtl-lora python==3.10 -y conda activate mtl-lora pip install torch pip install -r requirements.txt
-
Datasets
-
Fine-tuning
-
The script for fine-tuning different adapters can be found at
./script
. -
For fine-tuning with MTL-LoRA:
- Specify the
DATA_PATH
,OUTPUT_PATH
, andCACHE_PATH
(For caching the tokenized data).
bash ./script/llama2_7B_mlora_qkvo.sh 8 16
- Specify the
-
-
Evaluation
- The script for evaluation can be found at
./script
- For evaluation MTL-LoRA:
bash ./script/llama2_7B_mlora_qkvo_eval.sh $CHECKPOINT_PATH $OUTPUT_PATH
- The script for evaluation can be found at
Please follow the instruction here.
We gratitude to the following repositories for their wonderful works:
Please contact us or post an issue if you have any questions: [email protected].