
import json
import os
import unittest

from transformers import AutoTokenizer, GPTaTokenizer, GPTaTokenizerFast
from transformers.models.gpta.tokenization_gpta import VOCAB_FILES_NAMES
from transformers.testing_utils import require_tokenizers

from ...test_tokenization_common import TokenizerTesterMixin




@require_tokenizers
class 					_SCREAMING_SNAKE_CASE  (      __UpperCamelCase       ,					unittest.TestCase ):
      _A						:		Union[str, Any]    	=     GPTaTokenizer
      _A						:		Any    	=     GPTaTokenizerFast
      _A						:		Dict    	=     True
      _A						:		Optional[Any]    	=     {'add_prefix_space': True}
      _A						:		List[str]    	=     False
      def A_			(			self ):
          super().setUp()

          # Adapted from Sennrich et al. 2015 and https://github.com/rsennrich/subword-nmt
          snake_case__						=				[
              "l",
              "o",
              "w",
              "e",
              "r",
              "s",
              "t",
              "i",
              "d",
              "n",
              "\u0120",
              "\u0120l",
              "\u0120n",
              "\u0120lo",
              "\u0120low",
              "er",
              "\u0120lowest",
              "\u0120newer",
              "\u0120wider",
              "<unk>",
              "<|endoftext|>",
          ]
          snake_case__						=				dict(zip(lowerCamelCase		,	range(len(lowerCamelCase ) ) ) )
          snake_case__						=				["#version: 0.2", "\u0120 l", "\u0120l o", "\u0120lo w", "e r", ""]
          snake_case__						=				{"unk_token": "<unk>"}

          snake_case__						=				os.path.join(self.tmpdirname		,	VOCAB_FILES_NAMES["vocab_file"] )
          snake_case__						=				os.path.join(self.tmpdirname		,	VOCAB_FILES_NAMES["merges_file"] )
          with open(self.vocab_file		,	"w"		,	encoding="utf-8" ) as fp:
              fp.write(json.dumps(lowerCamelCase ) + "\n" )
          with open(self.merges_file		,	"w"		,	encoding="utf-8" ) as fp:
              fp.write("\n".join(lowerCamelCase ) )
      def A_			(			self		,	**lowerCamelCase ):
          kwargs.update(self.special_tokens_map )
          return GPTaTokenizer.from_pretrained(self.tmpdirname		,	**lowerCamelCase )
      def A_			(			self		,	**lowerCamelCase ):
          kwargs.update(self.special_tokens_map )
          return GPTaTokenizerFast.from_pretrained(self.tmpdirname		,	**lowerCamelCase )
      def A_			(			self		,	lowerCamelCase ):
          snake_case__						=				"lower newer"
          snake_case__						=				"lower newer"
          return input_text, output_text
      def A_			(			self ):
          snake_case__						=				GPTaTokenizer(self.vocab_file		,	self.merges_file		,	**self.special_tokens_map )
          snake_case__						=				"lower newer"
          snake_case__						=				["\u0120low", "er", "\u0120", "n", "e", "w", "er"]
          snake_case__						=				tokenizer.tokenize(lowerCamelCase		,	add_prefix_space=lowerCamelCase )
          self.assertListEqual(lowerCamelCase		,	lowerCamelCase )

          snake_case__						=				tokens + [tokenizer.unk_token]
          snake_case__						=				[14, 15, 10, 9, 3, 2, 15, 19]
          self.assertListEqual(tokenizer.convert_tokens_to_ids(lowerCamelCase )		,	lowerCamelCase )
      def A_			(			self ):
          if not self.test_rust_tokenizer:
              return

          snake_case__						=				self.get_tokenizer()
          snake_case__						=				self.get_rust_tokenizer(add_prefix_space=lowerCamelCase )

          snake_case__						=				"lower newer"

          # Testing tokenization
          snake_case__						=				tokenizer.tokenize(lowerCamelCase		,	add_prefix_space=lowerCamelCase )
          snake_case__						=				rust_tokenizer.tokenize(lowerCamelCase )
          self.assertListEqual(lowerCamelCase		,	lowerCamelCase )

          # Testing conversion to ids without special tokens
          snake_case__						=				tokenizer.encode(lowerCamelCase		,	add_special_tokens=lowerCamelCase		,	add_prefix_space=lowerCamelCase )
          snake_case__						=				rust_tokenizer.encode(lowerCamelCase		,	add_special_tokens=lowerCamelCase )
          self.assertListEqual(lowerCamelCase		,	lowerCamelCase )

          # Testing conversion to ids with special tokens
          snake_case__						=				self.get_rust_tokenizer(add_prefix_space=lowerCamelCase )
          snake_case__						=				tokenizer.encode(lowerCamelCase		,	add_prefix_space=lowerCamelCase )
          snake_case__						=				rust_tokenizer.encode(lowerCamelCase )
          self.assertListEqual(lowerCamelCase		,	lowerCamelCase )

          # Testing the unknown token
          snake_case__						=				tokens + [rust_tokenizer.unk_token]
          snake_case__						=				[14, 15, 10, 9, 3, 2, 15, 19]
          self.assertListEqual(rust_tokenizer.convert_tokens_to_ids(lowerCamelCase )		,	lowerCamelCase )
      def A_			(			self		,	*lowerCamelCase		,	**lowerCamelCase ):
          # It's very difficult to mix/test pretokenization with byte-level
          # And get both GPT2 and Roberta to work at the same time (mostly an issue of adding a space before the string)
          pass
      def A_			(			self		,	lowerCamelCase=15 ):
          for tokenizer, pretrained_name, kwargs in self.tokenizers_list:
              with self.subTest(F"""{tokenizer.__class__.__name__} ({pretrained_name})""" ):
                  snake_case__						=				self.rust_tokenizer_class.from_pretrained(lowerCamelCase		,	**lowerCamelCase )

                  # Simple input
                  snake_case__						=				"This is a simple input"
                  snake_case__						=				["This is a simple input 1", "This is a simple input 2"]
                  snake_case__						=				("This is a simple input", "This is a pair")
                  snake_case__						=				[
                      ("This is a simple input 1", "This is a simple input 2"),
                      ("This is a simple pair 1", "This is a simple pair 2"),
                  ]

                  # Simple input tests
                  self.assertRaises(lowerCamelCase		,	tokenizer_r.encode		,	lowerCamelCase		,	max_length=lowerCamelCase		,	padding="max_length" )

                  # Simple input
                  self.assertRaises(lowerCamelCase		,	tokenizer_r.encode_plus		,	lowerCamelCase		,	max_length=lowerCamelCase		,	padding="max_length" )

                  # Simple input
                  self.assertRaises(
                      lowerCamelCase		,	tokenizer_r.batch_encode_plus		,	lowerCamelCase		,	max_length=lowerCamelCase		,	padding="max_length"		,	)

                  # Pair input
                  self.assertRaises(lowerCamelCase		,	tokenizer_r.encode		,	lowerCamelCase		,	max_length=lowerCamelCase		,	padding="max_length" )

                  # Pair input
                  self.assertRaises(lowerCamelCase		,	tokenizer_r.encode_plus		,	lowerCamelCase		,	max_length=lowerCamelCase		,	padding="max_length" )

                  # Pair input
                  self.assertRaises(
                      lowerCamelCase		,	tokenizer_r.batch_encode_plus		,	lowerCamelCase		,	max_length=lowerCamelCase		,	padding="max_length"		,	)
      def A_			(			self ):
          snake_case__						=				GPTaTokenizer.from_pretrained(self.tmpdirname		,	pad_token="<pad>" )

          # Simple input
          snake_case__						=				"This is a simple input"
          snake_case__						=				["This is a simple input looooooooong", "This is a simple input"]
          snake_case__						=				("This is a simple input", "This is a pair")
          snake_case__						=				[
              ("This is a simple input loooooong", "This is a simple input"),
              ("This is a simple pair loooooong", "This is a simple pair"),
          ]

          snake_case__						=				tokenizer.pad_token_id

          snake_case__						=				tokenizer(lowerCamelCase		,	padding="max_length"		,	max_length=30		,	return_tensors="np" )
          snake_case__						=				tokenizer(lowerCamelCase		,	padding=lowerCamelCase		,	truncate=lowerCamelCase		,	return_tensors="np" )
          snake_case__						=				tokenizer(*lowerCamelCase		,	padding="max_length"		,	max_length=60		,	return_tensors="np" )
          snake_case__						=				tokenizer(lowerCamelCase		,	padding=lowerCamelCase		,	truncate=lowerCamelCase		,	return_tensors="np" )

          # s
          # test single string max_length padding
          self.assertEqual(out_s["input_ids"].shape[-1]		,	30 )
          self.assertTrue(pad_token_id in out_s["input_ids"] )
          self.assertTrue(0 in out_s["attention_mask"] )

          # s2
          # test automatic padding
          self.assertEqual(out_sa["input_ids"].shape[-1]		,	33 )
          # long slice doesn't have padding
          self.assertFalse(pad_token_id in out_sa["input_ids"][0] )
          self.assertFalse(0 in out_sa["attention_mask"][0] )
          # short slice does have padding
          self.assertTrue(pad_token_id in out_sa["input_ids"][1] )
          self.assertTrue(0 in out_sa["attention_mask"][1] )

          # p
          # test single pair max_length padding
          self.assertEqual(out_p["input_ids"].shape[-1]		,	60 )
          self.assertTrue(pad_token_id in out_p["input_ids"] )
          self.assertTrue(0 in out_p["attention_mask"] )

          # p2
          # test automatic padding pair
          self.assertEqual(out_pa["input_ids"].shape[-1]		,	52 )
          # long slice pair doesn't have padding
          self.assertFalse(pad_token_id in out_pa["input_ids"][0] )
          self.assertFalse(0 in out_pa["attention_mask"][0] )
          # short slice pair does have padding
          self.assertTrue(pad_token_id in out_pa["input_ids"][1] )
          self.assertTrue(0 in out_pa["attention_mask"][1] )
      def A_			(			self ):
          snake_case__						=				"$$$"
          snake_case__						=				GPTaTokenizer.from_pretrained(self.tmpdirname		,	bos_token=lowerCamelCase		,	add_bos_token=lowerCamelCase )

          snake_case__						=				"This is a simple input"
          snake_case__						=				["This is a simple input 1", "This is a simple input 2"]

          snake_case__						=				tokenizer.bos_token_id

          snake_case__						=				tokenizer(lowerCamelCase )
          snake_case__						=				tokenizer(lowerCamelCase )

          self.assertEqual(out_s.input_ids[0]		,	lowerCamelCase )
          self.assertTrue(all(o[0] == bos_token_id for o in out_sa.input_ids ) )

          snake_case__						=				tokenizer.decode(out_s.input_ids )
          snake_case__						=				tokenizer.batch_decode(out_sa.input_ids )

          self.assertEqual(decode_s.split()[0]		,	lowerCamelCase )
          self.assertTrue(all(d.split()[0] == bos_token for d in decode_sa ) )
      def A_			(			self ):
          pass



      def A_			(			self ):
          # TODO: change to self.get_tokenizers() when the fast version is implemented
          snake_case__						=				[self.get_tokenizer(do_lower_case=lowerCamelCase		,	add_bos_token=lowerCamelCase )]
          for tokenizer in tokenizers:
              with self.subTest(F"""{tokenizer.__class__.__name__}""" ):
                  snake_case__						=				"Encode this."
                  snake_case__						=				"This one too please."
                  snake_case__						=				tokenizer.encode(lowerCamelCase		,	add_special_tokens=lowerCamelCase )
                  encoded_sequence += tokenizer.encode(lowerCamelCase		,	add_special_tokens=lowerCamelCase )
                  snake_case__						=				tokenizer.encode_plus(
                      lowerCamelCase		,	lowerCamelCase		,	add_special_tokens=lowerCamelCase		,	return_special_tokens_mask=lowerCamelCase		,	)
                  snake_case__						=				encoded_sequence_dict["input_ids"]
                  snake_case__						=				encoded_sequence_dict["special_tokens_mask"]
                  self.assertEqual(len(lowerCamelCase )		,	len(lowerCamelCase ) )

                  snake_case__						=				[
                      (x if not special_tokens_mask[i] else None) for i, x in enumerate(lowerCamelCase )
                  ]
                  snake_case__						=				[x for x in filtered_sequence if x is not None]
                  self.assertEqual(lowerCamelCase		,	lowerCamelCase )





@require_tokenizers
class 					_SCREAMING_SNAKE_CASE  (      unittest.TestCase ):
      def A_			(			self ):
          # More context:
          # https://huggingface.co/wjmcat/opt-350m-paddle/discussions/1
          # https://huggingface.slack.com/archives/C01N44FJDHT/p1653511495183519
          # https://github.com/huggingface/transformers/pull/17088#discussion_r871246439

          snake_case__						=				AutoTokenizer.from_pretrained("facebook/opt-350m"		,	from_slow=lowerCamelCase )
          snake_case__						=				"A photo of a cat"

          snake_case__						=				tokenizer.encode(
              lowerCamelCase		,	)
          self.assertEqual(lowerCamelCase		,	[2, 2_50, 13_45, 9, 10, 47_58] )
          tokenizer.save_pretrained("test_opt" )

          snake_case__						=				AutoTokenizer.from_pretrained("./test_opt" )
          snake_case__						=				tokenizer.encode(
              lowerCamelCase		,	)
          self.assertEqual(lowerCamelCase		,	[2, 2_50, 13_45, 9, 10, 47_58] )
      def A_			(			self ):
          snake_case__						=				AutoTokenizer.from_pretrained("facebook/opt-350m"		,	use_slow=lowerCamelCase )
          snake_case__						=				"A photo of a cat"

          snake_case__						=				tokenizer.encode(
              lowerCamelCase		,	)
          # Same as above
          self.assertEqual(lowerCamelCase		,	[2, 2_50, 13_45, 9, 10, 47_58] )



      @unittest.skip("This test is failing because of a bug in the fast tokenizer" )
      def A_			(			self ):
          snake_case__						=				AutoTokenizer.from_pretrained("facebook/opt-350m"		,	from_slow=lowerCamelCase )

          snake_case__						=				"bos"
          snake_case__						=				tokenizer.get_vocab()["bos"]

          snake_case__						=				"A photo of a cat"
          snake_case__						=				tokenizer.encode(
              lowerCamelCase		,	)
          # We changed the bos token
          self.assertEqual(lowerCamelCase		,	[3_19_57, 2_50, 13_45, 9, 10, 47_58] )
          tokenizer.save_pretrained("./tok" )
          snake_case__						=				AutoTokenizer.from_pretrained("./tok" )
          self.assertTrue(tokenizer.is_fast )
          snake_case__						=				tokenizer.encode(
              lowerCamelCase		,	)
          self.assertEqual(lowerCamelCase		,	[3_19_57, 2_50, 13_45, 9, 10, 47_58] )





import os
import re
import shutil
import sys
import tempfile
import unittest

import black


__magic_name__            =  os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
sys.path.append(os.path.join(git_repo_path, '''utils'''))

import check_copies  # noqa: E402


# This is the reference code that will be used in the tests.
# If BertLMPredictionHead is changed in modeling_bert.py, this code needs to be manually updated.
__magic_name__            =  '''    def __init__(self, config):
        super().__init__()
        self.transform = BertPredictionHeadTransform(config)

        # The output weights are the same as the input embeddings, but there is
        # an output-only bias for each token.
        self.decoder = nn.Linear(config.hidden_size, config.vocab_size, bias=False)

        self.bias = nn.Parameter(torch.zeros(config.vocab_size))

        # Need a link between the two variables so that the bias is correctly resized with `resize_token_embeddings`
        self.decoder.bias = self.bias

    def forward(self, hidden_states):
        hidden_states = self.transform(hidden_states)
        hidden_states = self.decoder(hidden_states)
        return hidden_states
'''




class 					_SCREAMING_SNAKE_CASE  (      unittest.TestCase ):
      def A_			(			self ):
          snake_case__						=				tempfile.mkdtemp()
          os.makedirs(os.path.join(self.transformer_dir		,	"models/bert/" ) )
          snake_case__						=				self.transformer_dir
          shutil.copy(
              os.path.join(lowerCamelCase		,	"src/transformers/models/bert/modeling_bert.py" )		,	os.path.join(self.transformer_dir		,	"models/bert/modeling_bert.py" )		,	)
      def A_			(			self ):
          snake_case__						=				"src/transformers"
          shutil.rmtree(self.transformer_dir )
      def A_			(			self		,	lowerCamelCase		,	lowerCamelCase		,	lowerCamelCase		,	lowerCamelCase=None ):
          snake_case__						=				comment + F"""\nclass {class_name}(nn.Module):\n""" + class_code
          if overwrite_result is not None:
              snake_case__						=				comment + F"""\nclass {class_name}(nn.Module):\n""" + overwrite_result
          snake_case__						=				black.Mode(target_versions={black.TargetVersion.PYaa}		,	line_length=1_19 )
          snake_case__						=				black.format_str(lowerCamelCase		,	mode=lowerCamelCase )
          snake_case__						=				os.path.join(self.transformer_dir		,	"new_code.py" )
          with open(lowerCamelCase		,	"w"		,	newline="\n" ) as f:
              f.write(lowerCamelCase )
          if overwrite_result is None:
              self.assertTrue(len(check_copies.is_copy_consistent(lowerCamelCase ) ) == 0 )
          else:
              check_copies.is_copy_consistent(f.name		,	overwrite=lowerCamelCase )
              with open(lowerCamelCase		,	"r" ) as f:
                  self.assertTrue(f.read()		,	lowerCamelCase )
      def A_			(			self ):
          snake_case__						=				check_copies.find_code_in_transformers("models.bert.modeling_bert.BertLMPredictionHead" )
          self.assertEqual(lowerCamelCase		,	lowerCamelCase )
      def A_			(			self ):
          # Base copy consistency
          self.check_copy_consistency(
              "# Copied from transformers.models.bert.modeling_bert.BertLMPredictionHead"		,	"BertLMPredictionHead"		,	REFERENCE_CODE + "\n"		,	)

          # With no empty line at the end
          self.check_copy_consistency(
              "# Copied from transformers.models.bert.modeling_bert.BertLMPredictionHead"		,	"BertLMPredictionHead"		,	lowerCamelCase		,	)

          # Copy consistency with rename
          self.check_copy_consistency(
              "# Copied from transformers.models.bert.modeling_bert.BertLMPredictionHead with Bert->TestModel"		,	"TestModelLMPredictionHead"		,	re.sub("Bert"		,	"TestModel"		,	lowerCamelCase )		,	)

          # Copy consistency with a really long name
          snake_case__						=				"TestModelWithAReallyLongNameBecauseSomePeopleLikeThatForSomeReason"
          self.check_copy_consistency(
              F"""# Copied from transformers.models.bert.modeling_bert.BertLMPredictionHead with Bert->{long_class_name}"""		,	F"""{long_class_name}LMPredictionHead"""		,	re.sub("Bert"		,	lowerCamelCase		,	lowerCamelCase )		,	)

          # Copy consistency with overwrite
          self.check_copy_consistency(
              "# Copied from transformers.models.bert.modeling_bert.BertLMPredictionHead with Bert->TestModel"		,	"TestModelLMPredictionHead"		,	lowerCamelCase		,	overwrite_result=re.sub("Bert"		,	"TestModel"		,	lowerCamelCase )		,	)



      def A_			(			self ):
          snake_case__						=				check_copies.LOCALIZED_READMES["README_zh-hans.md"]

          snake_case__						=				(
              "1. **[ALBERT](https://huggingface.co/transformers/model_doc/albert.html)** (from Google Research and the"
              " Toyota Technological Institute at Chicago) released with the paper [ALBERT: A Lite BERT for"
              " Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942), by Zhenzhong"
              " Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut.\n1."
              " **[DistilBERT](https://huggingface.co/transformers/model_doc/distilbert.html)** (from HuggingFace),"
              " released together with the paper [DistilBERT, a distilled version of BERT: smaller, faster, cheaper and"
              " lighter](https://arxiv.org/abs/1910.01108) by Victor Sanh, Lysandre Debut and Thomas Wolf. The same"
              " method has been applied to compress GPT2 into"
              " [DistilGPT2](https://github.com/huggingface/transformers/tree/main/examples/distillation), RoBERTa into"
              " [DistilRoBERTa](https://github.com/huggingface/transformers/tree/main/examples/distillation),"
              " Multilingual BERT into"
              " [DistilmBERT](https://github.com/huggingface/transformers/tree/main/examples/distillation) and a German"
              " version of DistilBERT.\n1. **[ELECTRA](https://huggingface.co/transformers/model_doc/electra.html)**"
              " (from Google Research/Stanford University) released with the paper [ELECTRA: Pre-training text encoders"
              " as discriminators rather than generators](https://arxiv.org/abs/2003.10555) by Kevin Clark, Minh-Thang"
              " Luong, Quoc V. Le, Christopher D. Manning."
          )
          snake_case__						=				(
              "1. **[ALBERT](https://huggingface.co/transformers/model_doc/albert.html)** (来自 Google Research and the"
              " Toyota Technological Institute at Chicago) 伴随论文 [ALBERT: A Lite BERT for Self-supervised Learning of"
              " Language Representations](https://arxiv.org/abs/1909.11942), 由 Zhenzhong Lan, Mingda Chen, Sebastian"
              " Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut 发布。\n"
          )
          snake_case__						=				(
              "1. **[ALBERT](https://huggingface.co/transformers/model_doc/albert.html)** (来自 Google Research and the"
              " Toyota Technological Institute at Chicago) 伴随论文 [ALBERT: A Lite BERT for Self-supervised Learning of"
              " Language Representations](https://arxiv.org/abs/1909.11942), 由 Zhenzhong Lan, Mingda Chen, Sebastian"
              " Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut 发布。\n1."
              " **[DistilBERT](https://huggingface.co/transformers/model_doc/distilbert.html)** (来自 HuggingFace) 伴随论文"
              " [DistilBERT, a distilled version of BERT: smaller, faster, cheaper and"
              " lighter](https://arxiv.org/abs/1910.01108) 由 Victor Sanh, Lysandre Debut and Thomas Wolf 发布。 The same"
              " method has been applied to compress GPT2 into"
              " [DistilGPT2](https://github.com/huggingface/transformers/tree/main/examples/distillation), RoBERTa into"
              " [DistilRoBERTa](https://github.com/huggingface/transformers/tree/main/examples/distillation),"
              " Multilingual BERT into"
              " [DistilmBERT](https://github.com/huggingface/transformers/tree/main/examples/distillation) and a German"
              " version of DistilBERT.\n1. **[ELECTRA](https://huggingface.co/transformers/model_doc/electra.html)** (来自"
              " Google Research/Stanford University) 伴随论文 [ELECTRA: Pre-training text encoders as discriminators rather"
              " than generators](https://arxiv.org/abs/2003.10555) 由 Kevin Clark, Minh-Thang Luong, Quoc V. Le,"
              " Christopher D. Manning 发布。\n"
          )

          snake_case__						,					snake_case__						=				check_copies.convert_to_localized_md(
              lowerCamelCase		,	lowerCamelCase		,	localized_readme["format_model_list"] )

          self.assertFalse(lowerCamelCase )
          self.assertEqual(lowerCamelCase		,	lowerCamelCase )

          snake_case__						,					snake_case__						=				check_copies.convert_to_localized_md(
              lowerCamelCase		,	lowerCamelCase		,	localized_readme["format_model_list"] )

          # Check whether the number of models is equal to README.md after conversion.
          self.assertTrue(lowerCamelCase )

          snake_case__						=				(
              "1. **[ALBERT](https://huggingface.co/transformers/model_doc/albert.html)** (from Google Research and the"
              " Toyota Technological Institute at Chicago) released with the paper [ALBERT: A Lite BERT for"
              " Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942), by Zhenzhong"
              " Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut."
          )
          snake_case__						=				(
              "1. **[ALBERT](https://huggingface.co/transformers/main/model_doc/albert.html)** (来自 Google Research and"
              " the Toyota Technological Institute at Chicago) 伴随论文 [ALBERT: A Lite BERT for Self-supervised Learning of"
              " Language Representations](https://arxiv.org/abs/1909.11942), 由 Zhenzhong Lan, Mingda Chen, Sebastian"
              " Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut 发布。\n"
          )
          snake_case__						=				(
              "1. **[ALBERT](https://huggingface.co/transformers/model_doc/albert.html)** (来自 Google Research and the"
              " Toyota Technological Institute at Chicago) 伴随论文 [ALBERT: A Lite BERT for Self-supervised Learning of"
              " Language Representations](https://arxiv.org/abs/1909.11942), 由 Zhenzhong Lan, Mingda Chen, Sebastian"
              " Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut 发布。\n"
          )

          snake_case__						,					snake_case__						=				check_copies.convert_to_localized_md(
              lowerCamelCase		,	lowerCamelCase		,	localized_readme["format_model_list"] )

          # Check if the model link is synchronized.
          self.assertEqual(lowerCamelCase		,	lowerCamelCase )



