


import unittest

import numpy as np
import timeout_decorator  # noqa

from transformers import OPTConfig, is_flax_available
from transformers.testing_utils import require_flax, require_sentencepiece, slow

from ...generation.test_flax_utils import FlaxGenerationTesterMixin
from ...test_modeling_flax_common import FlaxModelTesterMixin, ids_tensor


if is_flax_available():
   import os

   # The slow tests are often failing with OOM error on GPU
   # This makes JAX allocate exactly what is needed on demand, and deallocate memory that is no longer needed
   # but will be slower as stated here https://jax.readthedocs.io/en/latest/gpu_memory_allocation.html
   _SCREAMING_SNAKE_CASE :					Tuple			=	"""platform"""

   import jax
   import jax.numpy as jnp

   from transformers import FlaxOPTForCausalLM, FlaxOPTModel, GPTaTokenizer







def 						_lowercase       (     __lowerCamelCase			:					int		,__lowerCamelCase			:					Optional[Any]		,__lowerCamelCase			:					int=None		,__lowerCamelCase			:					str=None			)  ->   Optional[int]:





     '''simple docstring'''





     if attention_mask is None:
          UpperCamelCase__							:  List[Any]								=     np.where(input_ids != config.pad_token_id		,1		,0			)
     return {
         "input_ids": input_ids,
         "attention_mask": attention_mask,
     }

@require_flax
class  UpperCamelCase__ :






      def __init__(     self					:   Dict,		__lowerCamelCase					:   Union[str, Any],		__lowerCamelCase					:   Any=13,		__lowerCamelCase					:   Union[str, Any]=7,		__lowerCamelCase					:   List[str]=True,		__lowerCamelCase					:   Any=False,		__lowerCamelCase					:   List[str]=99,		__lowerCamelCase					:   Optional[int]=16,		__lowerCamelCase					:   Union[str, Any]=2,		__lowerCamelCase					:   Optional[int]=4,		__lowerCamelCase					:   Dict=4,		__lowerCamelCase					:   Any="gelu",		__lowerCamelCase					:   str=0.1,		__lowerCamelCase					:   Union[str, Any]=0.1,		__lowerCamelCase					:   List[str]=20,		__lowerCamelCase					:   Optional[Any]=2,		__lowerCamelCase					:   Tuple=1,		__lowerCamelCase					:   Union[str, Any]=0,		__lowerCamelCase					:   Dict=16,		__lowerCamelCase					:   Optional[int]=16,		__lowerCamelCase					:   Any=0.02,		)  -> Any:
           UpperCamelCase__							:  Tuple								=     parent
           UpperCamelCase__							:  Optional[Any]								=     batch_size
           UpperCamelCase__							:  str								=     seq_length
           UpperCamelCase__							:  Any								=     is_training
           UpperCamelCase__							:  Dict								=     use_labels
           UpperCamelCase__							:  str								=     vocab_size
           UpperCamelCase__							:  Optional[Any]								=     hidden_size
           UpperCamelCase__							:  int								=     num_hidden_layers
           UpperCamelCase__							:  str								=     num_attention_heads
           UpperCamelCase__							:  Dict								=     intermediate_size
           UpperCamelCase__							:  Union[str, Any]								=     hidden_act
           UpperCamelCase__							:  List[str]								=     hidden_dropout_prob
           UpperCamelCase__							:  Optional[int]								=     attention_probs_dropout_prob
           UpperCamelCase__							:  List[str]								=     max_position_embeddings
           UpperCamelCase__							:  str								=     eos_token_id
           UpperCamelCase__							:  int								=     pad_token_id
           UpperCamelCase__							:  int								=     bos_token_id
           UpperCamelCase__							:  Union[str, Any]								=     embed_dim
           UpperCamelCase__							:  List[Any]								=     word_embed_proj_dim
           UpperCamelCase__							:  List[Any]								=     initializer_range
           UpperCamelCase__							:  List[str]								=     False






      def 	__lowercase(     self					:   Tuple   )  -> Union[str, Any]:
           UpperCamelCase__							:  str								=     np.clip(ids_tensor([self.batch_size, self.seq_length - 1],		self.vocab_size   ),		3,		self.vocab_size   )
           UpperCamelCase__							:  List[Any]								=     np.concatenate((input_ids, 2 * np.ones((self.batch_size, 1),		dtype=np.intaa   )),		-1   )

           UpperCamelCase__							:  int								=     OPTConfig(
               vocab_size=self.vocab_size,		hidden_size=self.hidden_size,		num_hidden_layers=self.num_hidden_layers,		num_attention_heads=self.num_attention_heads,		ffn_dim=self.intermediate_size,		dropout=self.hidden_dropout_prob,		attention_dropout=self.attention_probs_dropout_prob,		max_position_embeddings=self.max_position_embeddings,		eos_token_id=self.eos_token_id,		bos_token_id=self.bos_token_id,		pad_token_id=self.pad_token_id,		embed_dim=self.embed_dim,		is_encoder_decoder=__lowerCamelCase,		word_embed_proj_dim=self.word_embed_proj_dim,		initializer_range=self.initializer_range,		use_cache=__lowerCamelCase,		)
           UpperCamelCase__							:  str								=     prepare_opt_inputs_dict(__lowerCamelCase,		__lowerCamelCase   )
           return config, inputs_dict






      def 	__lowercase(     self					:   List[str]   )  -> List[Any]:
           UpperCamelCase__	,UpperCamelCase__							:  int								=     self.prepare_config_and_inputs()
           return config, inputs_dict






      def 	__lowercase(     self					:   List[str],		__lowerCamelCase					:   Union[str, Any],		__lowerCamelCase					:   List[Any],		__lowerCamelCase					:   str   )  -> int:
           UpperCamelCase__							:  Optional[int]								=     20
           UpperCamelCase__							:  Dict								=     model_class_name(__lowerCamelCase   )

           UpperCamelCase__							:  Tuple								=     inputs_dict['''input_ids''']
           UpperCamelCase__							:  List[str]								=     inputs_dict['''attention_mask''']

           UpperCamelCase__							:  Optional[Any]								=     model.init_cache(input_ids.shape[0],		__lowerCamelCase   )
           UpperCamelCase__							:  Optional[int]								=     jnp.ones((input_ids.shape[0], max_length),		dtype='''i4'''   )

           UpperCamelCase__							:  int								=     jnp.broadcast_to(
               jnp.arange(input_ids.shape[-1] - 1   )[None, :],		(input_ids.shape[0], input_ids.shape[-1] - 1),		)
           UpperCamelCase__							:  List[str]								=     model(
               input_ids[:, :-1],		attention_mask=__lowerCamelCase,		past_key_values=__lowerCamelCase,		position_ids=__lowerCamelCase,		)

           UpperCamelCase__							:  Union[str, Any]								=     jnp.array(input_ids.shape[0] * [[input_ids.shape[-1] - 1]],		dtype='''i4'''   )
           UpperCamelCase__							:  Optional[Any]								=     model(
               input_ids[:, -1:],		attention_mask=__lowerCamelCase,		past_key_values=outputs_cache.past_key_values,		position_ids=__lowerCamelCase,		)

           UpperCamelCase__							:  int								=     model(__lowerCamelCase   )

           UpperCamelCase__							:  Dict								=     np.max(np.abs((outputs_cache_next[0][:, -1, :5] - outputs[0][:, -1, :5])   )   )
           self.parent.assertTrue(diff < 1e-3,		msg=f'Max diff is {diff}'   )






      def 	__lowercase(     self					:   List[Any],		__lowerCamelCase					:   str,		__lowerCamelCase					:   List[Any],		__lowerCamelCase					:   List[Any]   )  -> int:
           UpperCamelCase__							:  List[Any]								=     20
           UpperCamelCase__							:  Tuple								=     model_class_name(__lowerCamelCase   )

           UpperCamelCase__	,UpperCamelCase__							:  Tuple								=     (
               inputs_dict['''input_ids'''],
               inputs_dict['''attention_mask'''],
           )

           UpperCamelCase__							:  List[Any]								=     jnp.concatenate(
               [
                   attention_mask,
                   jnp.zeros((attention_mask.shape[0], max_length - attention_mask.shape[1])   ),
               ],		axis=-1,		)

           UpperCamelCase__							:  int								=     model.init_cache(input_ids.shape[0],		__lowerCamelCase   )
           UpperCamelCase__							:  Tuple								=     jnp.broadcast_to(
               jnp.arange(input_ids.shape[-1] - 1   )[None, :],		(input_ids.shape[0], input_ids.shape[-1] - 1),		)

           UpperCamelCase__							:  List[str]								=     model(
               input_ids[:, :-1],		attention_mask=__lowerCamelCase,		past_key_values=__lowerCamelCase,		position_ids=__lowerCamelCase,		)
           UpperCamelCase__							:  Tuple								=     jnp.array(input_ids.shape[0] * [[input_ids.shape[-1] - 1]],		dtype='''i4'''   )
           UpperCamelCase__							:  Tuple								=     model(
               input_ids[:, -1:],		past_key_values=outputs_cache.past_key_values,		attention_mask=__lowerCamelCase,		position_ids=__lowerCamelCase,		)

           UpperCamelCase__							:  Tuple								=     model(__lowerCamelCase,		attention_mask=__lowerCamelCase   )

           UpperCamelCase__							:  str								=     np.max(np.abs((outputs_cache_next[0][:, -1, :5] - outputs[0][:, -1, :5])   )   )
           self.parent.assertTrue(diff < 1e-3,		msg=f'Max diff is {diff}'   )

@require_flax
class  UpperCamelCase__ ( __lowerCamelCase							,						unittest.TestCase							,						__lowerCamelCase			):
      a__   :     Tuple								=						(FlaxOPTModel, FlaxOPTForCausalLM) if is_flax_available() else ()
      a__   :     Tuple								=						() if is_flax_available() else ()






      def 	__lowercase(     self					:   List[str]   )  -> List[Any]:
           UpperCamelCase__							:  List[str]								=     FlaxOPTModelTester(self   )






      def 	__lowercase(     self					:   Optional[int]   )  -> List[Any]:
           UpperCamelCase__	,UpperCamelCase__							:  List[str]								=     self.model_tester.prepare_config_and_inputs()
           for model_class in self.all_model_classes:
                self.model_tester.check_use_cache_forward(__lowerCamelCase,		__lowerCamelCase,		__lowerCamelCase   )






      def 	__lowercase(     self					:   int   )  -> Optional[Any]:
           UpperCamelCase__	,UpperCamelCase__							:  str								=     self.model_tester.prepare_config_and_inputs()
           for model_class in self.all_model_classes:
                self.model_tester.check_use_cache_forward_with_attn_mask(__lowerCamelCase,		__lowerCamelCase,		__lowerCamelCase   )






      @slow
      def 	__lowercase(     self					:   Dict   )  -> Tuple:
           for model_class_name in self.all_model_classes:
                UpperCamelCase__							:  Optional[int]								=     model_class_name.from_pretrained('''facebook/opt-125m'''   )
                UpperCamelCase__							:  Optional[Any]								=     np.ones((1, 1)   ) * model.config.eos_token_id
                UpperCamelCase__							:  Union[str, Any]								=     model(__lowerCamelCase   )
                self.assertIsNotNone(__lowerCamelCase   )

@require_sentencepiece
@require_flax
class  UpperCamelCase__ ( unittest.TestCase			):






      @slow
      def 	__lowercase(     self					:   str   )  -> Optional[Any]:
           UpperCamelCase__							:  Any								=     FlaxOPTModel.from_pretrained('''facebook/opt-350m'''   )
           UpperCamelCase__							:  str								=     jnp.array([[0, 3_14_14, 2_32, 3_28, 7_40, 11_40, 1_26_95, 69, 4_60_78, 15_88, 2]]   )
           UpperCamelCase__							:  Optional[Any]								=     model(input_ids=__lowerCamelCase   ).last_hidden_state
           UpperCamelCase__							:  Optional[Any]								=     (1, 11, 5_12)
           self.assertEqual(output.shape,		__lowerCamelCase   )
           UpperCamelCase__							:  str								=     jnp.array(
               [[-0.2867, -1.9256, -0.3062], [-1.2711, -0.1337, -0.1897], [0.4109, 0.1187, -1.3142]]   )
           self.assertTrue(jnp.allclose(output[:, :3, :3],		__lowerCamelCase,		atol=4e-2   )   )

@require_flax
@slow
class  UpperCamelCase__ ( unittest.TestCase			):






      def 	__lowercase(     self					:   str   )  -> Dict:
           super().setUp()
           UpperCamelCase__							:  Optional[Any]								=     '''facebook/opt-350m'''






      def 	__lowercase(     self					:   Any   )  -> List[Any]:
           UpperCamelCase__							:  str								=     FlaxOPTForCausalLM.from_pretrained(self.path_model   )
           UpperCamelCase__							:  int								=     GPTaTokenizer.from_pretrained(self.path_model   )

           UpperCamelCase__							:  List[str]								=     [
               '''Today is a beautiful day and I want to''',
               '''In the city of''',
               '''Paris is the capital of France and''',
               '''Computers and mobile phones have taken''',
           ]
           # verify that prompt without BOS token is identical to Metaseq -> add_special_tokens=False
           UpperCamelCase__							:  List[Any]								=     tokenizer(__lowerCamelCase,		return_tensors='''jax''',		padding=__lowerCamelCase,		add_special_tokens=__lowerCamelCase   )
           UpperCamelCase__							:  Tuple								=     model(inputs.input_ids,		attention_mask=inputs.attention_mask   )[0].mean(axis=-1   )
           UpperCamelCase__							:  Optional[Any]								=     jnp.array(
               [
                   [1.3851, -13.8923, -10.5229, -10.7533, -0.2309, -10.2384, -0.5365, -9.0947, -5.1670],
                   [-4.7073, -10.6276, -3.9415, -21.5242, -0.2822, -0.2822, -0.2822, -0.2822, -0.2822],
                   [0.6247, -3.4229, -8.9179, -1.4297, -14.1650, 1.4146, -9.0218, -0.2703, -0.2703],
                   [6.4783, -1.9913, -10.7926, -2.3336, 1.5092, -0.9974, -6.8213, 1.3477, 1.3477],
               ]   )
           self.assertTrue(jnp.allclose(__lowerCamelCase,		__lowerCamelCase,		atol=4e-2   )   )

           UpperCamelCase__							:  Union[str, Any]								=     jax.jit(__lowerCamelCase   )
           UpperCamelCase__							:  List[Any]								=     model(inputs.input_ids,		attention_mask=inputs.attention_mask   )[0].mean(axis=-1   )
           self.assertTrue(jnp.allclose(__lowerCamelCase,		__lowerCamelCase,		atol=4e-2   )   )

@require_flax
@slow
class  UpperCamelCase__ ( unittest.TestCase			):






      @property
      def 	__lowercase(     self					:   Tuple   )  -> List[str]:
           return [
               "Today is a beautiful day and I want",
               "In the city of",
               "Paris is the capital of France and",
               "Computers and mobile phones have taken",
           ]






      def 	__lowercase(     self					:   Optional[Any]   )  -> Any:
           UpperCamelCase__							:  List[Any]								=     '''facebook/opt-125m'''

           UpperCamelCase__							:  int								=     [
               '''Today is a beautiful day and I want to''',
               '''In the city of New York, the city''',
               '''Paris is the capital of France and the capital''',
               '''Computers and mobile phones have taken over the''',
           ]

           UpperCamelCase__							:  Optional[Any]								=     []

           UpperCamelCase__							:  List[Any]								=     FlaxOPTForCausalLM.from_pretrained(__lowerCamelCase   )
           UpperCamelCase__							:  List[Any]								=     GPTaTokenizer.from_pretrained(__lowerCamelCase   )

           for prompt in self.prompts:
                UpperCamelCase__							:  int								=     tokenizer(__lowerCamelCase,		return_tensors='''jax'''   ).input_ids

                UpperCamelCase__							:  Optional[Any]								=     model.generate(__lowerCamelCase,		max_length=10   )
                UpperCamelCase__							:  Dict								=     generated_ids[0]

                UpperCamelCase__							:  Tuple								=     tokenizer.batch_decode(__lowerCamelCase,		skip_special_tokens=__lowerCamelCase   )
                predicted_outputs += generated_string

           self.assertListEqual(__lowerCamelCase,		__lowerCamelCase   )






      def 	__lowercase(     self					:   Dict   )  -> int:
           UpperCamelCase__							:  str								=     '''facebook/opt-350m'''

           UpperCamelCase__							:  Optional[Any]								=     [
               '''Today is a beautiful day and I want to''',
               '''In the city of San Francisco, the city''',
               '''Paris is the capital of France and the capital''',
               '''Computers and mobile phones have taken over the''',
           ]

           UpperCamelCase__							:  List[str]								=     []
           UpperCamelCase__							:  List[Any]								=     FlaxOPTForCausalLM.from_pretrained(__lowerCamelCase   )
           UpperCamelCase__							:  Any								=     GPTaTokenizer.from_pretrained(__lowerCamelCase   )

           for prompt in self.prompts:
                UpperCamelCase__							:  Dict								=     tokenizer(__lowerCamelCase,		return_tensors='''jax'''   ).input_ids

                UpperCamelCase__							:  List[Any]								=     model.generate(__lowerCamelCase,		max_length=10   )
                UpperCamelCase__							:  Union[str, Any]								=     generated_ids[0]

                UpperCamelCase__							:  List[Any]								=     tokenizer.batch_decode(__lowerCamelCase,		skip_special_tokens=__lowerCamelCase   )
                predicted_outputs += generated_string

           self.assertListEqual(__lowerCamelCase,		__lowerCamelCase   )






      def 	__lowercase(     self					:   List[Any]   )  -> Optional[Any]:
           UpperCamelCase__							:  List[Any]								=     '''facebook/opt-125m'''
           UpperCamelCase__							:  int								=     [
               '''Today is a beautiful day and I want to thank''',
               '''In the city of Rome Canaver Canaver Canaver Canaver''',
           ]
           UpperCamelCase__							:  str								=     FlaxOPTForCausalLM.from_pretrained(__lowerCamelCase   )
           UpperCamelCase__							:  Optional[Any]								=     GPTaTokenizer.from_pretrained(__lowerCamelCase   )
           UpperCamelCase__							:  Optional[Any]								=     tokenizer(
               [
                   '''Today is a beautiful day and I want to''',
                   '''In the city of''',
               ],		return_tensors='''jax''',		padding=__lowerCamelCase,		)

           UpperCamelCase__							:  Tuple								=     jax.jit(model.generate   )

           UpperCamelCase__							:  int								=     jit_generate(inputs['''input_ids'''],		attention_mask=inputs['''attention_mask''']   ).sequences

           UpperCamelCase__							:  List[Any]								=     tokenizer.batch_decode(__lowerCamelCase,		skip_special_tokens=__lowerCamelCase   )

           self.assertIsNotNone(__lowerCamelCase,		__lowerCamelCase   )






      def 	__lowercase(     self					:   Union[str, Any]   )  -> str:
           UpperCamelCase__							:  Union[str, Any]								=     '''facebook/opt-350m'''

           UpperCamelCase__							:  Optional[int]								=     GPTaTokenizer.from_pretrained(__lowerCamelCase   )
           UpperCamelCase__							:  Tuple								=     FlaxOPTForCausalLM.from_pretrained(__lowerCamelCase   )

           UpperCamelCase__							:  List[str]								=     '''left'''

           # use different length sentences to test batching
           UpperCamelCase__							:  Tuple								=     [
               '''Hello, my dog is a little''',
               '''Today, I''',
           ]

           UpperCamelCase__							:  Optional[Any]								=     tokenizer(__lowerCamelCase,		return_tensors='''jax''',		padding=__lowerCamelCase   )
           UpperCamelCase__							:  Dict								=     inputs['''input_ids''']

           UpperCamelCase__							:  Tuple								=     model.generate(input_ids=__lowerCamelCase,		attention_mask=inputs['''attention_mask'''],		trace=__lowerCamelCase   )

           UpperCamelCase__							:  str								=     tokenizer(sentences[0],		return_tensors='''jax'''   ).input_ids
           UpperCamelCase__							:  Optional[int]								=     model.generate(input_ids=__lowerCamelCase   )

           UpperCamelCase__							:  Tuple								=     inputs_non_padded.shape[-1] - inputs['''attention_mask'''][-1].sum()
           UpperCamelCase__							:  List[str]								=     tokenizer(sentences[1],		return_tensors='''jax'''   ).input_ids
           UpperCamelCase__							:  Tuple								=     model.generate(input_ids=__lowerCamelCase,		max_length=model.config.max_length - num_paddings   )

           UpperCamelCase__							:  int								=     tokenizer.batch_decode(outputs[0],		skip_special_tokens=__lowerCamelCase   )
           UpperCamelCase__							:  Optional[int]								=     tokenizer.decode(output_non_padded[0][0],		skip_special_tokens=__lowerCamelCase   )
           UpperCamelCase__							:  List[str]								=     tokenizer.decode(output_padded[0][0],		skip_special_tokens=__lowerCamelCase   )

           UpperCamelCase__							:  str								=     [
               '''Hello, my dog is a little bit of a dork.\nI\'m a little bit''',
               '''Today, I was in the middle of a conversation with a friend about the''',
           ]
           self.assertListEqual(__lowerCamelCase,		__lowerCamelCase   )
           self.assertListEqual(__lowerCamelCase,		[non_padded_sentence, padded_sentence]   )








from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


_SCREAMING_SNAKE_CASE :					Optional[Any]			=	{
    """configuration_layoutlm""": ["""LAYOUTLM_PRETRAINED_CONFIG_ARCHIVE_MAP""", """LayoutLMConfig""", """LayoutLMOnnxConfig"""],
    """tokenization_layoutlm""": ["""LayoutLMTokenizer"""],
}

try:
   if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _SCREAMING_SNAKE_CASE :					Dict			=	["""LayoutLMTokenizerFast"""]

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _SCREAMING_SNAKE_CASE :					List[str]			=	[
       """LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST""",
       """LayoutLMForMaskedLM""",
       """LayoutLMForSequenceClassification""",
       """LayoutLMForTokenClassification""",
       """LayoutLMForQuestionAnswering""",
       """LayoutLMModel""",
       """LayoutLMPreTrainedModel""",
   ]

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _SCREAMING_SNAKE_CASE :					str			=	[
       """TF_LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST""",
       """TFLayoutLMForMaskedLM""",
       """TFLayoutLMForSequenceClassification""",
       """TFLayoutLMForTokenClassification""",
       """TFLayoutLMForQuestionAnswering""",
       """TFLayoutLMMainLayer""",
       """TFLayoutLMModel""",
       """TFLayoutLMPreTrainedModel""",
   ]


if TYPE_CHECKING:
   from .configuration_layoutlm import LAYOUTLM_PRETRAINED_CONFIG_ARCHIVE_MAP, LayoutLMConfig, LayoutLMOnnxConfig
   from .tokenization_layoutlm import LayoutLMTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_layoutlm_fast import LayoutLMTokenizerFast

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_layoutlm import (
          LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST,
          LayoutLMForMaskedLM,
          LayoutLMForQuestionAnswering,
          LayoutLMForSequenceClassification,
          LayoutLMForTokenClassification,
          LayoutLMModel,
          LayoutLMPreTrainedModel,
      )
   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_layoutlm import (
          TF_LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFLayoutLMForMaskedLM,
          TFLayoutLMForQuestionAnswering,
          TFLayoutLMForSequenceClassification,
          TFLayoutLMForTokenClassification,
          TFLayoutLMMainLayer,
          TFLayoutLMModel,
          TFLayoutLMPreTrainedModel,
      )

else:
   import sys

   _SCREAMING_SNAKE_CASE :					Any			=	_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




