Code Monkey home page Code Monkey logo

casr's Introduction

This is the implement of the paper, CASR: Generating Complicated Sequences with Autoregressive Self-Boost Refinement.

The overview logic is in utils.cascade_trainer.CascadeSeq2SeqTrainer.train_all

Quick Start

build and run the docker image with Dockerfile_sing for fine-tuning and Dockerfile_ada for adapter-tuning

set the MASTER_PORT and TASK environment variable:

export MASTER_PORT=12345
export TASK=webqsp (or mtop, kvret)

To train finetuning+sepenc+continue, run:

bash script/ft-t5-con/run_sing.sh

To train continue on Sudoku, run:

BART_SIZE=base bash script/trainer_sudoku.sh

To train CASR-Large, run:

bash script/trainer_large.sh

Baselines

bash baselines/inat/train.sh # INAT
bash baselines/levenshtein/train.sh # Levenshtein
bash baselines/bidirectional/train.sh # Bidirectional
python -m baselines.progressive.prepare_vocab && bash baselines/progressive/train.sh # Progressive

To try CASR on ChatGPT, run:

TASK=<your task> python empirical/chatgpt-test.py

Empirical Studies

Scripts of empirical studies are in this directory empirical

More Case Studies

More cases are in this directory cases

casr's People

Contributors

ralphhan avatar

Stargazers

 avatar

Watchers

 avatar

casr's Issues

[Question] iterative refinement prone to overfit

Hi. Your idea of modeling complex sequences via so-called self-boost refinement is very interesting.

I tried to implement this approach to neural machine translation. That is, train an autoregressive model $M^{0}$ to translate a source sequence to a target sequence in the teacher-forcing manner. After training enough, generate the predicted version of the target sequences. Then, take the source sequence and predicted target sequence as input to the second autoregressive model $M^{1}$ and still train it in the teacher-forcing manner. And so on.

However, I found that, since this is not an end-to-end procedure, the validation loss goes higher as the Castep increases. The expectation that the later model corrects the wrong part of the previous prediction according to other parts it depends on fails. This result is not a surprise to me because the model can easily find a shortcut which is just simply copying the inputs and this shortcut conveniently maintains a good likelihood loss. In other words, in my implementation, only the first model $M^{0}$ learns something, and the subsequent model $\lbrace M^{t}\rbrace_{t&gt;0}$ just overfits the input and is too lazy to try to correct the wrong predictions.

So I am wondering how exactly CASR model can achieve refinement.

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.