[Doc Fix] Fix model name path in the transformers doc for AutoClasses (#24329)

fix model name path

Co-authored-by: Ritesh Ghorse <riteshghorse@Riteshs-Air.attlocal.net>
This commit is contained in:
Ritesh Ghorse 2023-06-19 12:26:55 -04:00 committed by GitHub
parent c003c8cb52
commit 20273ee214
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -376,7 +376,7 @@ Tokenize the text and return the `input_ids` as PyTorch tensors. You'll also nee
```py
>>> from transformers import AutoTokenizer
>>> tokenizer = AutoTokenizer.from_pretrained("my_awesome_eli5_mlm_model")
>>> tokenizer = AutoTokenizer.from_pretrained("stevhliu/my_awesome_eli5_mlm_model")
>>> inputs = tokenizer(text, return_tensors="pt")
>>> mask_token_index = torch.where(inputs["input_ids"] == tokenizer.mask_token_id)[1]
```
@ -409,7 +409,7 @@ Tokenize the text and return the `input_ids` as TensorFlow tensors. You'll also
```py
>>> from transformers import AutoTokenizer
>>> tokenizer = AutoTokenizer.from_pretrained("my_awesome_eli5_mlm_model")
>>> tokenizer = AutoTokenizer.from_pretrained("stevhliu/my_awesome_eli5_mlm_model")
>>> inputs = tokenizer(text, return_tensors="tf")
>>> mask_token_index = tf.where(inputs["input_ids"] == tokenizer.mask_token_id)[0, 1]
```