Error while loading the checkpoints

I finetuned the Xlm/roberta and got its .ckpt file. But I am unable to load these check points for testing. While loading, I am getting errors like this:
‘XLMRobertaModel’ object has no attribute ‘load_from_checkpoint.’

I am using this code to load the checkpoint.

from transformers import AutoTokenizer
model_checkpoint = ‘deepset/xlm-roberta-base-squad2’
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)

from transformers import AutoModelForQuestionAnswering
model = AutoModelForQuestionAnswering.from_pretrained(model_checkpoint)


kindly help me to sort out the slolution

I’m not sure where you have seen the load_from_checkpoint method but it does not exist in Transformers. Same for the .ckpt file, it’s not something generated from our side.