GithubHelp home page GithubHelp logo

controlprefixes's Introduction

LICENSE GitHub issues

Control Prefixes for Parameter-efficient Text Generation! ๐Ÿš…

This is the implementation of Control Prefixes for Parameter-efficient Text Generation

This technique extends Prefix-Tuning, a parameter-efficient technique that tunes prompts at every layers of the transformer and keeps the base LM fixed. Control Prefixes was the first paper to prefix-tune T5 and therefore show how powerful this architecture can be for Structure knowledge graph tasks such as Data-to-Text.

Control Prefixes or LayerControl extends the prefix-tuning framework by having multiple control prefixes for data-point level information. This can inform the model at every layer of attribute-level information and fits into the prefix-tuning framework by sharing the same reparameterizations. Control Prefixes outperforms other methods of conditioning on attribute information that only operate on the token level.

As a result the technique is state-of-the-art on several datasets:

Data-to-Text:

PWC

PWC

PWC

PWC

Abstractive Text Summarization:

PWC

Text Simplification:

PWC

Developed By

Jordan Clive([email protected]). If you have any questions or ideas/improvements please contact me.

Installation

git clone https://github.com/jordiclive/ControlPrefixes.git
cd ControlPrefixes
pip install .
unzip src/data.zip
unzip src/datatotext/utils.zip

Usage

Data-to-Text datasets with conditional data-point attribute information is provided at src/data/. For XSum, sample files are provided.

Each model config is contained in the config folder. E.g. For data-to-text at src/datatotext/configs/. Edit the data and output directory paths, gpus. To use distributed training refer to the Pytorch-Lightning docs.

To run training, e.g. for the original 2017 WebNLG.

$ cd src/datatotext 
$ python read_yaml.py configs/webnlg17_config.yaml

License

Apache License

Citations


@article{DBLP:journals/corr/abs-2110-08329,
  author    = {Jordan Clive and
               Kris Cao and
               Marek Rei},
  title     = {Control Prefixes for Text Generation},
  journal   = {CoRR},
  volume    = {abs/2110.08329},
  year      = {2021},
  url       = {https://arxiv.org/abs/2110.08329},
  eprinttype = {arXiv},
  eprint    = {2110.08329},
  timestamp = {Fri, 22 Oct 2021 13:33:09 +0200},
  biburl    = {https://dblp.org/rec/journals/corr/abs-2110-08329.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

@article{DBLP:journals/corr/abs-2101-00190,
  author    = {Xiang Lisa Li and
               Percy Liang},
  title     = {Prefix-Tuning: Optimizing Continuous Prompts for Generation},
  journal   = {CoRR},
  volume    = {abs/2101.00190},
  year      = {2021},
  url       = {https://arxiv.org/abs/2101.00190},
  archivePrefix = {arXiv},
  eprint    = {2101.00190},
  timestamp = {Thu, 21 Jan 2021 14:42:30 +0100},
  biburl    = {https://dblp.org/rec/journals/corr/abs-2101-00190.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

controlprefixes's People

Contributors

jordanclive50 avatar jordiclive 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.