


'''simple docstring'''

import warnings
from collections import OrderedDict
from typing import Any, Mapping, Optional

from ... import PreTrainedTokenizer
from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig, OnnxConfigWithPast, OnnxSeqaSeqConfigWithPast
from ...onnx.utils import compute_effective_axis_dimension
from ...utils import TensorType, is_torch_available, logging


a_    :							Union[str, Any]         =					logging.get_logger(__name__)

a_    :							Optional[Any]         =					{
    """facebook/bart-large""": """https://huggingface.co/facebook/bart-large/resolve/main/config.json""",
    # See all BART models at https://huggingface.co/models?filter=bart
}





class 	snake_case       (       lowercase     ):





  """simple docstring"""




  _lowerCamelCase						       =    "bart"
  _lowerCamelCase						       =    ["past_key_values"]
  _lowerCamelCase						       =    {"num_attention_heads": "encoder_attention_heads", "hidden_size": "d_model"}






  def __init__(       self     ,    UpperCamelCase=5_0265     ,    UpperCamelCase=1024     ,    UpperCamelCase=12     ,    UpperCamelCase=4096     ,    UpperCamelCase=16     ,    UpperCamelCase=12     ,    UpperCamelCase=4096     ,    UpperCamelCase=16     ,    UpperCamelCase=0.0     ,    UpperCamelCase=0.0     ,    UpperCamelCase="gelu"     ,    UpperCamelCase=1024     ,    UpperCamelCase=0.1     ,    UpperCamelCase=0.0     ,    UpperCamelCase=0.0     ,    UpperCamelCase=0.02     ,    UpperCamelCase=0.0     ,    UpperCamelCase=False     ,    UpperCamelCase=True     ,    UpperCamelCase=3     ,    UpperCamelCase=1     ,    UpperCamelCase=0     ,    UpperCamelCase=2     ,    UpperCamelCase=True     ,    UpperCamelCase=2     ,    UpperCamelCase=2     ,    **UpperCamelCase     ,    ):







   """simple docstring"""
   lowerCamelCase_						=    vocab_size
   lowerCamelCase_						=    max_position_embeddings
   lowerCamelCase_						=    d_model
   lowerCamelCase_						=    encoder_ffn_dim
   lowerCamelCase_						=    encoder_layers
   lowerCamelCase_						=    encoder_attention_heads
   lowerCamelCase_						=    decoder_ffn_dim
   lowerCamelCase_						=    decoder_layers
   lowerCamelCase_						=    decoder_attention_heads
   lowerCamelCase_						=    dropout
   lowerCamelCase_						=    attention_dropout
   lowerCamelCase_						=    activation_dropout
   lowerCamelCase_						=    activation_function
   lowerCamelCase_						=    init_std
   lowerCamelCase_						=    encoder_layerdrop
   lowerCamelCase_						=    decoder_layerdrop
   lowerCamelCase_						=    classifier_dropout
   lowerCamelCase_						=    use_cache
   lowerCamelCase_						=    encoder_layers
   lowerCamelCase_						=    scale_embedding  # scale factor will be sqrt(d_model) if True

   super().__init__(
       num_labels=UpperCamelCase     ,    pad_token_id=UpperCamelCase     ,    bos_token_id=UpperCamelCase     ,    eos_token_id=UpperCamelCase     ,    is_encoder_decoder=UpperCamelCase     ,    decoder_start_token_id=UpperCamelCase     ,    forced_eos_token_id=UpperCamelCase     ,    **UpperCamelCase     ,    )

   # ensure backward compatibility for BART CNN models
   if self.forced_bos_token_id is None and kwargs.get("force_bos_token_to_be_generated"     ,    UpperCamelCase	):
    lowerCamelCase_						=    self.bos_token_id
    warnings.warn(
        f'''Please make sure the config includes `forced_bos_token_id={self.bos_token_id}` in future versions. '''
        "The config can simply be saved and uploaded again to be fixed."	)





class 	snake_case       (       lowercase     ):





  """simple docstring"""




  @property
  def     snake_case						(       self	):







   """simple docstring"""






   if self.task in ["default", "seq2seq-lm"]:
    lowerCamelCase_						=    OrderedDict(
        [
            ("input_ids", {0: "batch", 1: "encoder_sequence"}),
            ("attention_mask", {0: "batch", 1: "encoder_sequence"}),
        ]	)

    if self.use_past:
     lowerCamelCase_						=    {0: "batch"}
     lowerCamelCase_						=    {0: "batch", 1: "past_decoder_sequence + sequence"}
    else:
     lowerCamelCase_						=    {0: "batch", 1: "decoder_sequence"}
     lowerCamelCase_						=    {0: "batch", 1: "decoder_sequence"}

    if self.use_past:
     self.fill_with_past_key_values_(UpperCamelCase     ,    direction="inputs"	)
   elif self.task == "causal-lm":
    # TODO: figure this case out.
    lowerCamelCase_						=    OrderedDict(
        [
            ("input_ids", {0: "batch", 1: "encoder_sequence"}),
            ("attention_mask", {0: "batch", 1: "encoder_sequence"}),
        ]	)
    if self.use_past:
     lowerCamelCase_					,lowerCamelCase_						=    self.num_layers
     for i in range(UpperCamelCase	):
      lowerCamelCase_						=    {0: "batch", 2: "past_sequence + sequence"}
      lowerCamelCase_						=    {0: "batch", 2: "past_sequence + sequence"}
   else:
    lowerCamelCase_						=    OrderedDict(
        [
            ("input_ids", {0: "batch", 1: "encoder_sequence"}),
            ("attention_mask", {0: "batch", 1: "encoder_sequence"}),
            ("decoder_input_ids", {0: "batch", 1: "decoder_sequence"}),
            ("decoder_attention_mask", {0: "batch", 1: "decoder_sequence"}),
        ]	)

   return common_inputs






  @property
  def     snake_case						(       self	):







   """simple docstring"""






   if self.task in ["default", "seq2seq-lm"]:
    lowerCamelCase_						=    super().outputs
   else:
    lowerCamelCase_						=    super(UpperCamelCase     ,    self	).outputs
    if self.use_past:
     lowerCamelCase_					,lowerCamelCase_						=    self.num_layers
     for i in range(UpperCamelCase	):
      lowerCamelCase_						=    {0: "batch", 2: "past_sequence + sequence"}
      lowerCamelCase_						=    {0: "batch", 2: "past_sequence + sequence"}
   return common_outputs






  def     snake_case						(       self     ,    UpperCamelCase     ,    UpperCamelCase = -1     ,    UpperCamelCase = -1     ,    UpperCamelCase = False     ,    UpperCamelCase = None     ,    ):







   """simple docstring"""
   lowerCamelCase_						=    self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
       UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase	)

   # Generate decoder inputs
   lowerCamelCase_						=    seq_length if not self.use_past else 1
   lowerCamelCase_						=    self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
       UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase	)
   lowerCamelCase_						=    {f'''decoder_{name}''': tensor for name, tensor in decoder_inputs.items()}
   lowerCamelCase_						=    dict(**UpperCamelCase     ,    **UpperCamelCase	)

   if self.use_past:
    if not is_torch_available():
     raise ValueError("Cannot generate dummy past_keys inputs without PyTorch installed."	)
    else:
     import torch
    lowerCamelCase_					,lowerCamelCase_						=    common_inputs["input_ids"].shape
    lowerCamelCase_						=    common_inputs["decoder_input_ids"].shape[1]
    lowerCamelCase_					,lowerCamelCase_						=    self.num_attention_heads
    lowerCamelCase_						=    (
        batch,
        num_encoder_attention_heads,
        encoder_seq_length,
        self._config.hidden_size // num_encoder_attention_heads,
    )
    lowerCamelCase_						=    decoder_seq_length + 3
    lowerCamelCase_						=    (
        batch,
        num_decoder_attention_heads,
        decoder_past_length,
        self._config.hidden_size // num_decoder_attention_heads,
    )

    lowerCamelCase_						=    torch.cat(
        [common_inputs["decoder_attention_mask"], torch.ones(UpperCamelCase     ,    UpperCamelCase	)]     ,    dim=1	)

    lowerCamelCase_						=    []
    # If the number of encoder and decoder layers are present in the model configuration, both are considered
    lowerCamelCase_					,lowerCamelCase_						=    self.num_layers
    lowerCamelCase_						=    min(UpperCamelCase     ,    UpperCamelCase	)
    lowerCamelCase_						=    max(UpperCamelCase     ,    UpperCamelCase	) - min_num_layers
    lowerCamelCase_						=    "encoder" if num_encoder_layers > num_decoder_layers else "decoder"

    for _ in range(UpperCamelCase	):
     common_inputs["past_key_values"].append(
         (
             torch.zeros(UpperCamelCase	),
             torch.zeros(UpperCamelCase	),
             torch.zeros(UpperCamelCase	),
             torch.zeros(UpperCamelCase	),
         )	)
    # TODO: test this.
    lowerCamelCase_						=    encoder_shape if remaining_side_name == "encoder" else decoder_shape
    for _ in range(UpperCamelCase     ,    UpperCamelCase	):
     common_inputs["past_key_values"].append((torch.zeros(UpperCamelCase	), torch.zeros(UpperCamelCase	))	)
   return common_inputs






  def     snake_case						(       self     ,    UpperCamelCase     ,    UpperCamelCase = -1     ,    UpperCamelCase = -1     ,    UpperCamelCase = False     ,    UpperCamelCase = None     ,    ):







   """simple docstring"""
   lowerCamelCase_						=    self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
       UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase	)

   if self.use_past:
    if not is_torch_available():
     raise ValueError("Cannot generate dummy past_keys inputs without PyTorch installed."	)
    else:
     import torch
    lowerCamelCase_					,lowerCamelCase_						=    common_inputs["input_ids"].shape
    # Not using the same length for past_key_values
    lowerCamelCase_						=    seqlen + 2
    lowerCamelCase_					,lowerCamelCase_						=    self.num_layers
    lowerCamelCase_					,lowerCamelCase_						=    self.num_attention_heads
    lowerCamelCase_						=    (
        batch,
        num_encoder_attention_heads,
        past_key_values_length,
        self._config.hidden_size // num_encoder_attention_heads,
    )

    lowerCamelCase_						=    common_inputs["attention_mask"].dtype
    lowerCamelCase_						=    torch.cat(
        [common_inputs["attention_mask"], torch.ones(UpperCamelCase     ,    UpperCamelCase     ,    dtype=UpperCamelCase	)]     ,    dim=1	)
    lowerCamelCase_						=    [
        (torch.zeros(UpperCamelCase	), torch.zeros(UpperCamelCase	)) for _ in range(UpperCamelCase	)
    ]
   return common_inputs






  def     snake_case						(       self     ,    UpperCamelCase     ,    UpperCamelCase = -1     ,    UpperCamelCase = -1     ,    UpperCamelCase = False     ,    UpperCamelCase = None     ,    ):







   """simple docstring"""
   lowerCamelCase_						=    compute_effective_axis_dimension(
       UpperCamelCase     ,    fixed_dimension=OnnxConfig.default_fixed_batch     ,    num_token_to_add=0	)

   # If dynamic axis (-1) we forward with a fixed dimension of 8 tokens to avoid optimizations made by ONNX
   lowerCamelCase_						=    tokenizer.num_special_tokens_to_add(UpperCamelCase	)
   lowerCamelCase_						=    compute_effective_axis_dimension(
       UpperCamelCase     ,    fixed_dimension=OnnxConfig.default_fixed_sequence     ,    num_token_to_add=UpperCamelCase	)

   # Generate dummy inputs according to compute batch and sequence
   lowerCamelCase_						=    [" ".join([tokenizer.unk_token]	) * seq_length] * batch_size
   lowerCamelCase_						=    dict(tokenizer(UpperCamelCase     ,    return_tensors=UpperCamelCase	)	)
   return common_inputs






  def     snake_case						(       self     ,    UpperCamelCase     ,    UpperCamelCase = -1     ,    UpperCamelCase = -1     ,    UpperCamelCase = False     ,    UpperCamelCase = None     ,    ):







   """simple docstring"""






   if self.task in ["default", "seq2seq-lm"]:
    lowerCamelCase_						=    self._generate_dummy_inputs_for_default_and_seqaseq_lm(
        UpperCamelCase     ,    batch_size=UpperCamelCase     ,    seq_length=UpperCamelCase     ,    is_pair=UpperCamelCase     ,    framework=UpperCamelCase	)

   elif self.task == "causal-lm":
    lowerCamelCase_						=    self._generate_dummy_inputs_for_causal_lm(
        UpperCamelCase     ,    batch_size=UpperCamelCase     ,    seq_length=UpperCamelCase     ,    is_pair=UpperCamelCase     ,    framework=UpperCamelCase	)
   else:
    lowerCamelCase_						=    self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
        UpperCamelCase     ,    batch_size=UpperCamelCase     ,    seq_length=UpperCamelCase     ,    is_pair=UpperCamelCase     ,    framework=UpperCamelCase	)

   return common_inputs







  def     snake_case						(       self     ,    UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase	):







   """simple docstring"""






   if self.task in ["default", "seq2seq-lm"]:
    lowerCamelCase_						=    super()._flatten_past_key_values_(UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase	)
   else:
    lowerCamelCase_						=    super(UpperCamelCase     ,    self	)._flatten_past_key_values_(
        UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase     ,    UpperCamelCase	)






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

import black


lowercase_   							=  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.
lowercase_   							=  '    def __init__(self, config):\n        super().__init__()\n        self.transform = BertPredictionHeadTransform(config)\n\n        # The output weights are the same as the input embeddings, but there is\n        # an output-only bias for each token.\n        self.decoder = nn.Linear(config.hidden_size, config.vocab_size, bias=False)\n\n        self.bias = nn.Parameter(torch.zeros(config.vocab_size))\n\n        # Need a link between the two variables so that the bias is correctly resized with `resize_token_embeddings`\n        self.decoder.bias = self.bias\n\n    def forward(self, hidden_states):\n        hidden_states = self.transform(hidden_states)\n        hidden_states = self.decoder(hidden_states)\n        return hidden_states\n'





class 					__lowerCAmelCase	(   unittest.TestCase				):




  def     A__	(							self   )    ->					Tuple:
        '''simple docstring'''






        _lowercase      			=tempfile.mkdtemp()
        os.makedirs(os.path.join(self.transformer_dir				,  'models/bert/'   )   )
        _lowercase      			=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   )    ->					Optional[int]:
        '''simple docstring'''






        _lowercase      			='src/transformers'
        shutil.rmtree(self.transformer_dir   )




  def     A__	(							self				,  lowerCAmelCase				,  lowerCAmelCase				,  lowerCAmelCase				,  lowerCAmelCase=None   )    ->					str:
        '''simple docstring'''






        _lowercase      			=comment + F'''\nclass {class_name}(nn.Module):\n''' + class_code
        if overwrite_result is not None:
              _lowercase      			=comment + F'''\nclass {class_name}(nn.Module):\n''' + overwrite_result
        _lowercase      			=black.Mode(target_versions={black.TargetVersion.PYaa}				,  line_length=119   )
        _lowercase      			=black.format_str(lowerCAmelCase				,  mode=lowerCAmelCase   )
        _lowercase      			=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   )    ->					Dict:
        '''simple docstring'''






        _lowercase      			=check_copies.find_code_in_transformers('models.bert.modeling_bert.BertLMPredictionHead'   )
        self.assertEqual(lowerCAmelCase				,  lowerCAmelCase   )




  def     A__	(							self   )    ->					str:
        '''simple docstring'''






        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
        _lowercase      			='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   )    ->					List[str]:
        '''simple docstring'''






        _lowercase      			=check_copies.LOCALIZED_READMES['README_zh-hans.md']

        _lowercase      			=(
            '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.'
        )
        _lowercase      			=(
            '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'
        )
        _lowercase      			=(
            '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'
        )

        _lowercase			,			_lowercase      			=check_copies.convert_to_localized_md(
            lowerCAmelCase				,  lowerCAmelCase				,  localized_readme['format_model_list']   )

        self.assertFalse(lowerCAmelCase   )
        self.assertEqual(lowerCAmelCase				,  lowerCAmelCase   )

        _lowercase			,			_lowercase      			=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   )

        _lowercase      			=(
            '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.'
        )
        _lowercase      			=(
            '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'
        )
        _lowercase      			=(
            '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'
        )

        _lowercase			,			_lowercase      			=check_copies.convert_to_localized_md(
            lowerCAmelCase				,  lowerCAmelCase				,  localized_readme['format_model_list']   )

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


