├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── PATENTS ├── README.md ├── data ├── prepare-iwslt14.sh └── prepare-iwslt15.sh ├── de-en_example.png ├── fairseq.gif ├── fairseq ├── clib │ ├── bleu.cpp │ ├── bleu.lua │ ├── init.lua │ ├── logsoftmax.cpp │ └── topk.cpp ├── init.lua ├── models │ ├── DummyCriterion.lua │ ├── avgpool_model.lua │ ├── bgru_model.lua │ ├── blstm_model.lua │ ├── c_sample_dp.cc │ ├── compute_logpy.cu │ ├── conv_model.lua │ ├── ensemble_model.lua │ ├── fconv_model.lua │ ├── init.lua │ ├── mRNN.lua │ ├── model.lua │ ├── npmt.lua │ ├── npmt_model.lua │ ├── npmt_utils.lua │ ├── selection_blstm_model.lua │ ├── utils.lua │ └── window_attn.lua ├── modules │ ├── AppendBias.lua │ ├── BeamableMM.lua │ ├── CAddTableMulConstant.lua │ ├── CLSTM.lua │ ├── CudnnRnnTable.lua │ ├── GradMultiply.lua │ ├── LinearizedConvolution.lua │ ├── SeqMultiply.lua │ ├── TrainTestLayer.lua │ ├── ZipAlong.lua │ └── init.lua ├── optim │ └── nag.lua ├── search.lua ├── text │ ├── Dictionary.lua │ ├── bleu.lua │ ├── init.lua │ ├── lm_corpus.lua │ ├── pretty.lua │ └── tokenizer.lua ├── torchnet │ ├── MaxBatchDataset.lua │ ├── ResumableDPOptimEngine.lua │ ├── ShardedDatasetIterator.lua │ ├── SingleParallelIterator.lua │ ├── data.lua │ ├── hooks.lua │ └── init.lua └── utils.lua ├── generate-lines.lua ├── generate.lua ├── help.lua ├── npmt.png ├── optimize-fconv.lua ├── preprocess.lua ├── rocks ├── fairseq-cpu-scm-1.rockspec └── fairseq-scm-1.rockspec ├── run.lua ├── score.lua ├── scripts ├── binarize.lua ├── build_sym_alignment.py ├── make_fconv_vocsel.lua ├── makealigndict.lua ├── makedict.lua └── unkreplace.lua ├── test ├── test.lua ├── test_appendbias.lua ├── test_dictionary.lua ├── test_logsoftmax.lua ├── test_tokenizer.lua ├── test_topk.lua └── test_zipalong.lua ├── tofloat.lua └── train.lua /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | build 3 | test/tst2012.en 4 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/CMakeLists.txt -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/LICENSE -------------------------------------------------------------------------------- /PATENTS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/PATENTS -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/README.md -------------------------------------------------------------------------------- /data/prepare-iwslt14.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/data/prepare-iwslt14.sh -------------------------------------------------------------------------------- /data/prepare-iwslt15.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/data/prepare-iwslt15.sh -------------------------------------------------------------------------------- /de-en_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/de-en_example.png -------------------------------------------------------------------------------- /fairseq.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq.gif -------------------------------------------------------------------------------- /fairseq/clib/bleu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/clib/bleu.cpp -------------------------------------------------------------------------------- /fairseq/clib/bleu.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/clib/bleu.lua -------------------------------------------------------------------------------- /fairseq/clib/init.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/clib/init.lua -------------------------------------------------------------------------------- /fairseq/clib/logsoftmax.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/clib/logsoftmax.cpp -------------------------------------------------------------------------------- /fairseq/clib/topk.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/clib/topk.cpp -------------------------------------------------------------------------------- /fairseq/init.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/init.lua -------------------------------------------------------------------------------- /fairseq/models/DummyCriterion.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/DummyCriterion.lua -------------------------------------------------------------------------------- /fairseq/models/avgpool_model.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/avgpool_model.lua -------------------------------------------------------------------------------- /fairseq/models/bgru_model.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/bgru_model.lua -------------------------------------------------------------------------------- /fairseq/models/blstm_model.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/blstm_model.lua -------------------------------------------------------------------------------- /fairseq/models/c_sample_dp.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/c_sample_dp.cc -------------------------------------------------------------------------------- /fairseq/models/compute_logpy.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/compute_logpy.cu -------------------------------------------------------------------------------- /fairseq/models/conv_model.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/conv_model.lua -------------------------------------------------------------------------------- /fairseq/models/ensemble_model.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/ensemble_model.lua -------------------------------------------------------------------------------- /fairseq/models/fconv_model.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/fconv_model.lua -------------------------------------------------------------------------------- /fairseq/models/init.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/init.lua -------------------------------------------------------------------------------- /fairseq/models/mRNN.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/mRNN.lua -------------------------------------------------------------------------------- /fairseq/models/model.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/model.lua -------------------------------------------------------------------------------- /fairseq/models/npmt.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/npmt.lua -------------------------------------------------------------------------------- /fairseq/models/npmt_model.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/npmt_model.lua -------------------------------------------------------------------------------- /fairseq/models/npmt_utils.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/npmt_utils.lua -------------------------------------------------------------------------------- /fairseq/models/selection_blstm_model.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/selection_blstm_model.lua -------------------------------------------------------------------------------- /fairseq/models/utils.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/utils.lua -------------------------------------------------------------------------------- /fairseq/models/window_attn.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/models/window_attn.lua -------------------------------------------------------------------------------- /fairseq/modules/AppendBias.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/modules/AppendBias.lua -------------------------------------------------------------------------------- /fairseq/modules/BeamableMM.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/modules/BeamableMM.lua -------------------------------------------------------------------------------- /fairseq/modules/CAddTableMulConstant.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/modules/CAddTableMulConstant.lua -------------------------------------------------------------------------------- /fairseq/modules/CLSTM.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/modules/CLSTM.lua -------------------------------------------------------------------------------- /fairseq/modules/CudnnRnnTable.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/modules/CudnnRnnTable.lua -------------------------------------------------------------------------------- /fairseq/modules/GradMultiply.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/modules/GradMultiply.lua -------------------------------------------------------------------------------- /fairseq/modules/LinearizedConvolution.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/modules/LinearizedConvolution.lua -------------------------------------------------------------------------------- /fairseq/modules/SeqMultiply.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/modules/SeqMultiply.lua -------------------------------------------------------------------------------- /fairseq/modules/TrainTestLayer.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/modules/TrainTestLayer.lua -------------------------------------------------------------------------------- /fairseq/modules/ZipAlong.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/modules/ZipAlong.lua -------------------------------------------------------------------------------- /fairseq/modules/init.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/modules/init.lua -------------------------------------------------------------------------------- /fairseq/optim/nag.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/optim/nag.lua -------------------------------------------------------------------------------- /fairseq/search.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/search.lua -------------------------------------------------------------------------------- /fairseq/text/Dictionary.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/text/Dictionary.lua -------------------------------------------------------------------------------- /fairseq/text/bleu.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/text/bleu.lua -------------------------------------------------------------------------------- /fairseq/text/init.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/text/init.lua -------------------------------------------------------------------------------- /fairseq/text/lm_corpus.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/text/lm_corpus.lua -------------------------------------------------------------------------------- /fairseq/text/pretty.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/text/pretty.lua -------------------------------------------------------------------------------- /fairseq/text/tokenizer.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/text/tokenizer.lua -------------------------------------------------------------------------------- /fairseq/torchnet/MaxBatchDataset.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/torchnet/MaxBatchDataset.lua -------------------------------------------------------------------------------- /fairseq/torchnet/ResumableDPOptimEngine.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/torchnet/ResumableDPOptimEngine.lua -------------------------------------------------------------------------------- /fairseq/torchnet/ShardedDatasetIterator.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/torchnet/ShardedDatasetIterator.lua -------------------------------------------------------------------------------- /fairseq/torchnet/SingleParallelIterator.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/torchnet/SingleParallelIterator.lua -------------------------------------------------------------------------------- /fairseq/torchnet/data.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/torchnet/data.lua -------------------------------------------------------------------------------- /fairseq/torchnet/hooks.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/torchnet/hooks.lua -------------------------------------------------------------------------------- /fairseq/torchnet/init.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/torchnet/init.lua -------------------------------------------------------------------------------- /fairseq/utils.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/fairseq/utils.lua -------------------------------------------------------------------------------- /generate-lines.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/generate-lines.lua -------------------------------------------------------------------------------- /generate.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/generate.lua -------------------------------------------------------------------------------- /help.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/help.lua -------------------------------------------------------------------------------- /npmt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/npmt.png -------------------------------------------------------------------------------- /optimize-fconv.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/optimize-fconv.lua -------------------------------------------------------------------------------- /preprocess.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/preprocess.lua -------------------------------------------------------------------------------- /rocks/fairseq-cpu-scm-1.rockspec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/rocks/fairseq-cpu-scm-1.rockspec -------------------------------------------------------------------------------- /rocks/fairseq-scm-1.rockspec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/rocks/fairseq-scm-1.rockspec -------------------------------------------------------------------------------- /run.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/run.lua -------------------------------------------------------------------------------- /score.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/score.lua -------------------------------------------------------------------------------- /scripts/binarize.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/scripts/binarize.lua -------------------------------------------------------------------------------- /scripts/build_sym_alignment.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/scripts/build_sym_alignment.py -------------------------------------------------------------------------------- /scripts/make_fconv_vocsel.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/scripts/make_fconv_vocsel.lua -------------------------------------------------------------------------------- /scripts/makealigndict.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/scripts/makealigndict.lua -------------------------------------------------------------------------------- /scripts/makedict.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/scripts/makedict.lua -------------------------------------------------------------------------------- /scripts/unkreplace.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/scripts/unkreplace.lua -------------------------------------------------------------------------------- /test/test.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/test/test.lua -------------------------------------------------------------------------------- /test/test_appendbias.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/test/test_appendbias.lua -------------------------------------------------------------------------------- /test/test_dictionary.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/test/test_dictionary.lua -------------------------------------------------------------------------------- /test/test_logsoftmax.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/test/test_logsoftmax.lua -------------------------------------------------------------------------------- /test/test_tokenizer.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/test/test_tokenizer.lua -------------------------------------------------------------------------------- /test/test_topk.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/test/test_topk.lua -------------------------------------------------------------------------------- /test/test_zipalong.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/test/test_zipalong.lua -------------------------------------------------------------------------------- /tofloat.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/tofloat.lua -------------------------------------------------------------------------------- /train.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/posenhuang/NPMT/HEAD/train.lua --------------------------------------------------------------------------------