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

fix updated broken checking nondefault parameters #1038

Merged

Conversation

eaidova
Copy link
Collaborator

@eaidova eaidova commented Nov 27, 2024

What does this PR do?

Recent changes in internvl2 models replaces error which models failed on checking non-default parameters with different error type on some models from this family:

  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\optimum\exporters\openvino\convert.py", line 694, in export_from_model
    misplaced_generation_parameters = model.config._get_non_default_generation_parameters()
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\transformers\configuration_utils.py", line 1041, in _get_non_default_generation_parameters
    default_config = self.__class__()
  File "C:\Users\runneradmin\.cache\huggingface\modules\transformers_modules\OpenGVLab\InternVL2-1B\e426377ee3f7e84f1110e4c258ea49c00d9ee44d\configuration_internvl_chat.py", line 49, in __init__
    if llm_config.get('architectures')[0] == 'LlamaForCausalLM':
TypeError: 'NoneType' object is not subscriptable

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@AlexKoff88 AlexKoff88 merged commit 860bdf8 into huggingface:main Nov 27, 2024
20 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants