Skip to content

update modeling_internvl_chat.py to call self.post_init() at the end of __init__ (line 110) #1100

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SStoica12
Copy link

Currently, InternVLChatModel does not call self.post_init() during initialization, leaving model._tp_plan as None. When using AutoModelForCausalLM.from_pretrained, this can lead to a TypeError: 'NoneType' object is not iterable, because from_pretrained may invoke caching_allocator_warmup(), which expects model._tp_plan to be properly defined.

Please see: huggingface/transformers#37708.

…of __init__ (line 110)

Currently, InternVLChatModel does not call self.post_init() during initialization, leaving model._tp_plan as None.
When using AutoModelForCausalLM.from_pretrained, this can lead to a TypeError: 'NoneType' object is not iterable, because from_pretrained may invoke caching_allocator_warmup(), which expects model._tp_plan to be properly defined.

Please see: huggingface/transformers#37708.
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.

1 participant