Giter Site home page Giter Site logo

dureader-bert's Introduction

Dureader-Bert

2019 Dureader机器阅读理解 单模型代码

  • 竞赛最终结果第七名, ROUGE-L:53.62, BLEU-4:54.97
  • 代码上传前已经跑通,所以如果碰到报错之类的信息,请不要慌,可能是代码路径不对、缺少安装包等问题,一步步解决,可以提issue。
  • 若有提升模型效果的想法,十分欢迎前来交流(邮箱:[email protected]
环境(不支持cpu)
  • python3
  • torch 1.0
  • 依赖包 pytorch-pretrained-bert、tqdm、pickle、torchtext

运行流程
一、数据准备:
  • 将trainset、devset等数据放在data文件里 (data下的trainset、devset有部份数据,可以换成全部数据。)
  • 到handle_data目录下运行 sh run.sh --para_extraction, 便会将处理后的数据放在extracted下的对应文件夹里
二、制作dataset:
  • 到dataset目录下运行两次 python3 run_squad.py,分别生成train.data与dev.data,第一次运行结束后要修改run_squad.py的参数,具体做法run_squad.py末尾有具体说明
三、训练:
  • 到root下运行 python3 train.py,边训练边验证
四、测试:
  • 到predict目录下运行 python3 util.py (测试集太多,也可以在该文件里将路径改为验证集,默认为验证集路径)
  • 运行 python3 predicting.py
  • 到metric目录下, 运行 python3 mrc_eval.py predicts.json ref.json v1 即可

排行榜:

image

dureader-bert's People

Contributors

luhua-rain 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.