From e91692f4a3028b56bc22f930f36b639f4e61c480 Mon Sep 17 00:00:00 2001 From: ahotrod <44321615+ahotrod@users.noreply.github.com> Date: Fri, 3 Apr 2020 06:27:57 -0700 Subject: [PATCH] Update README.md (#3603) --- .../albert_xxlargev1_squad2_512/README.md | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/model_cards/ahotrod/albert_xxlargev1_squad2_512/README.md b/model_cards/ahotrod/albert_xxlargev1_squad2_512/README.md index a7cccda85c..61e0c291a5 100644 --- a/model_cards/ahotrod/albert_xxlargev1_squad2_512/README.md +++ b/model_cards/ahotrod/albert_xxlargev1_squad2_512/README.md @@ -64,27 +64,8 @@ TensorFlow: 2.1.0 Python: 3.7.6 ``` -### Inferencing / prediction works with the current Transformers v2.4.1 - -### Access this albert_xxlargev1_sqd2_512 fine-tuned model with "tried & true" code: +### Access this albert_xxlargev1_sqd2_512 fine-tuned model with: ```python -config_class, model_class, tokenizer_class = \ - AlbertConfig, AlbertForQuestionAnswering, AlbertTokenizer - -model_name_or_path = "ahotrod/albert_xxlargev1_squad2_512" -config = config_class.from_pretrained(model_name_or_path) -tokenizer = tokenizer_class.from_pretrained(model_name_or_path, do_lower_case=True) -model = model_class.from_pretrained(model_name_or_path, config=config) -``` - -### or the AutoModels (AutoConfig, AutoTokenizer & AutoModel) should also work, however I have yet to use them in my app & confirm: - -```python -from transformers import AutoConfig, AutoTokenizer, AutoModel - -model_name_or_path = "ahotrod/albert_xxlargev1_squad2_512" -config = AutoConfig.from_pretrained(model_name_or_path) -tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, do_lower_case=True) -model = AutoModel.from_pretrained(model_name_or_path, config=config) -``` \ No newline at end of file +tokenizer = AutoTokenizer.from_pretrained("ahotrod/albert_xxlargev1_squad2_512") +model = AutoModelForQuestionAnswering.from_pretrained("ahotrod/albert_xxlargev1_squad2_512")