Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Config' object has no attribute '_get_non_default_generation_parameters' #35543

Open
4 tasks
XYZ-916 opened this issue Jan 7, 2025 · 1 comment
Labels

Comments

@XYZ-916
Copy link

XYZ-916 commented Jan 7, 2025

System Info

transformers version: 4.47.1
I finetuned the rmbg-2.0 with my own dataset. When I save the model using model.save_pretrained, I got the error as follows:
File "/usr/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2815, in save_pretrained
misplaced_generation_parameters = model_to_save.config._get_non_default_generation_parameters()
AttributeError: 'Config' object has no attribute '_get_non_default_generation_parameters'

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

  1. finetune rmbg-2;
  2. save model.

Expected behavior

save the model sucessfully

@XYZ-916 XYZ-916 added the bug label Jan 7, 2025
@Rocketknight1
Copy link
Member

Hi @XYZ-916, can you create some simple reproducer code we can run to diagnose this? For example, just load and save the model or even just the config and check if the bug still occurs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants