Skip to content

pUmpKin-Co/MTL-LoRA

Repository files navigation

MTL-LoRA: Low-Rank Adaptation for Multi-Task Learning

arXiv

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)

Introduction

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.

Usage and Reproducing

Implementation

The standalone implementation of MTL-LoRA can be found here. Currently, we only support for tuning linear layer.

Commonsense Reasoning

  • Setup

    conda create -n mtl-lora python==3.10 -y
    conda activate mtl-lora
    pip install torch
    pip install -r requirements.txt
    
  • Datasets

    • Please follow the instruction here to prepare the dataset.
    • For training MTL-LoRA or MoE-LoRA, please use the dataset with task IDs available here
  • 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, and CACHE_PATH (For caching the tokenized data).
      bash ./script/llama2_7B_mlora_qkvo.sh 8 16
      
  • 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
      

Image-Text Undetstanding

Please follow the instruction here.

Acknowledgements

We gratitude to the following repositories for their wonderful works:

Contact

Please contact us or post an issue if you have any questions: [email protected].

About

Implementation for MTL-LoRA: Low-Rank Adaptation for Multi-Task Learning

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published