-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Update composition flag usage #36263
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
Update composition flag usage #36263
Conversation
|
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. |
|
cc @ydshieh this should solve the quick fix we did a few day ago :) |
ArthurZucker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense! Not sure if I see breaking but it is cleaning up after our sub config updates!
* update composition flag usage * remove print * fix tests * actually fix * oh c'mon * now should be fixed right? * fix copies
* update composition flag usage * remove print * fix tests * actually fix * oh c'mon * now should be fixed right? * fix copies
What does this PR do?
Actual fix for #36230. The very first PR that added the flag wasn't what we want, since the root cause of Pixtra config reloading is not in nested configs. The cause is how Mistral config is written with a
Nonehead-dim which is later inferred fromhidden_dim. Bug from #36048 can be reproduced by reloading only the mistral configTL;DR; We can't do that because the modeling code has no assumption about
hidden_size = head_dim * num_heads. So the solution is to set thehead dimonly when config has the value, otherwise it will get inferred during modeling attentionAlso, this PR renames the flag which is very misleading in its name. The flag was first added for models like RAG, when the config can't be init without args. The flag therefore is used only once, when trying to get default values of the config class (if any). Renaming shouldn't break BC I believe