Giter VIP home page Giter VIP logo

pst's Introduction

PST

Source code for IJCAI 2022 Long paper: Parameter-Efficient Sparsity for Large Language Models Fine-Tuning.

๐Ÿ”ฅ Introduction

With the dramatically increased number of parameters in language models, sparsity methods have received ever-increasing research focus to compress and accelerate the models. While most research focuses on how to accurately retain appropriate weights while maintaining the performance of the compressed model, there are challenges in the computational overhead and memory footprint of sparse training when compressing large-scale language models. To address this problem, we propose a Parameter-efficient Sparse Training (PST) method to reduce the number of trainable parameters during sparse-aware training in downstream tasks. Specifically, we first combine the data-free and data-driven criteria to efficiently and accurately measure the importance of weights. Then we investigate the intrinsic redundancy of data-driven weight importance and derive two obvious characteristics i.e. low-rankness and structuredness. Based on that, two groups of small matrices are introduced to compute the data-driven importance of weights, instead of using the original large importance score matrix, which therefore makes the sparse training resource-efficient and parameter-efficient.

You can refer to our paper for more details.

๐Ÿ‹๐Ÿปโ€โ™‚๏ธ Repository Overview

There are several directories in this repo:

pst/ contains the source code for the package pst;

NLG/ contains an example implementation of PST in GPT-2 using our package, which can be used to reproduce the result in our paper;

NLU/ contains an example implementation of PST in BERT and RoBERTa using our package, which can be used to reproduce the result in our paper;

๐Ÿš€ Quickstart

  1. Install the dependencies
pip3 install -r requirement.txt
  1. Import PST library
export PYTHONPATH=$(pwd):$PYTHONPATH
  1. Training network in NLU and NLG

๐ŸŒ Citation

If you use this work or code, please kindly cite the following paper:

@inproceedings{li-etal-2022-pst,
    title = "Parameter-Efficient Sparsity for Large Language Models Fine-Tuning",
    author = "Yuchao Li and Fuli Luo and Chuanqi Tan and Mengdi Wang and Songfang Huang and Shen Li and Junjie Bai",
    booktitle = "31th International Joint Conference on Artificial Intelligence",
    year = "2022"
}

pst's People

Contributors

yuchaoli 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.