Closed B-Step62 closed 6 hours ago
cc @gante regarding the generation config
Hi @B-Step62 👋 Thank you for opening this issue!
Indeed, there are multiple issues here:
The question of the task_specific_params
is a bit more tricky: the generation config is meant to replace them, but we do not have the authority to update all hub models :) Inside the pipeline code, we already load all task parameters into model.generation_config
System Info
transformers
version: 4.45.1 (installed frommaster
branch viapip install git+https://github.com/huggingface/transformers
)Who can help?
@ArthurZucker @Rocketknight1
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Load T5 model.
Construct a pipeline from it for inference
Save the pretrained weight locally (typically after fine-tuning but doing it immediately for quick reproducing purpose)
The saved
config.json
file contains"early_stopping": null
. This does not present in the originalconfig.json
file in the T5 model repository.Model loading fails due to this
null
value.A few side notes
transformers==4.44.2
task_specific_params
i.e. not designed for multiple tasks.save_pretrained
logic nicely.model.generation_config
property returns different result before and after the step 2 (pipeline construction)Expected behavior
The saved
config.json
file should not contain the"early_stopping"
key at top-level. It should be only defined under thetask_specific_params
like the original config.