Giter Club home page Giter Club logo

multmr's Introduction

MulTMR

Multiple Teachers Model for Ranking

The repository contains code implementation and dataset for paper Multilingual Serviceability Model for Ranking Help Requests on Social Media during Crisis Events.

Data preparation

  1. Download tweets based on ids' presented in the folder data.
  2. Create 3 files: train.csv, val.csv, test.csv. Each file should contain two colimns: 'text' and 'label'.

Datasets for behavioral fine-tuning:

  • sarcasm and irony detection dataset link
  • question type classification dataset link

After downloading datasets, create 3 files train.csv, val.csv, test.csv and save the in the folder inside the data folder. Each file should contain two colimns: 'text' and 'label'.

Installation

The code was tested on Python 3.10.

Install necessary dependencies with use of pip:

pip -r requirements.txt

Model fine-tuning

  1. Command for task-related fine-tuning:
python finetune.py bert data teacher_1

where

  • bert -- name of the model (could be bert or roberta)
  • data -- folder with data
  • teacher_1 -- name of folder for saving the task-related Teacher model
  1. Command for behavioral fine-tuning:
python finetune.py bert data/sarcasm teacher_2

where

  • bert -- name of the model (could be bert or roberta)
  • data/sarcasm -- folder with data for behavioral fine-tuning
  • teacher_2 -- name of folder for saving the behavior-guided Teacher model

Model distillation

Command for model distillation:

python distillation.py model/teacher_1 model/teacher_2 model/teacher_3

where model/teacher_1, model/teacher_2, and model/teacher_3 - paths to finetuned models.

multmr's People

Contributors

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