Giter Site home page Giter Site logo

align's Introduction

Tuning Multi-mode Token-level Prompt Alignment across Modalities [NeurIPS 2023]

This is the official implementation of our paper Tuning Multi-mode Token-level Prompt Alignment across Modalities in NeurIPS 2023.

avatar

The proposed ALIGN algorithm aims to learn multiple prompts in both textual and visual domains. Given the M visual prompts and N textual prompts, ALIGN first views the label/image as discrete distributions over the the M and N supporting, and each distribution itself can further be modeled as a discrete distribution over its model-specific token-level space. ALIGN applies the Prompt-level OT and Token-level OT to align those two domains.

TODO

Due to some ddls, we will add more details about the training scripts and results soon.

Getting Started

Install

  • Clone this repo:
git clone https://github.com/wds2014/ALIGN.git
cd ALIGN
  • Please follow the INSTALL.md to build the python environment.

Dataset

  • Datasets in our paper

The datasets we used is as the same as previous works (CoOp and MAPLE). Please follow the DATASETS.md to prepare all datasets.

Training

  • Easy to train:
cd scripts/mmp
bash base_to_new_train.sh

Change the DATASET and SEED in the .sh file to train our model in different datasets and seeds.

Citation

If you find this repo useful to your project, please consider to cite it with following bib:

@article{wang2023tuning,
  title={Tuning Multi-mode Token-level Prompt Alignment across Modalities},
  author={Wang, Dongsheng and Li, Miaoge and Liu, Xinyang and Xu, MingSheng and Chen, Bo and Zhang, Hanwang},
  journal={arXiv preprint arXiv:2309.13847},
  year={2023}
}

Acknowledgements

Our code is modified based on CoOp and MAPLE repository. We thank the authors for releasing their code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.