

'''simple docstring'''



from __future__ import annotations

import unittest

from transformers import EsmConfig, is_tf_available
from transformers.testing_utils import require_tf, slow

from ...test_configuration_common import ConfigTester
from ...test_modeling_tf_common import TFModelTesterMixin, floats_tensor, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_tf_available():
		import numpy
		import tensorflow as tf

		from transformers.models.esm.modeling_tf_esm import (
		    TF_ESM_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TFEsmForMaskedLM,
		    TFEsmForSequenceClassification,
		    TFEsmForTokenClassification,
		    TFEsmModel,
		)



class lowerCamelCase			:



			'''simple docstring'''






			def __init__(				self	:						List[Any]		,      lowerCAmelCase_	:						int		,      )      ->		Tuple:





									'''simple docstring'''
									A__					:       Union[str, Any]     =parent
									A__					:       Optional[int]     =13
									A__					:       int     =7
									A__					:       Any     =True
									A__					:       Optional[Any]     =True
									A__					:       Dict     =True
									A__					:       Optional[int]     =99
									A__					:       Dict     =32
									A__					:       Optional[int]     =2
									A__					:       List[str]     =4
									A__					:       Optional[Any]     =37
									A__					:       Dict     ="""gelu"""
									A__					:       Dict     =0.1
									A__					:       Dict     =0.1
									A__					:       Optional[int]     =5_12
									A__					:       str     =16
									A__					:       int     =2
									A__					:       Any     =0.02
									A__					:       Optional[Any]     =3
									A__					:       str     =4
									A__					:       Dict     =None


			def lowercase__						(				self	:						Dict			)      ->		Any:





									'''simple docstring'''
									A__					:       Dict     =ids_tensor([self.batch_size, self.seq_length]		,      self.vocab_size			)

									A__					:       List[Any]     =None
									if self.use_input_mask:
															A__					:       Union[str, Any]     =random_attention_mask([self.batch_size, self.seq_length]			)

									A__					:       Dict     =None
									A__					:       Optional[Any]     =None
									A__					:       Optional[int]     =None
									if self.use_labels:
															A__					:       Union[str, Any]     =ids_tensor([self.batch_size]		,      self.type_sequence_label_size			)
															A__					:       Union[str, Any]     =ids_tensor([self.batch_size, self.seq_length]		,      self.num_labels			)
															A__					:       Any     =ids_tensor([self.batch_size]		,      self.num_choices			)

									A__					:       List[str]     =EsmConfig(
									    vocab_size=self.vocab_size		,      hidden_size=self.hidden_size		,      num_hidden_layers=self.num_hidden_layers		,      pad_token_id=1		,      num_attention_heads=self.num_attention_heads		,      intermediate_size=self.intermediate_size		,      hidden_act=self.hidden_act		,      hidden_dropout_prob=self.hidden_dropout_prob		,      attention_probs_dropout_prob=self.attention_probs_dropout_prob		,      max_position_embeddings=self.max_position_embeddings		,      type_vocab_size=self.type_vocab_size		,      initializer_range=self.initializer_range		,      )

									return config, input_ids, input_mask, sequence_labels, token_labels, choice_labels


			def lowercase__						(				self	:						str			)      ->		int:





									'''simple docstring'''
									(
									    (
									    A__
									)   ,						(
									    A__
									)   ,						(
									    A__
									)   ,						(
									    A__
									)   ,						(
									    A__
									)   ,						(
									    A__
									)   ,						
									)					:       Tuple     =self.prepare_config_and_inputs()

									A__					:       Tuple     =True
									A__					:       Tuple     =floats_tensor([self.batch_size, self.seq_length, self.hidden_size]			)
									A__					:       str     =ids_tensor([self.batch_size, self.seq_length]		,      vocab_size=2			)

									return (
									    config,
									    input_ids,
									    input_mask,
									    sequence_labels,
									    token_labels,
									    choice_labels,
									    encoder_hidden_states,
									    encoder_attention_mask,
									)


			def lowercase__						(				self	:						Optional[int]		,      lowerCAmelCase_	:						List[Any]		,      lowerCAmelCase_	:						Tuple		,      lowerCAmelCase_	:						Union[str, Any]		,      lowerCAmelCase_	:						Optional[Any]		,      lowerCAmelCase_	:						Any		,      lowerCAmelCase_	:						Dict			)      ->		Optional[Any]:





									'''simple docstring'''
									A__					:       Dict     =TFEsmModel(config=lowerCAmelCase_			)
									A__					:       int     ={"""input_ids""": input_ids, """attention_mask""": input_mask}
									A__					:       Tuple     =model(lowerCAmelCase_			)

									A__					:       str     =[input_ids, input_mask]
									A__					:       Tuple     =model(lowerCAmelCase_			)

									A__					:       Any     =model(lowerCAmelCase_			)

									self.parent.assertEqual(result.last_hidden_state.shape		,      (self.batch_size, self.seq_length, self.hidden_size)			)


			def lowercase__						(				self	:						Optional[int]		,      lowerCAmelCase_	:						Optional[int]		,      lowerCAmelCase_	:						Optional[int]		,      lowerCAmelCase_	:						Optional[int]		,      lowerCAmelCase_	:						str		,      lowerCAmelCase_	:						str		,      lowerCAmelCase_	:						Union[str, Any]		,      lowerCAmelCase_	:						Any		,      lowerCAmelCase_	:						Optional[int]		,      )      ->		int:





									'''simple docstring'''
									A__					:       Union[str, Any]     =True

									A__					:       List[str]     =TFEsmModel(config=lowerCAmelCase_			)
									A__					:       Dict     ={
									    """input_ids""": input_ids,
									    """attention_mask""": input_mask,
									    """encoder_hidden_states""": encoder_hidden_states,
									    """encoder_attention_mask""": encoder_attention_mask,
									}
									A__					:       Tuple     =model(lowerCAmelCase_			)

									A__					:       Optional[Any]     =[input_ids, input_mask]
									A__					:       Tuple     =model(lowerCAmelCase_		,      encoder_hidden_states=lowerCAmelCase_			)

									# Also check the case where encoder outputs are not passed
									A__					:       List[Any]     =model(lowerCAmelCase_		,      attention_mask=lowerCAmelCase_			)

									self.parent.assertEqual(result.last_hidden_state.shape		,      (self.batch_size, self.seq_length, self.hidden_size)			)


			def lowercase__						(				self	:						Tuple		,      lowerCAmelCase_	:						Union[str, Any]		,      lowerCAmelCase_	:						List[Any]		,      lowerCAmelCase_	:						Any		,      lowerCAmelCase_	:						str		,      lowerCAmelCase_	:						List[Any]		,      lowerCAmelCase_	:						Optional[int]			)      ->		List[str]:





									'''simple docstring'''
									A__					:       Optional[int]     =TFEsmForMaskedLM(config=lowerCAmelCase_			)
									A__					:       Optional[Any]     =model([input_ids, input_mask]			)
									self.parent.assertEqual(result.logits.shape		,      (self.batch_size, self.seq_length, self.vocab_size)			)


			def lowercase__						(				self	:						str		,      lowerCAmelCase_	:						Any		,      lowerCAmelCase_	:						List[Any]		,      lowerCAmelCase_	:						Optional[int]		,      lowerCAmelCase_	:						str		,      lowerCAmelCase_	:						Any		,      lowerCAmelCase_	:						Optional[Any]			)      ->		Optional[int]:





									'''simple docstring'''
									A__					:       Any     =self.num_labels
									A__					:       Union[str, Any]     =TFEsmForTokenClassification(config=lowerCAmelCase_			)
									A__					:       Optional[int]     ={"""input_ids""": input_ids, """attention_mask""": input_mask}
									A__					:       Dict     =model(lowerCAmelCase_			)
									self.parent.assertEqual(result.logits.shape		,      (self.batch_size, self.seq_length, self.num_labels)			)



			def lowercase__						(				self	:						str			)      ->		Optional[int]:





									'''simple docstring'''
									A__					:       str     =self.prepare_config_and_inputs()
									(
									    (
									    A__
									)   ,						(
									    A__
									)   ,						(
									    A__
									)   ,						(
									    A__
									)   ,						(
									    A__
									)   ,						(
									    A__
									)   ,						
									)					:       Tuple     =config_and_inputs
									A__					:       Any     ={"""input_ids""": input_ids, """attention_mask""": input_mask}
									return config, inputs_dict



@require_tf
class lowerCamelCase			(  lowercase_	,						lowercase_	,						unittest.TestCase						):



			'''simple docstring'''






			__snake_case        =	(
			    (
			        TFEsmModel,
			        TFEsmForMaskedLM,
			        TFEsmForSequenceClassification,
			        TFEsmForTokenClassification,
			    )
			    if is_tf_available()
			    else ()
			)
			__snake_case        =	(
			    {
			        'feature-extraction': TFEsmModel,
			        'fill-mask': TFEsmForMaskedLM,
			        'text-classification': TFEsmForSequenceClassification,
			        'token-classification': TFEsmForTokenClassification,
			        'zero-shot': TFEsmForSequenceClassification,
			    }
			    if is_tf_available()
			    else {}
			)
			__snake_case        =	False
			__snake_case        =	False


			def lowercase__						(				self	:						str			)      ->		Any:





									'''simple docstring'''
									A__					:       Optional[int]     =TFEsmModelTester(self			)
									A__					:       List[str]     =ConfigTester(self		,      config_class=lowerCAmelCase_		,      hidden_size=37			)


			def lowercase__						(				self	:						Tuple			)      ->		List[Any]:





									'''simple docstring'''
									self.config_tester.run_common_tests()


			def lowercase__						(				self	:						Optional[Any]			)      ->		Optional[int]:





									'''simple docstring'''
									A__					:       Dict     =self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_model(*lowerCAmelCase_			)


			def lowercase__						(				self	:						Any			)      ->		Optional[Any]:





									'''simple docstring'''
									A__					:       int     =self.model_tester.prepare_config_and_inputs_for_decoder()
									self.model_tester.create_and_check_model_as_decoder(*lowerCAmelCase_			)


			def lowercase__						(				self	:						Optional[Any]			)      ->		Dict:





									'''simple docstring'''
									A__					:       str     =self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_for_masked_lm(*lowerCAmelCase_			)


			def lowercase__						(				self	:						str			)      ->		Any:





									'''simple docstring'''
									A__					:       Optional[int]     =self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_for_token_classification(*lowerCAmelCase_			)


			@slow
			def lowercase__						(				self	:						str			)      ->		Dict:





									'''simple docstring'''
									for model_name in TF_ESM_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
															A__					:       Tuple     =TFEsmModel.from_pretrained(lowerCAmelCase_			)
															self.assertIsNotNone(lowerCAmelCase_			)


			@unittest.skip("""Protein models do not support embedding resizing."""			)
			def lowercase__						(				self	:						Optional[int]			)      ->		str:





									'''simple docstring'''
									pass


			@unittest.skip("""Protein models do not support embedding resizing."""			)
			def lowercase__						(				self	:						Optional[Any]			)      ->		List[str]:





									'''simple docstring'''
									pass



			def lowercase__						(				self	:						Union[str, Any]			)      ->		Optional[Any]:





									'''simple docstring'''
									A__   ,						A__					:       Tuple     =self.model_tester.prepare_config_and_inputs_for_common()

									for model_class in self.all_model_classes:
															A__					:       Tuple     =model_class(lowerCAmelCase_			)
															assert isinstance(model.get_input_embeddings()		,      tf.keras.layers.Layer			)
															if model_class is TFEsmForMaskedLM:
																					# Output embedding test differs from the main test because they're a matrix, not a layer
																					A__					:       Dict     =model.get_bias()
																					assert isinstance(lowerCAmelCase_		,      lowerCAmelCase_			)
																					for k, v in name.items():
																											assert isinstance(lowerCAmelCase_		,      tf.Variable			)
															else:
																					A__					:       List[str]     =model.get_output_embeddings()
																					assert x is None
																					A__					:       Dict     =model.get_bias()
																					assert name is None



@require_tf
class lowerCamelCase			(  unittest.TestCase						):



			'''simple docstring'''






			@slow
			def lowercase__						(				self	:						int			)      ->		Dict:





									'''simple docstring'''
									A__					:       List[Any]     =TFEsmForMaskedLM.from_pretrained("""facebook/esm2_t6_8M_UR50D"""			)

									A__					:       Tuple     =tf.constant([[0, 1, 2, 3, 4, 5]]			)
									A__					:       Union[str, Any]     =model(lowerCAmelCase_			)[0]
									A__					:       Union[str, Any]     =[1, 6, 33]
									self.assertEqual(list(output.numpy().shape			)		,      lowerCAmelCase_			)
									# compare the actual values for a slice.
									A__					:       Tuple     =tf.constant(
									    [
									        [
									            [8.921518, -10.589814, -6.4671307],
									            [-6.3967156, -13.911377, -1.1211915],
									            [-7.781247, -13.951557, -3.740592],
									        ]
									    ]			)
									self.assertTrue(numpy.allclose(output[:, :3, :3].numpy()		,      expected_slice.numpy()		,      atol=1e-2			)			)



			@slow
			def lowercase__						(				self	:						List[Any]			)      ->		List[Any]:





									'''simple docstring'''
									A__					:       Optional[Any]     =TFEsmModel.from_pretrained("""facebook/esm2_t6_8M_UR50D"""			)

									A__					:       Optional[Any]     =tf.constant([[0, 6, 4, 13, 5, 4, 16, 12, 11, 7, 2]]			)
									A__					:       int     =model(lowerCAmelCase_			)[0]
									# compare the actual values for a slice.
									A__					:       Tuple     =tf.constant(
									    [
									        [
									            [0.14443092, 0.54125327, 0.3247739],
									            [0.30340484, 0.00526676, 0.31077722],
									            [0.32278043, -0.24987096, 0.3414628],
									        ]
									    ]			)
									self.assertTrue(numpy.allclose(output[:, :3, :3].numpy()		,      expected_slice.numpy()		,      atol=1e-4			)			)




'''simple docstring'''



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

import black


__snake_case			:     List[str]										=      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.
__snake_case			:     Optional[int]										=      '    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						):



			'''simple docstring'''






			def lowercase__						(				self	:						Tuple			)      ->		Dict:





									'''simple docstring'''
									A__					:       Tuple     =tempfile.mkdtemp()
									os.makedirs(os.path.join(self.transformer_dir		,      """models/bert/"""			)			)
									A__					:       List[str]     =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 lowercase__						(				self	:						str			)      ->		List[str]:





									'''simple docstring'''
									A__					:       Union[str, Any]     ="""src/transformers"""
									shutil.rmtree(self.transformer_dir			)


			def lowercase__						(				self	:						Union[str, Any]		,      lowerCAmelCase_	:						Any		,      lowerCAmelCase_	:						List[Any]		,      lowerCAmelCase_	:						Optional[Any]		,      lowerCAmelCase_	:						int=None			)      ->		Dict:





									'''simple docstring'''
									A__					:       Union[str, Any]     =comment + f"\nclass {class_name}(nn.Module):\n" + class_code
									if overwrite_result is not None:
															A__					:       Optional[Any]     =comment + f"\nclass {class_name}(nn.Module):\n" + overwrite_result
									A__					:       str     =black.Mode(target_versions={black.TargetVersion.PYaa}		,      line_length=1_19			)
									A__					:       Any     =black.format_str(lowerCAmelCase_		,      mode=lowerCAmelCase_			)
									A__					:       Union[str, Any]     =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 lowercase__						(				self	:						Any			)      ->		Any:





									'''simple docstring'''
									A__					:       Dict     =check_copies.find_code_in_transformers("""models.bert.modeling_bert.BertLMPredictionHead"""			)
									self.assertEqual(lowerCAmelCase_		,      lowerCAmelCase_			)


			def lowercase__						(				self	:						Dict			)      ->		List[Any]:





									'''simple docstring'''
									# 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
									A__					:       Tuple     ="""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 lowercase__						(				self	:						Optional[Any]			)      ->		Optional[int]:





									'''simple docstring'''
									A__					:       List[Any]     =check_copies.LOCALIZED_READMES["""README_zh-hans.md"""]

									A__					:       List[str]     =(
									    """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."""
									)
									A__					:       Union[str, Any]     =(
									    """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"""
									)
									A__					:       str     =(
									    """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"""
									)

									A__   ,						A__					:       Optional[Any]     =check_copies.convert_to_localized_md(
									    lowerCAmelCase_		,      lowerCAmelCase_		,      localized_readme["""format_model_list"""]			)

									self.assertFalse(lowerCAmelCase_			)
									self.assertEqual(lowerCAmelCase_		,      lowerCAmelCase_			)

									A__   ,						A__					:       List[str]     =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_			)

									A__					:       Dict     =(
									    """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."""
									)
									A__					:       str     =(
									    """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"""
									)
									A__					:       int     =(
									    """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"""
									)

									A__   ,						A__					:       int     =check_copies.convert_to_localized_md(
									    lowerCAmelCase_		,      lowerCAmelCase_		,      localized_readme["""format_model_list"""]			)

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

