Coder Social home page Coder Social logo

dapo's Introduction

Dialogue-adaptive Pre-training from Quality Estimation

This is the code for the paper Dialogue-adaptive Pre-training from Quality Estimation

1. Requirements

(Our experiment environment for reference)

Python 3.7+

Pytorch (1.0.0)

NLTK (3.4.5)

2. Datasets

2.1 Datasets for constructing pre-training corpus

DaliyDialog ---->./datasets/dialog/ijcnlp_daillydialog/

PERSONA-CHAT ---->./datasets/dialog/convai2_personachat/

Topical-Chat ---->./datasets/dialog/topicalchat/

BlendedSkillTalk ---->./datasets/dialog/blended_skill_talk/

After downloading these datasets, extract them to the corresponding directories.

2.2 Datasets for Downstream Tasks

MuTual&MuTual$^{plus}$

DailyDialog&PERSONA-CHAT(Annotated)

We slightly pre-process the datasets so that they have a uniform format. The pre-processed data can be found in ./datasets/

3. Instructions

3.1 Construct Pre-training Corpus

Get raw text of the dialogues

python ./codes/dialog_dapo/process_rawtext.py

Count the n-grams

python ./codes/dialog_dapo/countngram.py

Get n-NIDFs

python ./codes/dialog_dapo/get_nidf.py

Bulid the pre-training corpus

python ./codes/dialog_dapo/dialog_text_preeval.py

Split the pre-training corpus

python ./codes/dialog_dapo/split_rawtext.py

Move the pre-training corpus to the target directory

mv ./datasets/dialog/rawtext_dialog_score_train.csv ./datasets/dialog_eval_pretrain/rawtext_pretrain/train.csv
mv ./datasets/dialog/rawtext_dialog_score_dev.csv ./datasets/dialog_eval_pretrain/rawtext_pretrain/dev.csv

3.2 Pre-training ELECTRA with DAPO and fine-tuning on downstream tasks

We provide the scripts used for pre-training and fine-tuning.

Pre-training

sh ./codes/dialog_dapo/scripts/pretrain_myptALL_3_NIDF.sh

Fine-tuning

sh ./codes/dialog_dapo/scripts/downstream_myptALL_3_NIDF.sh

The results can be found in ./results/electraDAPO_myptALL_3_NIDF/electraDAPO_myptALL_3_NIDF_downstream_log_results.txt.

dapo's People

Contributors

lockon-n 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.