



"""simple docstring"""






import os
from pathlib import Path






def 					snake_case__       (		__lowerCamelCase    :   Union[str, Any]							,		__lowerCamelCase    :   int							,		__lowerCamelCase    :   Tuple							,		__lowerCamelCase    :   Union[str, Any]     ):
   """simple docstring"""
   lowerCamelCase__		:		Any		     ={
       '''en''': '''Machine learning is great, isn\'t it?''',
       '''ru''': '''Машинное обучение - это здорово, не так ли?''',
       '''de''': '''Maschinelles Lernen ist großartig, nicht wahr?''',
   }

   # BLUE scores as follows:
   # "pair": [fairseq, transformers]
   lowerCamelCase__		:		Optional[Any]		     ={
       '''wmt16-en-de-dist-12-1''': [28.3, 27.52],
       '''wmt16-en-de-dist-6-1''': [27.4, 27.11],
       '''wmt16-en-de-12-1''': [26.9, 25.75],
   }
   lowerCamelCase__		:		Any		     =f'''{src_lang}-{tgt_lang}'''

   lowerCamelCase__		:		Any		     =f'''
---
language:
- {src_lang}
- {tgt_lang}
thumbnail:
tags:
- translation
- wmt16
- allenai
license: apache-2.0
datasets:
- wmt16
metrics:
- bleu
---

# FSMT

## Model description

This is a ported version of fairseq-based [wmt16 transformer](https://github.com/jungokasai/deep-shallow/) for {src_lang}-{tgt_lang}.

For more details, please, see [Deep Encoder, Shallow Decoder: Reevaluating the Speed-Quality Tradeoff in Machine Translation](https://arxiv.org/abs/2006.10369).

All 3 models are available:

* [wmt16-en-de-dist-12-1](https://huggingface.co/allenai/wmt16-en-de-dist-12-1)
* [wmt16-en-de-dist-6-1](https://huggingface.co/allenai/wmt16-en-de-dist-6-1)
* [wmt16-en-de-12-1](https://huggingface.co/allenai/wmt16-en-de-12-1)


## Intended uses & limitations

#### How to use

```python
from transformers import FSMTForConditionalGeneration, FSMTTokenizer
mname = "allenai/{model_name}"
tokenizer = FSMTTokenizer.from_pretrained(mname)
model = FSMTForConditionalGeneration.from_pretrained(mname)

input = "{texts[src_lang]}"
input_ids = tokenizer.encode(input, return_tensors="pt")
outputs = model.generate(input_ids)
decoded = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(decoded) # {texts[tgt_lang]}

```

#### Limitations and bias


## Training data

Pretrained weights were left identical to the original model released by allenai. For more details, please, see the [paper](https://arxiv.org/abs/2006.10369).

## Eval results

Here are the BLEU scores:

model   | fairseq | transformers
-------|---------|----------
{model_name}  | {scores[model_name][0]} | {scores[model_name][1]}

The score is slightly below the score reported in the paper, as the researchers don\'t use `sacrebleu` and measure the score on tokenized outputs. `transformers` score was measured using `sacrebleu` on detokenized outputs.

The score was calculated using this code:

```bash
git clone https://github.com/huggingface/transformers
cd transformers
export PAIR={pair}
export DATA_DIR=data/$PAIR
export SAVE_DIR=data/$PAIR
export BS=8
export NUM_BEAMS=5
mkdir -p $DATA_DIR
sacrebleu -t wmt16 -l $PAIR --echo src > $DATA_DIR/val.source
sacrebleu -t wmt16 -l $PAIR --echo ref > $DATA_DIR/val.target
echo $PAIR
PYTHONPATH="src:examples/seq2seq" python examples/seq2seq/run_eval.py allenai/{model_name} $DATA_DIR/val.source $SAVE_DIR/test_translations.txt --reference_path $DATA_DIR/val.target --score_path $SAVE_DIR/test_bleu.json --bs $BS --task translation --num_beams $NUM_BEAMS
```

## Data Sources

- [training, etc.](http://www.statmt.org/wmt16/)
- [test set](http://matrix.statmt.org/test_sets/newstest2016.tgz?1504722372)


### BibTeX entry and citation info

```
@misc{{kasai2020deep,
    title={{Deep Encoder, Shallow Decoder: Reevaluating the Speed-Quality Tradeoff in Machine Translation}},
    author={{Jungo Kasai and Nikolaos Pappas and Hao Peng and James Cross and Noah A. Smith}},
    year={{2020}},
    eprint={{2006.10369}},
    archivePrefix={{arXiv}},
    primaryClass={{cs.CL}}
}}
```

'''
   model_card_dir.mkdir(parents=__lowerCamelCase							,		exist_ok=__lowerCamelCase     )
   lowerCamelCase__		:		str		     =os.path.join(__lowerCamelCase							,		'''README.md'''     )
   print(f'''Generating {path}'''     )
   with open(__lowerCamelCase							,		'''w'''							,		encoding='''utf-8'''     ) as f:
      f.write(__lowerCamelCase     )


# make sure we are under the root of the project
_lowercase			:			List[str]										=						Path(__file__).resolve().parent.parent.parent
_lowercase			:			Dict										=						repo_dir / "model_cards"

for model_name in ["wmt16-en-de-dist-12-1", "wmt16-en-de-dist-6-1", "wmt16-en-de-12-1"]:
  _lowercase			:			int										=						model_cards_dir / "allenai" / model_name
  write_model_card(model_card_dir, src_lang="en", tgt_lang="de", model_name=model_name)









"""simple docstring"""






from __future__ import annotations

import unittest

from transformers import FunnelConfig, is_tf_available
from transformers.testing_utils import require_tf

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


if is_tf_available():
		import tensorflow as tf

		from transformers import (
		    TFFunnelBaseModel,
		    TFFunnelForMaskedLM,
		    TFFunnelForMultipleChoice,
		    TFFunnelForPreTraining,
		    TFFunnelForQuestionAnswering,
		    TFFunnelForSequenceClassification,
		    TFFunnelForTokenClassification,
		    TFFunnelModel,
		)

class 	__SCREAMING_SNAKE_CASE     :


					'''simple docstring'''





					def __init__(	self							:  Dict,  lowerCamelCase							:  str,  lowerCamelCase							:  Dict=13,  lowerCamelCase							:  Optional[Any]=7,  lowerCamelCase							:  List[Any]=True,  lowerCamelCase							:  Dict=True,  lowerCamelCase							:  List[Any]=True,  lowerCamelCase							:  Optional[int]=True,  lowerCamelCase							:  int=99,  lowerCamelCase							:  Optional[int]=[1, 1, 2],  lowerCamelCase							:  str=1,  lowerCamelCase							:  List[Any]=32,  lowerCamelCase							:  str=4,  lowerCamelCase							:  Dict=8,  lowerCamelCase							:  List[Any]=37,  lowerCamelCase							:  Optional[int]="gelu_new",  lowerCamelCase							:  Union[str, Any]=0.1,  lowerCamelCase							:  List[Any]=0.1,  lowerCamelCase							:  List[Any]=0.0,  lowerCamelCase							:  Dict=512,  lowerCamelCase							:  Dict=3,  lowerCamelCase							:  str=0.02,  lowerCamelCase							:  str=3,  lowerCamelCase							:  Optional[int]=4,  lowerCamelCase							:  List[str]=None,  lowerCamelCase							:  Tuple=False,  )-> Union[str, Any]:
								lowerCamelCase__		:		int		     =parent
								lowerCamelCase__		:		Dict		     =batch_size
								lowerCamelCase__		:		Dict		     =seq_length
								lowerCamelCase__		:		Any		     =is_training
								lowerCamelCase__		:		int		     =use_input_mask
								lowerCamelCase__		:		Tuple		     =use_token_type_ids
								lowerCamelCase__		:		int		     =use_labels
								lowerCamelCase__		:		Tuple		     =vocab_size
								lowerCamelCase__		:		Union[str, Any]		     =block_sizes
								lowerCamelCase__		:		Any		     =num_decoder_layers
								lowerCamelCase__		:		Optional[Any]		     =d_model
								lowerCamelCase__		:		List[str]		     =n_head
								lowerCamelCase__		:		List[Any]		     =d_head
								lowerCamelCase__		:		Dict		     =d_inner
								lowerCamelCase__		:		Dict		     =hidden_act
								lowerCamelCase__		:		List[str]		     =hidden_dropout
								lowerCamelCase__		:		Union[str, Any]		     =attention_dropout
								lowerCamelCase__		:		Union[str, Any]		     =activation_dropout
								lowerCamelCase__		:		Dict		     =max_position_embeddings
								lowerCamelCase__		:		Dict		     =type_vocab_size
								lowerCamelCase__		:		Union[str, Any]		     =2
								lowerCamelCase__		:		Optional[int]		     =num_labels
								lowerCamelCase__		:		List[str]		     =num_choices
								lowerCamelCase__		:		Tuple		     =scope
								lowerCamelCase__		:		Optional[int]		     =initializer_std

								# Used in the tests to check the size of the first attention layer
								lowerCamelCase__		:		List[str]		     =n_head
								# Used in the tests to check the size of the first hidden state
								lowerCamelCase__		:		Tuple		     =self.d_model
								# Used in the tests to check the number of output hidden states/attentions
								lowerCamelCase__		:		List[Any]		     =sum(self.block_sizes					) + (0 if base else self.num_decoder_layers)
								# FunnelModel adds two hidden layers: input embeddings and the sum of the upsampled encoder hidden state with
								# the last hidden state of the first block (which is the first hidden state of the decoder).
								if not base:
											lowerCamelCase__		:		Union[str, Any]		     =self.num_hidden_layers + 2



					def 		snake_case	(	self							:  int					)-> List[Any]:
								lowerCamelCase__		:		Dict		     =ids_tensor([self.batch_size, self.seq_length],  self.vocab_size					)

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

								lowerCamelCase__		:		int		     =None
								if self.use_token_type_ids:
											lowerCamelCase__		:		Union[str, Any]		     =ids_tensor([self.batch_size, self.seq_length],  self.type_vocab_size					)

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

								lowerCamelCase__		:		Optional[int]		     =FunnelConfig(
								    vocab_size=self.vocab_size,  block_sizes=self.block_sizes,  num_decoder_layers=self.num_decoder_layers,  d_model=self.d_model,  n_head=self.n_head,  d_head=self.d_head,  d_inner=self.d_inner,  hidden_act=self.hidden_act,  hidden_dropout=self.hidden_dropout,  attention_dropout=self.attention_dropout,  activation_dropout=self.activation_dropout,  max_position_embeddings=self.max_position_embeddings,  type_vocab_size=self.type_vocab_size,  initializer_std=self.initializer_std,  )

								return (
								    config,
								    input_ids,
								    token_type_ids,
								    input_mask,
								    sequence_labels,
								    token_labels,
								    choice_labels,
								)



					def 		snake_case	(	self							:  List[Any],  lowerCamelCase							:  Optional[Any],  lowerCamelCase							:  Optional[int],  lowerCamelCase							:  int,  lowerCamelCase							:  int,  lowerCamelCase							:  str,  lowerCamelCase							:  List[str],  lowerCamelCase							:  Dict,  )-> Union[str, Any]:
								lowerCamelCase__		:		Tuple		     =TFFunnelModel(config=lowerCamelCase					)
								lowerCamelCase__		:		Dict		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		Tuple		     =model(lowerCamelCase					)

								lowerCamelCase__		:		Optional[Any]		     =[input_ids, input_mask]
								lowerCamelCase__		:		List[Any]		     =model(lowerCamelCase					)

								lowerCamelCase__		:		Any		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, self.seq_length, self.d_model)					)

								lowerCamelCase__		:		int		     =False
								lowerCamelCase__		:		Any		     =TFFunnelModel(config=lowerCamelCase					)
								lowerCamelCase__		:		str		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, self.seq_length, self.d_model)					)

								lowerCamelCase__		:		Dict		     =False
								lowerCamelCase__		:		Optional[int]		     =TFFunnelModel(config=lowerCamelCase					)
								lowerCamelCase__		:		Tuple		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, self.seq_length, self.d_model)					)



					def 		snake_case	(	self							:  Tuple,  lowerCamelCase							:  List[Any],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  str,  lowerCamelCase							:  Optional[Any],  lowerCamelCase							:  Tuple,  lowerCamelCase							:  Dict,  )-> Optional[Any]:
								lowerCamelCase__		:		List[str]		     =TFFunnelBaseModel(config=lowerCamelCase					)
								lowerCamelCase__		:		str		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		Union[str, Any]		     =model(lowerCamelCase					)

								lowerCamelCase__		:		Tuple		     =[input_ids, input_mask]
								lowerCamelCase__		:		Any		     =model(lowerCamelCase					)

								lowerCamelCase__		:		Optional[Any]		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, 2, self.d_model)					)

								lowerCamelCase__		:		List[Any]		     =False
								lowerCamelCase__		:		Dict		     =TFFunnelBaseModel(config=lowerCamelCase					)
								lowerCamelCase__		:		int		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, 3, self.d_model)					)

								lowerCamelCase__		:		Union[str, Any]		     =False
								lowerCamelCase__		:		Optional[Any]		     =TFFunnelBaseModel(config=lowerCamelCase					)
								lowerCamelCase__		:		str		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, 2, self.d_model)					)



					def 		snake_case	(	self							:  str,  lowerCamelCase							:  Dict,  lowerCamelCase							:  Dict,  lowerCamelCase							:  List[Any],  lowerCamelCase							:  Dict,  lowerCamelCase							:  List[Any],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  List[Any],  )-> List[Any]:
								lowerCamelCase__		:		List[str]		     =TFFunnelForPreTraining(config=lowerCamelCase					)
								lowerCamelCase__		:		List[Any]		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		Union[str, Any]		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.seq_length)					)



					def 		snake_case	(	self							:  str,  lowerCamelCase							:  Tuple,  lowerCamelCase							:  str,  lowerCamelCase							:  List[Any],  lowerCamelCase							:  List[Any],  lowerCamelCase							:  str,  lowerCamelCase							:  Tuple,  lowerCamelCase							:  int,  )-> List[Any]:
								lowerCamelCase__		:		Union[str, Any]		     =TFFunnelForMaskedLM(config=lowerCamelCase					)
								lowerCamelCase__		:		Tuple		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		List[Any]		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.seq_length, self.vocab_size)					)



					def 		snake_case	(	self							:  Optional[int],  lowerCamelCase							:  Tuple,  lowerCamelCase							:  Any,  lowerCamelCase							:  List[str],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  str,  lowerCamelCase							:  Optional[int],  lowerCamelCase							:  Dict,  )-> Union[str, Any]:
								lowerCamelCase__		:		Optional[Any]		     =self.num_labels
								lowerCamelCase__		:		Tuple		     =TFFunnelForSequenceClassification(config=lowerCamelCase					)
								lowerCamelCase__		:		Tuple		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		List[str]		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.num_labels)					)



					def 		snake_case	(	self							:  Union[str, Any],  lowerCamelCase							:  str,  lowerCamelCase							:  Dict,  lowerCamelCase							:  Dict,  lowerCamelCase							:  Dict,  lowerCamelCase							:  Optional[Any],  lowerCamelCase							:  int,  lowerCamelCase							:  Tuple,  )-> int:
								lowerCamelCase__		:		int		     =self.num_choices
								lowerCamelCase__		:		List[Any]		     =TFFunnelForMultipleChoice(config=lowerCamelCase					)
								lowerCamelCase__		:		int		     =tf.tile(tf.expand_dims(lowerCamelCase,  1					),  (1, self.num_choices, 1)					)
								lowerCamelCase__		:		Union[str, Any]		     =tf.tile(tf.expand_dims(lowerCamelCase,  1					),  (1, self.num_choices, 1)					)
								lowerCamelCase__		:		Optional[Any]		     =tf.tile(tf.expand_dims(lowerCamelCase,  1					),  (1, self.num_choices, 1)					)
								lowerCamelCase__		:		Union[str, Any]		     ={
								    '''input_ids''': multiple_choice_inputs_ids,
								    '''attention_mask''': multiple_choice_input_mask,
								    '''token_type_ids''': multiple_choice_token_type_ids,
								}
								lowerCamelCase__		:		str		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.num_choices)					)



					def 		snake_case	(	self							:  str,  lowerCamelCase							:  Dict,  lowerCamelCase							:  Optional[Any],  lowerCamelCase							:  Any,  lowerCamelCase							:  str,  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  Dict,  )-> Optional[int]:
								lowerCamelCase__		:		Optional[Any]		     =self.num_labels
								lowerCamelCase__		:		Optional[Any]		     =TFFunnelForTokenClassification(config=lowerCamelCase					)
								lowerCamelCase__		:		Tuple		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		Union[str, Any]		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.seq_length, self.num_labels)					)



					def 		snake_case	(	self							:  Optional[int],  lowerCamelCase							:  Dict,  lowerCamelCase							:  str,  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  str,  lowerCamelCase							:  Optional[int],  )-> Tuple:
								lowerCamelCase__		:		Tuple		     =TFFunnelForQuestionAnswering(config=lowerCamelCase					)
								lowerCamelCase__		:		Union[str, Any]		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		Optional[int]		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.start_logits.shape,  (self.batch_size, self.seq_length)					)
								self.parent.assertEqual(result.end_logits.shape,  (self.batch_size, self.seq_length)					)




					def 		snake_case	(	self							:  int					)-> List[str]:
								lowerCamelCase__		:		List[Any]		     =self.prepare_config_and_inputs()
								(
								    (
								    lowerCamelCase__
								)     ,       (
								    lowerCamelCase__
								)     ,       (
								    lowerCamelCase__
								)     ,       (
								    lowerCamelCase__
								)     ,       (
								    lowerCamelCase__
								)     ,       (
								    lowerCamelCase__
								)     ,       (
								    lowerCamelCase__
								)     ,       
								)		:		Tuple		     =config_and_inputs
								lowerCamelCase__		:		str		     ={'''input_ids''': input_ids, '''token_type_ids''': token_type_ids, '''attention_mask''': input_mask}
								return config, inputs_dict





@require_tf
class 	__SCREAMING_SNAKE_CASE     (				lowerCAmelCase_		,       lowerCAmelCase_		,       unittest.TestCase       ):


					'''simple docstring'''





					_a             =							(
					    (
					        TFFunnelModel,
					        TFFunnelForMaskedLM,
					        TFFunnelForPreTraining,
					        TFFunnelForQuestionAnswering,
					        TFFunnelForTokenClassification,
					    )
					    if is_tf_available()
					    else ()
					)
					_a             =							(
					    {
					        'feature-extraction': (TFFunnelBaseModel, TFFunnelModel),
					        'fill-mask': TFFunnelForMaskedLM,
					        'question-answering': TFFunnelForQuestionAnswering,
					        'text-classification': TFFunnelForSequenceClassification,
					        'token-classification': TFFunnelForTokenClassification,
					        'zero-shot': TFFunnelForSequenceClassification,
					    }
					    if is_tf_available()
					    else {}
					)
					_a             =							False
					_a             =							False



					def 		snake_case	(	self							:  str					)-> Tuple:
								lowerCamelCase__		:		Any		     =TFFunnelModelTester(self					)
								lowerCamelCase__		:		Any		     =ConfigTester(self,  config_class=lowerCamelCase					)



					def 		snake_case	(	self							:  List[str]					)-> Tuple:
								self.config_tester.run_common_tests()



					def 		snake_case	(	self							:  str					)-> List[Any]:
								lowerCamelCase__		:		Optional[Any]		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_model(*lowerCamelCase					)



					def 		snake_case	(	self							:  str					)-> Dict:
								lowerCamelCase__		:		int		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_for_pretraining(*lowerCamelCase					)



					def 		snake_case	(	self							:  int					)-> List[Any]:
								lowerCamelCase__		:		Tuple		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_for_masked_lm(*lowerCamelCase					)



					def 		snake_case	(	self							:  Dict					)-> Any:
								lowerCamelCase__		:		str		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_for_token_classification(*lowerCamelCase					)




					def 		snake_case	(	self							:  Tuple					)-> Optional[Any]:
								lowerCamelCase__		:		Optional[Any]		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_for_question_answering(*lowerCamelCase					)





@require_tf
class 	__SCREAMING_SNAKE_CASE     (				lowerCAmelCase_		,       unittest.TestCase       ):


					'''simple docstring'''





					_a             =							(
					    (TFFunnelBaseModel, TFFunnelForMultipleChoice, TFFunnelForSequenceClassification) if is_tf_available() else ()
					)
					_a             =							False
					_a             =							False



					def 		snake_case	(	self							:  int					)-> Tuple:
								lowerCamelCase__		:		Union[str, Any]		     =TFFunnelModelTester(self,  base=lowerCamelCase					)
								lowerCamelCase__		:		Tuple		     =ConfigTester(self,  config_class=lowerCamelCase					)



					def 		snake_case	(	self							:  Any					)-> Any:
								self.config_tester.run_common_tests()



					def 		snake_case	(	self							:  Optional[Any]					)-> Optional[Any]:
								lowerCamelCase__		:		Any		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_base_model(*lowerCamelCase					)



					def 		snake_case	(	self							:  Union[str, Any]					)-> int:
								lowerCamelCase__		:		Tuple		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_for_sequence_classification(*lowerCamelCase					)




					def 		snake_case	(	self							:  List[str]					)-> Optional[int]:
								lowerCamelCase__		:		List[Any]		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_for_multiple_choice(*lowerCamelCase					)




