Giter VIP home page Giter VIP logo

simple-fairseq's Introduction

simple-fairseq

seq2seq翻译模型,代码简化自fairseq和opennmt-py等框架。

支持特性

支持Bi-LSTM及Transformer模型

支持多gpu训练

支持延迟更新

使用方式

数据处理

preprocess.py文件用于将文本文件转化为二进制文件,方便保存,并加快读取速度

需要修改文件中的源语言及目标语言的文件及对应字典,并指定生成的二进制文件,然后运行

训练模型

训练的入口文件是main.py 需要根据需求指定部分参数, 详细内容见文件内部的参数说明

可以通过参数指定多少次update保存模型,以及是否保存optimizer参数。

可以通过参数指定是否在训练时测试bleu,如需测试要提供字典文件路径,测试文件以及参考文件。

测试翻译结果

调用翻译的入口文件是translate.py 需要根据具体需求修改部分参数,详见内部说明

simple-fairseq's People

Contributors

rgwt123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

caoqian1995

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.