Code Monkey home page Code Monkey logo

chinese_qanet's Introduction

QAnet Chinese Reading Comprehension

demo ็•ซ้ข https://github.com/sinlin0908/QAmodel_Demo

Reference

Environment

  • OS: Ubuntu 18.04 LTS
  • GPU: GTX 1080Ti 11G
  • CPU: i7-4770
  • RAM: 16G

Requirement

  • Python 3.6
  • NumPy
  • tqdm
  • Tensorflow>=1.5
  • Jieba
  • opencc
  • bottle

Data Set

  • train set : 26936 questions
  • dev set : 3524 questions
  • test 3493 : questions

Modify

prepro file

  • word token: use jieba.cut(context,cut_all=False)
  • _getword() delete word.lower(), word.capitalize(), word.upper()

embedding dat set

  • use 1292607 words 300d embedding data set
  • use 14082 characters 300d character embedding data set

Config

  • word size: 1292607
  • hidden size: 128
  • num_head: 8
  • batch size: 12
  • char_emb_size : 300d
  • pretrain_char -> True

Usage

python config.py --mode prepro

train

python config.py --mode train

test

python config.py --mode test

demo:

python config.py --mode demo

Performance

  • F1: score 70.0496230556
  • EM: 70.0257658173
  • cost: 6 hours
  • use GPU memory : 9.4G

Tensorbord

tensorboard --logdir=./

dev loss

Comparison Chart

number hidden size attention head step data size word embedding size F1 EM
1 96 1 60000 15320 636086 51 51
2 96 1 60000 26936 636086 63 63
3 128 8 60000 26936 1292607 70 70
4 128 8 150000 26936 1292607 69 69

notice: character embedding has a little effect

chinese_qanet's People

Contributors

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