Skip to content

Commit

Permalink
Fix: failing CI after #30568 (#30599)
Browse files Browse the repository at this point in the history
* failiing CI

* no let's keep it intil full deprecation in  v4.42
  • Loading branch information
zucchini-nlp committed May 2, 2024
1 parent c681b58 commit 5cf3e6b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/transformers/modeling_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1905,6 +1905,9 @@ def resize_token_embeddings(
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]

Expand Down

0 comments on commit 5cf3e6b

Please sign in to comment.