Code Monkey home page Code Monkey logo

cbaziotis / lm-prior-for-nmt Goto Github PK

View Code? Open in Web Editor NEW
39.0 3.0 6.0 52.8 MB

This repository contains source code for the paper "Language Model Prior for Low-Resource Neural Machine Translation"

Home Page: http://data.statmt.org/cbaziotis/projects/lm-prior/analysis

License: MIT License

Jupyter Notebook 86.85% Python 8.69% HTML 0.27% Shell 1.27% Perl 2.52% Smalltalk 0.03% Emacs Lisp 0.29% JavaScript 0.01% NewLisp 0.03% Ruby 0.03% Slash 0.01% SystemVerilog 0.01%
nmt machine-translation language-model neural-machine-translation lm-priors translation monolingual paper

lm-prior-for-nmt's Introduction

Christos's GitHub stats

lm-prior-for-nmt's People

Contributors

cbaziotis avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

lm-prior-for-nmt's Issues

Inference model is missing.

Hi, Thanks for making this repo public. Could you please add scripts for generating the translations to the repository i.e. the evaluation and inference scripts as it is not present in the current repository?

reproduction issue

Hi! I have tried to reproduce your work (en->tr direction transformer baseline for now) using both fairseq and your system. I followed the exact data preprocessing and hyper-parameter settings in your configs. And I only achieved 9.7 sacrebleu score instead of 11.2. I would appreciate it if could you please double-check the code or hyper-parameter settings for that!

Below is the result I got. PS: I checked the sacrebleu version in your requirements.txt as well, it yields the same score.

{
 "name": "BLEU",
 "score": 9.7,
 "signature": "nrefs:1|case:mixed|eff:no|tok:13a|smooth:exp|version:2.3.1",
 "verbose_score": "38.5/13.9/6.0/2.7 (BP = 1.000 ratio = 1.042 hyp_len = 55984 ref_len = 53731)",
 "nrefs": "1",
 "case": "mixed",
 "eff": "no",
 "tok": "13a",
 "smooth": "exp",
 "version": "2.3.1"
}

Where is the "mono_sent.py" file?

Thanks for your great work!
I am wondering where is the "mono_sent.py"(the file used for training the language model)?

Looking forward to your reply!

No checkpoint saved for TM training

Hi,

I am trying to train a TM using the following command:
python nmt_prior.py --config ../configs/transformer/trans.deen_base.yaml --name final.trans.deen_base
The training was good until the end of the last epoch, an error appeared:

Traceback (most recent call last):
File "/home/ubuntu-user/mc35180/lm-prior-for-nmt/models/nmt_prior.py", line 143, in
eval_best(trained_model)
File "/home/ubuntu-user/mc35180/lm-prior-for-nmt/models/../models/nmt_prior_helpers.py", line 121, in eval_best
eval_nmt_checkpoint(trainer.best_checkpoint,
File "/home/ubuntu-user/mc35180/lm-prior-for-nmt/models/../models/translate.py", line 110, in eval_nmt_checkpoint
_base, _file = os.path.split(checkpoint)
File "/home/ubuntu-user/anaconda3/envs/lmprior/lib/python3.9/posixpath.py", line 103, in split
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

And there is no any checkpoints ever saved in the experiment directory. How can I fix this?

Training time estimation

Hi! I'm trying to reproduce your en-tr nmt base model, and I just found it needs 200,000 epochs to train in configs/transformer)/trans.entr_base.yaml. Do you probably have any ideas about how much time will this take (only the nmt base model for en->tr)?

Why I got BLUE 0.0 and the generated translation file is empty

Fabulous work and paper!
I'd like to train a EN-DE translation model based on your code. First, I train a DE LM, Then I train a EN-DE TM with LM prior,but I got BLEU 0.0 on val and test, is there something wrong I have made? My environment is same as yours.

Thanks for your patience!!

"tools" folder is missing in the repository

Great works! Your findings are really appreciable.

When performing the data preprocessing by myself, I found that the "tools" directory is missing in this repository. It will be very helpful if you could upload that too?

Please find the screenshot of preprocessing shell script where you have written code about the same.

github_tools_folder_issue

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.