Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial * initial gkd script * fix output dir name * smaller max_new_tokens_response size * fix tab * use temperature from config * initial docs * initial test * add generalized_jsd_loss * some docs * fix order of interpolation * use log_target=True * fix formatting * docstrings * add peft example * more docs * formatting * fix ordering * use unwrap_model_for_generation * initial DataCollatorForLastCompletionLM * add generation inputs * logits from the completions * add eps to probs * select the logits after removing the padding * formatting * interpolate log_probs * add back online sampling * update tests * fix typos * Update docs/source/gkd_trainer.md Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update docs/source/gkd_trainer.md Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update docs/source/gkd_trainer.md Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update docs/source/gkd_trainer.md Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update docs/source/gkd_trainer.md Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update docs/source/gkd_trainer.md Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update docs/source/_toctree.yml Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * use Qwen2 * Update trl/trainer/gkd_config.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update trl/trainer/gkd_config.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update trl/trainer/gkd_trainer.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update trl/trainer/gkd_trainer.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update trl/trainer/gkd_trainer.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update trl/trainer/gkd_trainer.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update trl/trainer/gkd_trainer.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update trl/trainer/gkd_trainer.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update tests/test_gkd_trainer.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update trl/trainer/gkd_trainer.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * fixes * renamed lamda to lmbda due to keyword * fix config name * move collator to utils * fix formatting * Update trl/trainer/gkd_trainer.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update trl/trainer/gkd_trainer.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * the larger the lmbda the more on policy it should be * Use JSD instead of KL * use DataCollatorForChatML * fix labels * use torch_call * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * set default collator to DataCollatorForChatML * return only the prompts * fix labels of generated outputs * formatting * fix comment * add missing _prepare_deepspeed * no attention mask when generating * update test * set a sensible max_seq_length * set default in the collator * Update tests/test_gkd_trainer.py Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> * Update tests/test_gkd_trainer.py Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> * fix padding * formatting * Update tests/test_gkd_trainer.py Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> * fix tests * TestGeneralizedJSDLoss * fix typos * use a mask to calculate jsd loss * use the super() training_step after the inputs are created * fix the docs * create generate_on_policy_outputs * loss does not need labels * use_cache is false when gradient checkpointing is True * use self.assert * fix toc * generate_on_policy_outputs needs token_id * use papers link * teacher_model is in eval mode so no need for disabling dropout * log completions and use_liger * prompt from train if no eval * fix logging and add cache empty * add_generation_prompt=True * fix prompts * Update docs/source/gkd_trainer.md Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> * Update docs/source/gkd_trainer.md Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> * Update docs/source/gkd_trainer.md Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> * Update examples/scripts/gkd.py Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> * minor doc changes * fix temp default * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * update docs * fix dataset format * fix dataset format * no need for scores in generation * teacher_model_init_kwargs * Update _toctree.yml * Update docs/source/gkd_trainer.md Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update tests/test_gkd_trainer.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update docs/source/gkd_trainer.md Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update examples/scripts/gkd.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * fix * remove rich * add determinstic test * fix code * use bigger teacher model --------- Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> Co-authored-by: Quentin Gallouédec <quentin.gallouedec@huggingface.co>
- Loading branch information