This is the pytorch implementation of MERGE:
For RQ-VAE: requirements_rqvae.txt For GR: requirements_gr.txt
-
download raw esci data
-
preprocess
python data_process/extract_esci_item.py
python data_process/esci_text_emb_items_t5.py --root data --dataset esci --plm_name t5-base --plm_checkpoint [plm_model]
bash ./RQ-VAE/train_tokenizer.sh 0.01 "1.0 0.75 0.25 0.0" "0.001 0.001 0.001 0.001" merge
bash ./RQ-VAE/tokenize.sh [model_path] [model_name]
bash ./GR_train/train.sh
bash ./GR_train/test.sh
This code is based on https://github.com/HonghuiBao2000/LETTER.