This is the implementation of the SIGIR'24 paper "When MOE Meets LLMs: Parameter Efficient Fine-tuning for Multi-task Medical Applications".
If any quetions, you can firstly refer to the issues in initial repo.
You can implement our model according to the following steps:
- The handle dataset should be put into
./data/
- Put all files of ChatGLM-6B into the folder
resources/chatglm-6b/
and replace the themodeling_chatglm.py
by ourmodeling_chatglm.py
in this folder. - Install the necessary packages. Run the command:
pip install -r requirements.txt
- To train the MOELoRA and generate the answers to test, please run the command:
bash ./experiments/moelora.bash
- Finally, you can run and configure the
results/evaluate.ipynb
to get the evaluation scores
To ease the configuration of the environment, I list versions of my hardware and software equipments:
- Hardware:
- GPU: Tesla V100 32GB
- Cuda: 10.2
- Driver version: 440.95.01
- CPU: Intel Xeon Gold 6133
- Software:
- Python: 3.9.5
- Pytorch: 1.12.0+cu102
- transformers: 4.28.1
- deepspeed: 0.9.4
You can also try the environment.yml
to install the environment.
If the code and the paper are useful for you, it is appreciable to cite our paper:
@inproceedings{liu2024moe,
title={When MOE Meets LLMs: Parameter Efficient Fine-tuning for Multi-task Medical Applications},
author={Liu, Qidong and Wu, Xian and Zhao, Xiangyu and Zhu, Yuanshao and Xu, Derong and Tian, Feng and Zheng, Yefeng},
booktitle={Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval},
pages={1104--1114},
year={2024}
}
The code refers to the repo PromptCBLUE.
Besides, thank lhyscau to help me refine the code.