Skip to content

MANGA-UOFA/fdistill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pipelines for Training and Evaluation

Data-to-text (DART)

  • Folder: /dart/

  • Datasets: dart (Google drive link)

  • Teacher model

  • Student init model:

    • Pre-train init student model: scripts/run_pretrain_student_distill.sh (Google drive link)
  • Generate pseudo-target with Teacher model (useful for Seqkd, JS, TVD)

  • Run KD methods (/scripts/)

    • Seqkd: run_seqkd.sh
    • ENGINE: run_engine.sh
    • RKL: run_rkl.sh
    • KL: run_kl_sample.sh
    • JS: run_js.sh
    • TVD: run_tvd_symm.sh
  • Decode (/scripts/) (Google drive link)

    • run_eval.sh
  • Eval

  • Calculate coverage loss (PPL of teacher)

    • run python3 dart/run_calc_ppl.py --reference_path [teacher_output_path] --input_path [input_path] --model_name [student_model_path] --save_path /tmp/
  • Calculate likelihood loss (PPL of student)

    • run python3 dart/run_calc_ppl.py --model_name [teacher_model_path] --input_path [input_path] --reference_path [student_output_path] --save_path /tmp/

Summarization

  • Folder: /summa/
  • Dataset: xsum (wget https://cdn-datasets.huggingface.co/summarization/xsum.tar.gz)
  • Teacher model: https://huggingface.co/facebook/bart-large-xsum
  • Student init model:
  • Generate pseudo-target with Teacher model (useful for Seqkd, JS, TVD)
  • Run KD methods (/scripts/)
    • Seqkd: run_seqkd.sh
    • ENGINE: run_engine.sh
    • RKL: run_rkl.sh
    • KL: run_kl.sh
    • JS: run_js.sh
    • TVD: run_tvd_symm.sh
  • Decode and Evaluate
    • run eval.sh
  • Calculate coverage loss (PPL of teacher)
    • run python3 summa/run_calc_ppl.py --reference_path [teacher_output_path] --input_path [input_path] --model_name [student_model_path] --save_path /tmp/
  • Calculate likelihood loss (PPL of student)
    • run python3 summa/run_calc_ppl.py --model_name [teacher_model_path] --input_path [input_path] --reference_path [student_output_path] --save_path /tmp/

Machine Translation (WMT16 EN-RO, 100k training data)

  • Folder: /t5mt/
  • Dataset: wmt_en_ro_100k (Google drive link)
  • Teacher model
    • Init: t5-base
    • Fine-tune: scripts_sm/run_finetune_teacher.sh
  • Student init model:
    • Pre-train init student model: scripts_sm/run_pretrain_student_distill.sh (Google drive link)
  • Generate pseudo-target with Teacher model (useful for Seqkd, JS, TVD)
  • Run KD methods (/scripts/)
    • Seqkd: run_seqkd.sh
    • ENGINE: run_engine.sh
    • RKL: run_rkl.sh
    • KL: run_kl.sh
    • JS: run_js.sh
    • TVD: run_tvd_symm.sh
  • Decode and eval
    • sh scripts_sm/run_eval.sh
  • Calculate coverage loss (PPL of teacher)
    • run python3 t5mt/run_calc_ppl.py --reference_path [teacher_output_path] --input_path [input_path] --model_name [student_model_path] --save_path /tmp/
  • Calculate likelihood loss (PPL of student)
    • run python3 t5mt/run_calc_ppl.py --model_name [teacher_model_path] --input_path [input_path] --reference_path [student_output_path] --save_path /tmp/

Chat

  • Folder: /chat/
  • Dataset: Commonsense-Dialogues (Google drive link)
  • Teacher model
    • Init: microsoft/DialoGPT-medium
    • Fine-tune: scripts/run_finetune_teacher.sh (Google drive link)
  • Student init model:
    • Pre-train init student model: scripts/run_pretrain_student_distill.sh (Google drive link)
  • Generate pseudo-target with Teacher model (useful for Seqkd, JS, TVD) (Google drive link), replace train.target
    • scripts/run_teacher_label.sh
  • Run KD methods (/scripts/)
    • Seqkd: run_seqkd.sh
    • ENGINE: run_engine.sh
    • RKL: run_rkl.sh
    • KL: run_kl.sh
    • JS: run_js.sh
    • TVD: run_tvd_symm.sh
  • Decode and eval
  • Calculate coverage loss (PPL of teacher)
    • run python3 chat/run_calc_ppl.py --reference_path [teacher_output_path] --input_path [input_path] --model_name [student_model_path] --save_path /tmp/
  • Calculate likelihood loss (PPL of student)
    • run python3 chat/run_calc_ppl.py --model_name [teacher_model_path] --input_path [input_path] --reference_path [student_output_path] --save_path /tmp/

Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published