Unverified Commit 5cf3e6bf authored by Raushan Turganbay's avatar Raushan Turganbay Committed by GitHub
Browse files

Fix: failing CI after #30568 (#30599)

* failiing CI

* no let's keep it intil full deprecation in  v4.42
parent c681b58b
......@@ -1905,6 +1905,9 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
return model_embeds
# Update base model and current model config
if hasattr(self.config, "text_config"):
self.config.text_config.vocab_size = model_embeds.weight.shape[0]
# TODO: to be removed after v4.42, config.vocab_size is deprecated for models that have a config.text_config
self.config.vocab_size = model_embeds.weight.shape[0]
self.vocab_size = model_embeds.weight.shape[0]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment