Giter Site home page Giter Site logo

pareto_set_learning's Introduction

Towards Efficient Pareto Set Approximation via Weight-Ensembling Mixture of Experts

framework

How to reproduce the results:

for CLIP models:

  1. Download checkpoints from Google Drive.
  2. The running scripts are placed at scripts directory, or you can run bash clip_pareto_moe.sh <method> <version>. The method can be moe_ls, and moe_epo. For detailed hyperparameter configuration of different verisons, please refer to the bash script.

    for LS, EPO, and MGDA, see clip_mtl.sh

  3. the results would be saved at results directory.

for GPT-2 models:

  1. Download chekpoints form HuggingFace, fine-tuned checkpoints would be available after double-blind review.

    the fine-tuning scripts are also provided, you can fine-tune the model on specific task. such as python scripts/gpt2_finetune.py --dataset qqp.

  2. The running scripts are placed at scripts directory, or you can run bash gpt2_pareto_moe.sh <method> <version>. The method can be moe_ls, and moe_epo. For detailed hyperparameter configuration of different verisons, please refer to the bash script.

    for other baselines, see gpt2_merge.sh

  3. The results would be saved at results directory.

For DDP training, pass --num_devices <num_devices> as arguments. for example, bash gpt2_pareto_moe.sh moe_ls 6 --num_devices 4.

For GPT-2 model with DDP training, you need to modify the file site-packages/transformers/models/gpt2/modeling_gpt2.py

attn_weights = torch.where(causal_mask, attn_weights.to(attn_weights.dtype), mask_value)

# clone the tensor to avoid in-place operation error 
attn_weights = torch.where(causal_mask.clone(), attn_weights.to(attn_weights.dtype), mask_value)

pareto_set_learning's People

Contributors

tanganke avatar

Stargazers

lishen avatar  avatar

Watchers

 avatar

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.