Skip to content

tktkbohshi/FairseqModelLoader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FairseqModelLoader

fairseqで作成されたモデルだけを,json形式で記述されたオプションから脳死で読み込んでコード内で使うためのライブラリです.

DEMO

詳細はsampleフォルダへ

Features

コマンドラインオプションではなくjson形式で扱い,純粋にmodelだけをfairseqから切り離して使いたいので作りました.
modelの改変や拡張,特殊な処理をしたデータセット読み込ませたいなど,fairseq内で完結するにはキツい作業をするときににお使いください.

Requirement

詳細はrequrements.txtへ

Installation

まずfairseqのインストールを行う.https://github.com/pytorch/fairseq からリポジトリをダウンロードし,rootディレクトリで

pip install --editable ./

次に,このレポジトリをダウンロードし,rootディレクトリで

pip install --editable ./

Usage

from FairseqModelLoader import loadModel
model = loadModel(your_config_file_path)

configファイルの書き方はsample推奨

Note

従来通りコマンドライン引数を渡しても動きます.(その場合はconfigファイルのパスを指定しないでください)

Author

License

ライセンスを明示する

"hoge" is under MIT license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages