|
data_dir=./data |
|
checkpoint_path=./checkpoints/wmt14-en-de-base-nat-drafter-checkpoint.avg10.pt |
|
AR_checkpoint_path=./checkpoints/wmt14-en-de-base-at-verifier.pt |
|
input_path=./test.en |
|
output_path=./output/block.out |
|
|
|
strategy='gad' |
|
batch=32 |
|
beam=5 |
|
|
|
beta=5 |
|
tau=3.0 |
|
block_size=25 |
|
|
|
src=en |
|
tgt=de |
|
|
|
|
|
python inference.py ${data_dir} --path ${checkpoint_path} \ |
|
--user-dir block_plugins --task translation_lev_modified --remove-bpe --max-sentences 20 --source-lang ${src} \ |
|
--target-lang ${tgt} --iter-decode-max-iter 0 --iter-decode-eos-penalty 0 --iter-decode-with-beam 1 \ |
|
--gen-subset test --AR-path ${AR_checkpoint_path} --input-path ${input_path} --output-path ${output_path} \ |
|
--block-size ${block_size} --beta ${beta} --tau ${tau} --batch ${batch} --beam ${beam} --strategy ${strategy} |
|
|