GithubHelp home page GithubHelp logo

mrc2018's Introduction

MRC2018

  • 2018机器阅读理解技术竞赛 竞赛网站
  • 参赛模型:BiDAF+Self Attention+Pre(single)
  • 最终排名:28/105(菜鸡第一次参赛)

最近更新

  • 2018/09/11更新,AAAI赶完了,感谢大家的star。
  1. basic_rnn.py 现已支持multi-layer的RNNCell(Tensorflow单层RNN和多层RNN的用法完全不同。。。),添加了最新的SRU和IndyRNN
  2. rc_model.py Adam更换为速度更快的LazyAdam,需tf>=1.9
  • 2018/08/20更新,po主在赶AAAI,焦头烂额。。。先简单写一下,整个模型的训练和修改流程(以BiDAF+Self Attention为例,后续做成PDF详解):
  1. /dureader/run.py --prepare(数据预处理) --train(训练、预测)
  2. /dureader/rc_model.py 模型(做修改可从此处着手)
  3. /dureader/layers 各种层(pointnet,match layer,cudnn rnn)
  4. /dureader/json_to_sentence.py 从原始json文件中提取文本
  5. /dureader/pretrain_embedding.py 预训练词向量
  6. /dureader/SIF.py 参考论文A Simple but Tough-to-Beat Baseline for Sentence Embeddings,但效果不佳。。。
  7. /utils 评价指标
  • 2018/08/20更新,最好成绩使用的参数即为BiDAF+Self Attention/run.py中默认参数
  • 2018/08/06更新,po主参加了在语言与智能高峰论坛上举办的比赛颁奖典礼,发现都是前期特征工程提升巨大,模型上未有亮眼工作,如果拿到了前几名的技术报告,会推上来
  • 2018/08/06更新,百度现已开放全部数据,下边的数据集统计表中已更新链接,比赛成绩也会放上来,大家可以日常打榜。颁奖典礼上负责人表示,比赛明年还会继续举办,大家加油!

参考模型

参考代码

Requirements

General

  • Python >= 3.4
  • numpy

Python Packages

  • tensorflow-gpu >= 1.9.0
  • ujson
  • pickle
  • tqdm

Data

类型 train dev test
比赛 27W 1W 2W
开放 20W 1W 1W

Performance

Score(Public Board)

Model Rouge-L Bleu-4
BiDAF(cuDNN based) 46.56 40.95
R-Net 42.09 41.1
BiDAF+Self Attention 47.28 41.3
BiDAF+Self Attention+Gated RNN 47.71 41.75

Memory and Time

i7-7700k + 32G RAM + GTX1080Ti
batch size=32 dropout=0.7

Model GPU Memory Time(50 batch) word embedding trainable
BiDAF(origin) 8431M 47s false
MLSTM 10655M 1min27s false
R-Net 4295M 23s false
BiDAF+Self Attention(cuDNN based) 8431M 22s false
BiDAF+Self Attention+Gated RNN(Pre) N/A N/A false

BUG:

  1. BiDAF+Self Attention无法保存后再加载模型,tensorflow的cuDNN_LSTM虽然极快,但太难用了
  2. R-Net本地的两个指标极差,提交的结果倒是正常

Other

  • 实际还有基于HKUST的BiDAF版本,显存和时间占用略小于R-Net,但效果比BiDAF(origin)大约低2个点,可能是使用了GRU的原因
  • 最终在训练时无法保存最优模型的情况下,只能针对当前最优epoch进行一次predict,极为耗时
  • 这个repo的Self Attention加在了match layer,后来发现cs224n的做法是基于match layer的输出做Self Attention,估计效果更好

mrc2018's People

Contributors

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