### Install Project Dependencies Source: https://github.com/shark-nlp/diffuseq/blob/main/README.md Installs all necessary Python packages listed in the requirements.txt file using pip. This command is essential for setting up the project environment. ```bash pip install -r requirements.txt ``` -------------------------------- ### Run DiffuSeq Training Script Source: https://github.com/shark-nlp/diffuseq/blob/main/README.md Navigates to the 'scripts' directory and executes the main training script using bash. This script initiates the DiffuSeq model training process with specified arguments. ```bash cd scripts bash train.sh ``` -------------------------------- ### Accelerate DiffuSeq Decoding with DPM-Solver++ Source: https://github.com/shark-nlp/diffuseq/blob/main/README.md Utilizes a customized DPM-Solver++ implementation to speed up the sampling process for DiffuSeq models. Navigate to the 'scripts' directory and execute 'run_decode_solver.sh'. ```bash cd scripts bash run_decode_solver.sh ``` -------------------------------- ### Train DiffuSeq Models with Distributed Launch Source: https://github.com/shark-nlp/diffuseq/blob/main/README.md Commands to initiate distributed training for DiffuSeq models across various datasets like QQP, QG, and Dialogue. Specifies parameters such as learning rate, batch size, and noise schedule. ```python python -m torch.distributed.launch --nproc_per_node=4 --master_port=12233 --use_env run_train.py --diff_steps 2000 --lr 0.0001 --learning_steps 50000 --save_interval 10000 --seed 102 --noise_schedule sqrt --hidden_dim 128 --bsz 2048 --dataset qqp --data_dir {datasets/QQP} --vocab bert --seq_len 128 --schedule_sampler lossaware --notes qqp python -m torch.distributed.launch --nproc_per_node=4 --master_port=12233 --use_env run_train.py --diff_steps 2000 --lr 0.0001 --learning_steps 40000 --save_interval 2000 --seed 102 --noise_schedule sqrt --hidden_dim 128 --bsz 2048 --microbatch 64 --dataset qg --data_dir {datasets/QG} --vocab bert --seq_len 128 --schedule_sampler lossaware --notes qg python -m torch.distributed.launch --nproc_per_node=7 --master_port=12233 --use_env run_train.py --diff_steps 2000 --lr 0.0001 --learning_steps 140000 --save_interval 20000 --seed 102 --noise_schedule sqrt --hidden_dim 128 --bsz 2048 --microbatch 64 --dataset dialogue --data_dir {datasets/Conversation} --vocab bert --seq_len 128 --schedule_sampler lossaware --notes dialogue python -m torch.distributed.launch --nproc_per_node=8 --master_port=12233 --use_env run_train.py --diff_steps 2000 --lr 0.0001 --learning_steps 80000 --save_interval 20000 --seed 102 --noise_schedule sqrt --hidden_dim 128 --bsz 2048 --microbatch 64 --dataset dialogue --data_dir {datasets/TS} --vocab bert --seq_len 128 --schedule_sampler lossaware --notes ts ``` -------------------------------- ### Decode DiffuSeq Models Source: https://github.com/shark-nlp/diffuseq/blob/main/README.md Executes the decoding process for trained DiffuSeq models. Requires navigating to the 'scripts' directory and running the 'run_decode.sh' script. ```bash cd scripts bash run_decode.sh ``` -------------------------------- ### DiffuSeq Citation Information Source: https://github.com/shark-nlp/diffuseq/blob/main/README.md Provides BibTeX entries for citing the DiffuSeq project and its associated research papers, including the original ICLR 2023 publication and the DiffuSeq-v2 arXiv preprint. ```bibtex @inproceedings{gong2022diffuseq, author = {Gong, Shansan and Li, Mukai and Feng, Jiangtao and Wu, Zhiyong and Kong, Lingpeng}, booktitle = {International Conference on Learning Representations, ICLR}, title = {{DiffuSeq}: Sequence to Sequence Text Generation with Diffusion Models}, year = 2023 } @article{gong2023diffuseqv2, title={DiffuSeq-v2: Bridging Discrete and Continuous Text Spaces for Accelerated Seq2Seq Diffusion Models}, author={Gong, Shansan and Li, Mukai and Feng, Jiangtao and Wu, Zhiyong and Kong, Lingpeng}, journal={arXiv preprint arXiv:2310.05793}, year={2023} } ``` -------------------------------- ### Evaluate DiffuSeq Outputs and MBR Decoding Source: https://github.com/shark-nlp/diffuseq/blob/main/README.md Evaluates the quality and diversity of decoded texts generated by DiffuSeq models. The script computes diversity scores or performs MBR decoding based on the '--mbr' flag and requires specifying the folder containing decoded files. ```python cd scripts python eval_seq2seq.py --folder ../{your-path-to-outputs} --mbr ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.