/ETRICodeTransformer

Primary LanguagePythonApache License 2.0Apache-2.0

ETRICodeTransformer

This is PyTorch implementation of Attention is All You Need (NeurIPS 2017).

1. Environment

  • torch==1.7.1
  • transformers=4.5.1

All dependencies are written in requirements.txt, and you can also access through Dockerfile.

2. How to Run

Note: In this implementation, [CLS] and [SEP] tokens mean <s> and </s> respectively.

Train

sh run.sh

Inference

python src/translate.py --source "TEXT_TO_SEARCH" --ckpt-path "CHECKPOINT_TO_LOAD"