This repository provides the official implementation of the following paper:
DiffusPoll: Conditional Text Diffusion Model for Poll Generation. (ACL 2024)
Datasets included in the ./datasets/ folder. We make our dataset from WeiboPolls.
*-key, *-topic means the ablations with different data after by the attribute extractor.
pip install -r requirements.txt The training script is launched in the scripts folder.
cd scripts
bash train.shArguments explanation:
--dataset: WeiboPolls datasets, mentioned above--div_loss: whether use the diversity loss--mask: whether use the task-specific mask strategy
You need to modify the path to model_dir, which is obtained in the training stage.
cd scripts
bash infer.shYou need to specify the folder of decoded texts. This folder should contain the decoded files from the same model but sampling with different random seeds where |S|=10 .
cd scripts
python eval_seq2seq.py --folder ../{your-path-to-outputs} --tokenizer char --mbrDiffusPoll benifits from Diffuseq. We are grateful to the authors for work open-source.