mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-03 03:31:05 +06:00
* failiing CI * no let's keep it intil full deprecation in v4.42
This commit is contained in:
parent
c681b58b06
commit
5cf3e6bf05
@ -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]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user