From 49eb357564c74ca3e1813dc2a8bf036ca81ec535 Mon Sep 17 00:00:00 2001 From: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Date: Mon, 17 Jul 2023 13:27:11 -0400 Subject: [PATCH] Fix token pass (#24862) * Fix how token is passed along in from_pretrained for tokenizers * It's actually not necessary --- src/transformers/tokenization_utils_base.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/transformers/tokenization_utils_base.py b/src/transformers/tokenization_utils_base.py index 2f18e964d1..f5271aff66 100644 --- a/src/transformers/tokenization_utils_base.py +++ b/src/transformers/tokenization_utils_base.py @@ -1720,10 +1720,6 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin): ) token = use_auth_token - if token is not None: - # change to `token` in a follow-up PR - kwargs["use_auth_token"] = token - user_agent = {"file_type": "tokenizer", "from_auto_class": from_auto_class, "is_fast": "Fast" in cls.__name__} if from_pipeline is not None: user_agent["using_pipeline"] = from_pipeline