Posted on:

11 Mar 2025

0

Question about way to Import

Hello, I have a question about the way to import the BERT model,and the same to import tokenizer
Is there any difference between these two methods? (I use TensorFlow instead of PyTorch.)
option 1:
model_bert = TFBertForQuestionAnswering.from_pretrained(model_name) 
tokenizer_bert = BertTokenizer.from_pretrained(model_name)  


Option2:
model_auto = TFAutoModelForQuestionAnswering.from_pretrained(model_name)
 
tokenizer_auto = AutoTokenizer.from_pretrained(model_name) 

Thanks in advanced.
0 answers ( 0 marked as helpful)

Submit an answer