GithubHelp home page GithubHelp logo

zzoy / machinecomprehension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yyhaker/machinecomprehension

0.0 1.0 0.0 1.4 MB

2019 Baidu Machine Reading Comprehension Competition!

License: MIT License

Python 89.46% Shell 1.03% Jupyter Notebook 9.51%

machinecomprehension's Introduction

MRC2019

Develop Requirements

  • OS: Ubuntu 16.04 LTS (64bit)
  • GPU: Nvidia Titan Xp
  • Language: Python 3.6.2.
  • Pytorch: 0.4.1
  • nltk==3.2.4
  • tensorboardX==0.8
  • torchtext==0.3.1

Data

类型 train dev test
2019比赛官网数据下载 27W 3000 7000

Performance

Model data type zhidao_dev(Rouge-L) zhidao_dev_(Bleu-4) search_dev(Rouge-L) search_dev(Blue-4) Rouge-L Blue-4
BiDAF data_v1.0_指定para 67.29 58.28 36.14 25.78
BiDAF process_3para_指定para 56.78
BiDAF process_3para 44.57
BiDAF+pretrain_w2v process_3para 50.08 42.42 48.59 30.81
BiDAF+pretrain_w2v+yes_no process_3para 51.60 42.42 50.02 44.45
BiDAF+pretrain_w2v+PR+yes_no process_3para 52.42 42.72 50.41 45.16
BiDAF+pretrain_w2v+PR+yes_no(ensemble small) process_3para 50.78 44.53
BiDAF+pretrain_w2v+PR+yes_no(ensemble large) process_3para 51.53 45.58
R-net(too slow)

最终leaderBoard

avatar

competition process

  1. 对zhidao和search进行数据预处理, 以启发式的方法尽可能的筛选过滤数据(花费了大部分时间)
  2. 利用PyTorch模版,加载dureader数据,实现BiDAF
  3. 使用w2v在zhidao和search数据上训练词向量,作为训练的初始向量
  4. 在BiDAF中实现PR,实现multitask
  5. 实验yes_no分类
  6. 实现R-Net,并行训练
  7. 在para之间加特殊分隔符
  8. 多answers训练,加权loss
  9. 先预测一个范围,在预测精准答案span

conclusion

  1. 由于zhidao和search数据的特殊性和冗乱,借鉴与2018届冠军的思路,我们在数据预处理上花费了接近半个 月的时间,不过启发式预处理数据是有效果的
  2. 在zhidao和search上预训练词向量很有用
  3. 段落之间设置分隔符,部分词向量更新策略很有用

problems

  1. torch0.4.0无法实现RNN模型的并行训练,有缺陷,升级为0.4.1就好使了
  2. 部分词向量更新无法在PyTorch上实现并行训练,仍然没有找到解决办法
  3. 没有高效的用PyTorch实现R-Net

machinecomprehension's People

Contributors

mrtuo avatar yyhaker avatar

Watchers

James Cloos 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.