diff --git a/docs/source/en/tasks/question_answering.md b/docs/source/en/tasks/question_answering.md index 0db26ab8cbb71c..625cf96dc886b6 100644 --- a/docs/source/en/tasks/question_answering.md +++ b/docs/source/en/tasks/question_answering.md @@ -271,7 +271,7 @@ Then you can load DistilBERT with [`TFAutoModelForQuestionAnswering`]: ```py >>> from transformers import TFAutoModelForQuestionAnswering ->>> model = TFAutoModelForQuestionAnswering("distilbert-base-uncased") +>>> model = TFAutoModelForQuestionAnswering.from_pretrained("distilbert-base-uncased") ``` Convert your datasets to the `tf.data.Dataset` format with [`~transformers.TFPreTrainedModel.prepare_tf_dataset`]: