# M$^3$PL: Identifying and Exploiting View Bias of Prompt Learning

## Installation 
For installation and other package requirements, please follow the instructions detailed in [INSTALL.md](docs/INSTALL.md). 

## Data preparation
Please follow the instructions at [DATASETS.md](docs/DATASETS.md) to prepare all datasets.


## Training and Evaluation
Please refer to the [RUN.md](docs/RUN.md) for detailed instructions on training and evaluating.

Our parameter configuration file is in the ./configs/trainers/M3PL/ directory, and our run script files are in the . /scripts/m3pl/ directory.

For the cross-dataset generalization and domain generalization settings, please use xd_train.py and xd_test.py.

For the Base-to-New generalization setting, please use base2new_train.py and base2new_test.py.


## Acknowledgements

Our code is based on [CoOp](https://github.com/KaiyangZhou/CoOp) and [MaPLe](https://github.com/muzairkhattak/multimodal-prompt-learning) repository. We thank the authors for releasing their code. If you use our model and code, please consider citing these works as well.

