Zhenduo Wang

Results 10 comments of Zhenduo Wang

This is very useful. Thank you!

> The batch is sorted (not shuffled) by tgt/src length when [creating_batches(self)](https://github.com/nlpyang/PreSumm/blob/master/src/models/data_loader.py#L253) even if the outer loop is not shuffled. Took me a while to figure it out... OMG! That...

> Hey @zhenduow 👋 > > [This PR](https://github.com/huggingface/transformers/pull/22772), which allows passing `decoder_input_ids` as part of the input to the `Seq2SeqTrainer`, was merged after the latest release (`v4.28`). > > Could...

> @zhenduow you probably need to pad `decoder_input_ids` -- see [this guide](https://huggingface.co/docs/transformers/main/en/pad_truncation) > > BTW, as per our [issues guidelines](https://github.com/huggingface/transformers/blob/main/ISSUES.md), we reserve GitHub issues for bugs in the repository and/or...

> Hey @zhenduow 👋 > > [This PR](https://github.com/huggingface/transformers/pull/22772), which allows passing `decoder_input_ids` as part of the input to the `Seq2SeqTrainer`, was merged after the latest release (`v4.28`). > > Could...

> Try passing `labels` and `decoder_input_ids`: if my memory is correct, the former will be used to obtain the evaluation metrics, and the later as the prompt for the decoder...

Thanks! Can you please explain how I can use `forced_decoder_ids` with `trainer`? It seems like I cannot call the `generate()` function anywhere, only the `model()` function. Can I use `forced_decoder_ids`...

> @zhenduow you can define a generation config ([docs 1](https://huggingface.co/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationConfig) [docs 2](https://huggingface.co/docs/transformers/main/en/generation_strategies#default-text-generation-configuration)) and pass it to the trainer (see [here](https://github.com/huggingface/transformers/blob/main/src/transformers/training_args_seq2seq.py#L47)). > > If you parameterize `forced_decoder_ids` in the generation config,...

Hi, This looks great! It is much more preferable than the current scoring system. Is it going to happen?

> Released in #570 Thank you for the work! Is there a way that I can tip you for this?