Git Product home page Git Product logo

mobileqa's Introduction

MobileQA

TensorFlow Lite BERT QA Android Example Applicationtflite-android-transformers 展示了基于Bert/DistilBERT的离线QA例子,但是只支持英文和安卓设备。

本项目计划实现基于中文的机器阅读理解在手机端的离线应用,并且同时支持安卓和苹果设备。

Targeting to release before Dec 5th. 目标是12月5日前发布。

数据集

使用CMRC 2018 公开数据集,该数据集是第二届讯飞杯中文机器阅读理解评测所使用的数据。数据集已被计算语言学顶级国际会议EMNLP 2019录用

模型

使用 albert_zh_small 预训练模型,额外加上一层全连接做answer span预测。

  • 在CMRC2018数据集的验证集上,max_seq_len为512的模型得分为F1:75.989, EM:52.097, Average:64.038,max_seq_len为384的模型得分为F1:74.781, EM:51.010, Average:62.895

  • max_seq_len为512的模型使用tflite转换后大小为18M,经测试,该模型在4线程的安卓手机上推理延时为580ms左右,在单线程条件下为1.4s左右。

  • max_seq_len为384的模型使用tflite转换后大小为18M,经测试,该模型在4线程的安卓手机上推理延时为390ms左右,在单线程条件下为930ms左右

  • 模型训练与模型转换过程见bert_cn_finetune-master

Android Demo

已完成第一版,详见 tflite-android-transformers-master

效果示例:

android demo

IOS Demo

进行中

Updates

Contribution

如果你感兴趣或希望提供帮助,发送邮件[email protected]

If you're interested or want to help, send an email to [email protected]

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.