From 50726f9ea7afc6113da617f8f4ca1ab264a5e28a Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Fri, 14 Jul 2023 15:20:02 +0200 Subject: [PATCH] Fixing double `use_auth_token.pop` (preventing private models from being visible). (#24812) Fixing double `use_auth_token.pop` (preventing private models from being visible). Should fix: https://github.com/huggingface/transformers/issues/14334#issuecomment-1634527833 Repro: Have a private repo, with `vocab.json` (spread out files for the tokenizer) and use `AutoTokenizer.from_pretrained(..., use_auth_token="token")`. --- src/transformers/tokenization_utils_base.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/transformers/tokenization_utils_base.py b/src/transformers/tokenization_utils_base.py index c9284c10a2..2f18e964d1 100644 --- a/src/transformers/tokenization_utils_base.py +++ b/src/transformers/tokenization_utils_base.py @@ -1710,7 +1710,6 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin): from_auto_class = kwargs.pop("_from_auto", False) commit_hash = kwargs.pop("_commit_hash", None) - use_auth_token = kwargs.pop("use_auth_token", None) if use_auth_token is not None: warnings.warn( "The `use_auth_token` argument is deprecated and will be removed in v5 of Transformers.", FutureWarning