GithubHelp home page GithubHelp logo

schunsukesuzuki / bert_qa Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 9.07 MB

Jupyter Notebook 1.26% Python 32.55% Dockerfile 0.07% Shell 0.50% Batchfile 0.04% CMake 1.91% Makefile 0.01% C 3.50% C++ 49.63% Cuda 9.47% Metal 0.13% Objective-C++ 0.77% Objective-C 0.01% CSS 0.10% HTML 0.04% PowerShell 0.01% Lua 0.01% Vim Script 0.01%

bert_qa's Introduction

bert_qa

====

Overview

Description

絵文字を含む文章で答えを返す、BERTのfine tuningによるQAAnsweringの実装です。

Dockerfile

pytorch公式とビルドの仕方は全く同じです。ただしビルドにはかなり(手元の環境では1h弱ほど)時間がかかります。
https://github.com/pytorch/pytorch#docker-image
加えて現状tqdm,ipywidgets,matplotlibについては実行することがまだできていないため、別途ビルド後入れる必要があります。
・mecab-ipadic-NEologdのインストールが必要です
https://qiita.com/spiderx_jp/items/7f8cbfd762c9abab660b

Requirement

・dataフォルダを作成し、その中にchatdataフォルダを入れ、そこにいただいた絵文字の会話データ(chatdata-sample.txt)を入れます
・CUDA環境が必要であるため、まずはCUDA toolkitをインストール
・ライブラリには、torch,beautifulsoup,pickle,tqdm,ipywidgets,MeCabが必要。
・mecab-ipadic-NEologdのインストールが必要
https://qiita.com/spiderx_jp/items/7f8cbfd762c9abab660b

##boot ・dockerの起動は、 docker run -it -p 8888:8888 [image名] で大丈夫なはず(帰宅後確認します) ・jupyter notebookは、 jupyter notebook --allow-root で起動してください。またこれにあたり、jupyter configのファイルで、起動リンクをlocalhostから0.0.0.0に変更してください。 http://rf00.hatenablog.com/entry/2019/01/03/180656 (RUNで変更できるようなので後で確認します)

Version

Ubuntu 18.04 LTS
CUDA compilation tools 9.1.85
cuda toolkit 10.0.130
ipywidgets 7.4.2
ipython 7.4.0
matplotlib 3.0.3
mecab
libmecab-dev
mecab-ipadic-utf8
mecab-python3 0.996.1
pytorch 1.0.1
tqdm 4.31.1
beautifulsoup4
language-pack-ja-base
language-pack-ja

ロケールの設定は以下を参照のこと
https://www.t3a.jp/blog/infrastructure/ubuntu-text-garbled/
Docker: コンテナのlocaleを設定したい https://qiita.com/suin/items/856bf782d0d295352e51

Ubuntu 18.04へのCUDA10インストール方法 https://qiita.com/yukoba/items/4733e8602fa4acabcc35

License

元のスクリプトには特にかけられていない様子

Author

schunsukesuzuki

bert_qa's People

Contributors

schunsukesuzuki avatar

Watchers

 avatar  avatar

Forkers

trellixvulnteam

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.