@chem1 I tried this:
from transformers import TFAutoModel
checkpoint = ‘distilbert-base-uncased-finetuned-sst-2-english’
model = TFAutoModel.from_pretrained(checkpoint)
I am getting this:
RuntimeError: Failed to import transformers.models.distilbert.modeling_tf_distilbert because of the following error (look up to see its traceback):
module ‘tensorflow._api.v2.compat.v2.internal’ has no attribute ‘register_load_context_function’
I am using latest version of everything. More specifically, transformers = 4.38.2, tensorflow = 2.16, keras = 3.1.1, protobuf = 5.26.0