Error while loading the xlm\roberta 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