System Info
transformers version: 5.0.0.dev0 (main branch)
- Platform: Linux
- Python version: 3.12
- PyTorch version: 2.x with CUDA
- GPU: NVIDIA (tested)
Who can help?
@stevhliu
Information
Tasks
Reproduction
In version 4 of transformers, there's a method tie_embeddings_and_encoder_decoder.
This method is not present in version 5, without a deprecation note in the release notes.
Run:
from transformers import AutoTokenizer, AutoModelForMaskedLM
model_id = "answerdotai/ModernBERT-base"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForMaskedLM.from_pretrained(model_id)
model.tie_embeddings_and_encoder_decoder()
Expected behavior
deprecation notice / docs what to do instead