Giter Club home page Giter Club logo

mt5's Introduction

T5 for nlp task:

Two nlp-task about Text Classification(artificial prompt) and Text Summary based on T5/mt5/t5-pegasus had been tested Here.

Notes: 从T5、mT5、T5-PEGASUS对比与实践

How to run?

data had been uploaded to the folder./data

  1. Text Classification

cd t5_nlp/nlu_classification
python train.py --pretrained_path /data/Learn_Project/Backup_Data/mt5-small

  1. Text Summary
  • download the mt5/t5-pegasus pre-train model first.
  • you can run mt5/t5-pegasus by changing the the pretrained_path here.

cd t5_nlp/nlg_task
python train.py --pretrained_path /data/Learn_Project/Backup_Data/t5-pegasus-small

Result

1. Text Classification

Tested on two data sizes in training model.

precision recall f1 data size
mT5-small 0.6434 0.6347 0.6311 n=100
mT5-small 0.8075 0.7935 0.7954 n=1000
mT5-small 0.8543 0.8546 0.8544 n=10000

2. Text Summary

Dataset CSL: 3000 samples
Limit of my gpu memory, sentence length are set max_len=64, label_len=20, you could set it longer for getting better result

rouge-1 rouge-2 rouge-l BLEU config
T5-Pegasus-small 0.5069 0.3030 0.4677 0.3111 max_len=64, label_len=32, batch_size=16
mT5-small 0.4517 0.3402 0.4251 0.3020 max_len=64, label_len=20, batch_size=4

pretrained model you can find here:

mt5's People

Contributors

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