Last active
October 6, 2021 16:46
-
-
Save gchhablani/1f579371d0ac441c2a3cdc4815c3eebd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install g++ | |
pip install git+https://github.com/pytorch/fairseq.git@698e3b91ffa832c286c48035bdff78238b0de8ae | |
git clone https://github.com/wasiahmad/PLBART | |
# PreTrained | |
## Download pre-trained checkpoint | |
cd PLBART/pretrain | |
bash download.sh | |
## Copy to ckpt | |
mkdir ../plbart_orig_pretrained_ckpt | |
cp checkpoint_11_100000.pt ../plbart_orig_pretrained_ckpt/ | |
cp ../sentencepiece/sentencepiece.bpe.model ../plbart_orig_pretrained_ckpt/ | |
cp ../sentencepiece/dict.txt ../plbart_orig_pretrained_ckpt/ | |
## Use the MBart conversion script to get HF PLBart checkpoint | |
# Use the PLBartConfig to store the pre-trained model config | |
python src/transformers/models/plbart/convert_plbart_original_checkpoint_to_torch.py PLBART/plbart_orig_pretrained_ckpt/model.pt plbart-base --hf_config plbart-base |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment