



import functools
import operator

from ...configuration_utils import PretrainedConfig
from ...utils import logging


_snake_case		=  logging.get_logger(__name__)

_snake_case		=  {
    "facebook/wav2vec2-base-960h": "https://huggingface.co/facebook/wav2vec2-base-960h/resolve/main/config.json",
    # See all Wav2Vec2 models at https://huggingface.co/models?filter=wav2vec2
}



class   UpperCAmelCase_    (       a):
							lowerCamelCase__   			=		'wav2vec2'







							def __init__(   self,			__a=32,			__a=768,			__a=12,			__a=12,			__a=3072,			__a="gelu",			__a=0.1,			__a=0.1,			__a=0.1,			__a=0.0,			__a=0.0,			__a=0.1,			__a=0.1,			__a=0.02,			__a=1E-5,			__a="group",			__a="gelu",			__a=(512, 512, 512, 512, 512, 512, 512),			__a=(5, 2, 2, 2, 2, 2, 2),			__a=(10, 3, 3, 3, 3, 2, 2),			__a=False,			__a=128,			__a=16,			__a=False,			__a=True,			__a=0.05,			__a=10,			__a=2,			__a=0.0,			__a=10,			__a=0,			__a=320,			__a=2,			__a=0.1,			__a=100,			__a=256,			__a=256,			__a=0.1,			__a="sum",			__a=False,			__a=False,			__a=256,			__a=(512, 512, 512, 512, 1500),			__a=(5, 3, 3, 1, 1),			__a=(1, 2, 3, 1, 1),			__a=512,			__a=0,			__a=1,			__a=2,			__a=False,			__a=3,			__a=2,			__a=3,			__a=None,			__a=None,			**__a,			):

														'''simple docstring'''

														super().__init__(**__a,			pad_token_id=__a,			bos_token_id=__a,			eos_token_id=__a)
														_lowerCAmelCase     :							str    =    hidden_size
														_lowerCAmelCase     :							Optional[int]    =    feat_extract_norm
														_lowerCAmelCase     :							Union[str, Any]    =    feat_extract_activation
														_lowerCAmelCase     :							Optional[Any]    =    list(__a)
														_lowerCAmelCase     :							List[str]    =    list(__a)
														_lowerCAmelCase     :							str    =    list(__a)
														_lowerCAmelCase     :							List[str]    =    conv_bias
														_lowerCAmelCase     :							str    =    num_conv_pos_embeddings
														_lowerCAmelCase     :							List[Any]    =    num_conv_pos_embedding_groups
														_lowerCAmelCase     :							str    =    len(self.conv_dim)
														_lowerCAmelCase     :							List[str]    =    num_hidden_layers
														_lowerCAmelCase     :							str    =    intermediate_size
														_lowerCAmelCase     :							Any    =    hidden_act
														_lowerCAmelCase     :							int    =    num_attention_heads
														_lowerCAmelCase     :							Optional[Any]    =    hidden_dropout
														_lowerCAmelCase     :							List[str]    =    attention_dropout
														_lowerCAmelCase     :							Tuple    =    activation_dropout
														_lowerCAmelCase     :							int    =    feat_proj_dropout
														_lowerCAmelCase     :							List[str]    =    final_dropout
														_lowerCAmelCase     :							int    =    layerdrop
														_lowerCAmelCase     :							int    =    layer_norm_eps
														_lowerCAmelCase     :							Union[str, Any]    =    initializer_range
														_lowerCAmelCase     :							str    =    vocab_size
														_lowerCAmelCase     :							Optional[Any]    =    do_stable_layer_norm
														_lowerCAmelCase     :							Any    =    use_weighted_layer_sum

														if (
														    (len(self.conv_stride) != self.num_feat_extract_layers)
														    or (len(self.conv_kernel) != self.num_feat_extract_layers)
														    or (len(self.conv_dim) != self.num_feat_extract_layers)
														):
																					raise ValueError(
																					    "Configuration for convolutional layers is incorrect. It is required that `len(config.conv_dim)` =="
																					    " `len(config.conv_stride)` == `len(config.conv_kernel)`, but is `len(config.conv_dim) ="
																					    f" {len(self.conv_dim)}`, `len(config.conv_stride) = {len(self.conv_stride)}`,"
																					    f" `len(config.conv_kernel) = {len(self.conv_kernel)}`.")

														# fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
														_lowerCAmelCase     :							str    =    apply_spec_augment
														_lowerCAmelCase     :							Optional[Any]    =    mask_time_prob
														_lowerCAmelCase     :							Optional[int]    =    mask_time_length
														_lowerCAmelCase     :							List[str]    =    mask_time_min_masks
														_lowerCAmelCase     :							Optional[int]    =    mask_feature_prob
														_lowerCAmelCase     :							Optional[int]    =    mask_feature_length
														_lowerCAmelCase     :							List[str]    =    mask_feature_min_masks

														# parameters for pretraining with codevector quantized representations
														_lowerCAmelCase     :							Union[str, Any]    =    num_codevectors_per_group
														_lowerCAmelCase     :							str    =    num_codevector_groups
														_lowerCAmelCase     :							Optional[int]    =    contrastive_logits_temperature
														_lowerCAmelCase     :							Optional[int]    =    feat_quantizer_dropout
														_lowerCAmelCase     :							Optional[int]    =    num_negatives
														_lowerCAmelCase     :							Union[str, Any]    =    codevector_dim
														_lowerCAmelCase     :							Any    =    proj_codevector_dim
														_lowerCAmelCase     :							Optional[int]    =    diversity_loss_weight

														# ctc loss
														_lowerCAmelCase     :							Tuple    =    ctc_loss_reduction
														_lowerCAmelCase     :							Tuple    =    ctc_zero_infinity

														# adapter
														_lowerCAmelCase     :							List[Any]    =    add_adapter
														_lowerCAmelCase     :							List[str]    =    adapter_kernel_size
														_lowerCAmelCase     :							str    =    adapter_stride
														_lowerCAmelCase     :							List[str]    =    num_adapter_layers
														_lowerCAmelCase     :							str    =    output_hidden_size or hidden_size
														_lowerCAmelCase     :							Tuple    =    adapter_attn_dim

														# SequenceClassification-specific parameter. Feel free to ignore for other classes.
														_lowerCAmelCase     :							str    =    classifier_proj_size

														# XVector-specific parameters. Feel free to ignore for other classes.
														_lowerCAmelCase     :							str    =    list(__a)
														_lowerCAmelCase     :							Union[str, Any]    =    list(__a)
														_lowerCAmelCase     :							List[str]    =    list(__a)
														_lowerCAmelCase     :							Tuple    =    xvector_output_dim







							@property
							def    snake_case__      (   self):

														'''simple docstring'''

														return functools.reduce(operator.mul,			self.conv_stride,			1)





import inspect
import tempfile
from collections import OrderedDict, UserDict
from collections.abc import MutableMapping
from contextlib import ExitStack, contextmanager
from dataclasses import fields
from enum import Enum
from typing import Any, ContextManager, List, Tuple

import numpy as np

from .import_utils import is_flax_available, is_tf_available, is_torch_available, is_torch_fx_proxy


if is_flax_available():
						import jax.numpy as jnp



class   UpperCAmelCase_    (       a):







							def __get__(   self,			__a,			__a=None):

														'''simple docstring'''

														if obj is None:
																					return self
														if self.fget is None:
																					raise AttributeError("unreadable attribute")
														_lowerCAmelCase     :							List[Any]    =    "__cached_" + self.fget.__name__
														_lowerCAmelCase     :							Dict    =    getattr(__a,			__a,			__a)
														if cached is None:
																					_lowerCAmelCase     :							str    =    self.fget(__a)
																					setattr(__a,			__a,			__a)
														return cached






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							_lowerCAmelCase     :							Any    =    val.lower()
							if val in {"y", "yes", "t", "true", "on", "1"}:
														return 1
							if val in {"n", "no", "f", "false", "off", "0"}:
														return 0
							raise ValueError(F"invalid truth value {val!r}"  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							if is_torch_fx_proxy(_lowerCamelCase  ):
														return True
							if is_torch_available():
														import torch

														if isinstance(_lowerCamelCase				, torch.Tensor  ):
																					return True
							if is_tf_available():
														import tensorflow as tf

														if isinstance(_lowerCamelCase				, tf.Tensor  ):
																					return True

							if is_flax_available():
														import jax.numpy as jnp
														from jax.core import Tracer

														if isinstance(_lowerCamelCase				, (jnp.ndarray, Tracer)  ):
																					return True

							return isinstance(_lowerCamelCase				, np.ndarray  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							return isinstance(_lowerCamelCase				, np.ndarray  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							return _is_numpy(_lowerCamelCase  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							import torch

							return isinstance(_lowerCamelCase				, torch.Tensor  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							return False if not is_torch_available() else _is_torch(_lowerCamelCase  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							import torch

							return isinstance(_lowerCamelCase				, torch.device  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							return False if not is_torch_available() else _is_torch_device(_lowerCamelCase  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							import torch

							if isinstance(_lowerCamelCase				, _lowerCamelCase  ):
														if hasattr(_lowerCamelCase				, _lowerCamelCase  ):
																					_lowerCAmelCase     :							Optional[Any]    =    getattr(_lowerCamelCase				, _lowerCamelCase  )
														else:
																					return False
							return isinstance(_lowerCamelCase				, torch.dtype  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							return False if not is_torch_available() else _is_torch_dtype(_lowerCamelCase  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							import tensorflow as tf

							return isinstance(_lowerCamelCase				, tf.Tensor  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							return False if not is_tf_available() else _is_tensorflow(_lowerCamelCase  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							import tensorflow as tf

							# the `is_symbolic_tensor` predicate is only available starting with TF 2.14
							if hasattr(_lowerCamelCase				, "is_symbolic_tensor"  ):
														return tf.is_symbolic_tensor(_lowerCamelCase  )
							return type(_lowerCamelCase  ) == tf.Tensor






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							return False if not is_tf_available() else _is_tf_symbolic_tensor(_lowerCamelCase  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							import jax.numpy as jnp  # noqa: F811

							return isinstance(_lowerCamelCase				, jnp.ndarray  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							return False if not is_flax_available() else _is_jax(_lowerCamelCase  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							if isinstance(_lowerCamelCase				, (dict, UserDict)  ):
														return {k: to_py_obj(_lowerCamelCase  ) for k, v in obj.items()}
							elif isinstance(_lowerCamelCase				, (list, tuple)  ):
														return [to_py_obj(_lowerCamelCase  ) for o in obj]
							elif is_tf_tensor(_lowerCamelCase  ):
														return obj.numpy().tolist()
							elif is_torch_tensor(_lowerCamelCase  ):
														return obj.detach().cpu().tolist()
							elif is_jax_tensor(_lowerCamelCase  ):
														return np.asarray(_lowerCamelCase  ).tolist()
							elif isinstance(_lowerCamelCase				, (np.ndarray, np.number)  ):  # tolist also works on 0d np arrays
														return obj.tolist()
							else:
														return obj






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							if isinstance(_lowerCamelCase				, (dict, UserDict)  ):
														return {k: to_numpy(_lowerCamelCase  ) for k, v in obj.items()}
							elif isinstance(_lowerCamelCase				, (list, tuple)  ):
														return np.array(_lowerCamelCase  )
							elif is_tf_tensor(_lowerCamelCase  ):
														return obj.numpy()
							elif is_torch_tensor(_lowerCamelCase  ):
														return obj.detach().cpu().numpy()
							elif is_jax_tensor(_lowerCamelCase  ):
														return np.asarray(_lowerCamelCase  )
							else:
														return obj



class   UpperCAmelCase_    (       a):







							def    snake_case__      (   self):

														'''simple docstring'''

														_lowerCAmelCase     :							Tuple    =    fields(self)

														# Safety and consistency checks
														if not len(__a):
																					raise ValueError(f"{self.__class__.__name__} has no fields.")
														if not all(field.default is None for field in class_fields[1:]):
																					raise ValueError(f"{self.__class__.__name__} should not have more than one required field.")

														_lowerCAmelCase     :							Dict    =    getattr(self,			class_fields[0].name)
														_lowerCAmelCase     :							str    =    all(getattr(self,			field.name) is None for field in class_fields[1:])

														if other_fields_are_none and not is_tensor(__a):
																					if isinstance(__a,			__a):
																												_lowerCAmelCase     :							Tuple    =    first_field.items()
																												_lowerCAmelCase     :							Dict    =    True
																					else:
																												try:
																																			_lowerCAmelCase     :							Dict    =    iter(__a)
																																			_lowerCAmelCase     :							Any    =    True
																												except TypeError:
																																			_lowerCAmelCase     :							Any    =    False

            # if we provided an iterator as first field and the iterator is a (key, value) iterator
            # set the associated fields
																					if first_field_iterator:
																												for idx, element in enumerate(__a):
																																			if (
																																			    not isinstance(__a,			(list, tuple))
																																			    or not len(__a) == 2
																																			    or not isinstance(element[0],			__a)
																																			):
																																										if idx == 0:
																																																	# If we do not have an iterator of key/values, set it as attribute
																																																	_lowerCAmelCase     :							Any    =    first_field
																																										else:
																																																	# If we have a mixed iterator, raise an error
																																																	raise ValueError(
																																																	    f"Cannot set key/value for {element}. It needs to be a tuple (key, value).")
																																										break
																																			setattr(self,			element[0],			element[1])
																																			if element[1] is not None:
																																										_lowerCAmelCase     :							Any    =    element[1]
																					elif first_field is not None:
																												_lowerCAmelCase     :							Any    =    first_field
														else:
																					for field in class_fields:
																												_lowerCAmelCase     :							Dict    =    getattr(self,			field.name)
																												if v is not None:
																																			_lowerCAmelCase     :							Union[str, Any]    =    v







							def __delitem__(   self,			*__a,			**__a):

														'''simple docstring'''

														raise Exception(f"You cannot use ``__delitem__`` on a {self.__class__.__name__} instance.")







							def    snake_case__      (   self,			*__a,			**__a):

														'''simple docstring'''

														raise Exception(f"You cannot use ``setdefault`` on a {self.__class__.__name__} instance.")







							def    snake_case__      (   self,			*__a,			**__a):

														'''simple docstring'''

														raise Exception(f"You cannot use ``pop`` on a {self.__class__.__name__} instance.")







							def    snake_case__      (   self,			*__a,			**__a):

														'''simple docstring'''

														raise Exception(f"You cannot use ``update`` on a {self.__class__.__name__} instance.")







							def __getitem__(   self,			__a):

														'''simple docstring'''

														if isinstance(__a,			__a):
																					_lowerCAmelCase     :							Optional[int]    =    dict(self.items())
																					return inner_dict[k]
														else:
																					return self.to_tuple()[k]







							def __setattr__(   self,			__a,			__a):

														'''simple docstring'''

														if name in self.keys() and value is not None:
																					# Don't call self.__setitem__ to avoid recursion errors
																					super().__setitem__(__a,			__a)
														super().__setattr__(__a,			__a)







							def __setitem__(   self,			__a,			__a):

														'''simple docstring'''

														super().__setitem__(__a,			__a)
														# Don't call self.__setattr__ to avoid recursion errors
														super().__setattr__(__a,			__a)







							def    snake_case__      (   self):

														'''simple docstring'''

														return tuple(self[k] for k in self.keys())



class   UpperCAmelCase_    (       a   ,					a):







							@classmethod
							def    snake_case__      (   cls,			__a):

														'''simple docstring'''

														raise ValueError(
														    f"{value} is not a valid {cls.__name__}, please select one of {list(cls._valueamember_map_.keys())}")



class   UpperCAmelCase_    (       a):
							lowerCamelCase__   			=		'longest'
							lowerCamelCase__   			=		'max_length'
							lowerCamelCase__   			=		'do_not_pad'



class   UpperCAmelCase_    (       a):
							lowerCamelCase__   			=		'pt'
							lowerCamelCase__   			=		'tf'
							lowerCamelCase__   			=		'np'
							lowerCamelCase__   			=		'jax'



class   UpperCAmelCase_    :







							def __init__(   self,			__a):

														'''simple docstring'''

														_lowerCAmelCase     :							Tuple    =    context_managers
														_lowerCAmelCase     :							Dict    =    ExitStack()







							def __enter__(   self):

														'''simple docstring'''

														for context_manager in self.context_managers:
																					self.stack.enter_context(__a)







							def __exit__(   self,			*__a,			**__a):

														'''simple docstring'''

														self.stack.__exit__(*__a,			**__a)






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							_lowerCAmelCase     :							str    =    infer_framework(_lowerCamelCase  )
							if framework == "tf":
														_lowerCAmelCase     :							Tuple    =    inspect.signature(model_class.call  )  # TensorFlow models
							elif framework == "pt":
														_lowerCAmelCase     :							str    =    inspect.signature(model_class.forward  )  # PyTorch models
							else:
														_lowerCAmelCase     :							Tuple    =    inspect.signature(model_class.__call__  )  # Flax models

							for p in signature.parameters:
														if p == "return_loss" and signature.parameters[p].default is True:
																					return True

							return False






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							_lowerCAmelCase     :							str    =    model_class.__name__
							_lowerCAmelCase     :							Optional[Any]    =    infer_framework(_lowerCamelCase  )
							if framework == "tf":
														_lowerCAmelCase     :							Dict    =    inspect.signature(model_class.call  )  # TensorFlow models
							elif framework == "pt":
														_lowerCAmelCase     :							List[Any]    =    inspect.signature(model_class.forward  )  # PyTorch models
							else:
														_lowerCAmelCase     :							Dict    =    inspect.signature(model_class.__call__  )  # Flax models

							if "QuestionAnswering" in model_name:
														return [p for p in signature.parameters if "label" in p or p in ("start_positions", "end_positions")]
							else:
														return [p for p in signature.parameters if "label" in p]






def 				A				(					_lowerCamelCase				, _lowerCamelCase = ""				, _lowerCamelCase = "."  ):





							'''simple docstring'''




							def _flatten_dict(_lowerCamelCase				, _lowerCamelCase=""				, _lowerCamelCase="."  ):
														for k, v in d.items():
																					_lowerCAmelCase     :							Dict    =    str(_lowerCamelCase  ) + delimiter + str(_lowerCamelCase  ) if parent_key else k
																					if v and isinstance(_lowerCamelCase				, _lowerCamelCase  ):
																												yield from flatten_dict(_lowerCamelCase				, _lowerCamelCase				, delimiter=_lowerCamelCase  ).items()
																					else:
																												yield key, v

							return dict(_flatten_dict(_lowerCamelCase				, _lowerCamelCase				, _lowerCamelCase  )  )






@contextmanager
def 				A				(					_lowerCamelCase				, _lowerCamelCase = False  ):





							'''simple docstring'''




							if use_temp_dir:
														with tempfile.TemporaryDirectory() as tmp_dir:
																					yield tmp_dir
							else:
														yield working_dir






def 				A				(					_lowerCamelCase				, _lowerCamelCase=None  ):





							'''simple docstring'''




							if is_numpy_array(_lowerCamelCase  ):
														return np.transpose(_lowerCamelCase				, axes=_lowerCamelCase  )
							elif is_torch_tensor(_lowerCamelCase  ):
														return array.T if axes is None else array.permute(*_lowerCamelCase  )
							elif is_tf_tensor(_lowerCamelCase  ):
														import tensorflow as tf

														return tf.transpose(_lowerCamelCase				, perm=_lowerCamelCase  )
							elif is_jax_tensor(_lowerCamelCase  ):
														return jnp.transpose(_lowerCamelCase				, axes=_lowerCamelCase  )
							else:
														raise ValueError(F"Type not supported for transpose: {type(_lowerCamelCase  )}."  )






def 				A				(					_lowerCamelCase				, _lowerCamelCase  ):





							'''simple docstring'''




							if is_numpy_array(_lowerCamelCase  ):
														return np.reshape(_lowerCamelCase				, _lowerCamelCase  )
							elif is_torch_tensor(_lowerCamelCase  ):
														return array.reshape(*_lowerCamelCase  )
							elif is_tf_tensor(_lowerCamelCase  ):
														import tensorflow as tf

														return tf.reshape(_lowerCamelCase				, _lowerCamelCase  )
							elif is_jax_tensor(_lowerCamelCase  ):
														return jnp.reshape(_lowerCamelCase				, _lowerCamelCase  )
							else:
														raise ValueError(F"Type not supported for reshape: {type(_lowerCamelCase  )}."  )






def 				A				(					_lowerCamelCase				, _lowerCamelCase=None  ):





							'''simple docstring'''




							if is_numpy_array(_lowerCamelCase  ):
														return np.squeeze(_lowerCamelCase				, axis=_lowerCamelCase  )
							elif is_torch_tensor(_lowerCamelCase  ):
														return array.squeeze() if axis is None else array.squeeze(dim=_lowerCamelCase  )
							elif is_tf_tensor(_lowerCamelCase  ):
														import tensorflow as tf

														return tf.squeeze(_lowerCamelCase				, axis=_lowerCamelCase  )
							elif is_jax_tensor(_lowerCamelCase  ):
														return jnp.squeeze(_lowerCamelCase				, axis=_lowerCamelCase  )
							else:
														raise ValueError(F"Type not supported for squeeze: {type(_lowerCamelCase  )}."  )






def 				A				(					_lowerCamelCase				, _lowerCamelCase  ):





							'''simple docstring'''




							if is_numpy_array(_lowerCamelCase  ):
														return np.expand_dims(_lowerCamelCase				, _lowerCamelCase  )
							elif is_torch_tensor(_lowerCamelCase  ):
														return array.unsqueeze(dim=_lowerCamelCase  )
							elif is_tf_tensor(_lowerCamelCase  ):
														import tensorflow as tf

														return tf.expand_dims(_lowerCamelCase				, axis=_lowerCamelCase  )
							elif is_jax_tensor(_lowerCamelCase  ):
														return jnp.expand_dims(_lowerCamelCase				, axis=_lowerCamelCase  )
							else:
														raise ValueError(F"Type not supported for expand_dims: {type(_lowerCamelCase  )}."  )






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							if is_numpy_array(_lowerCamelCase  ):
														return np.size(_lowerCamelCase  )
							elif is_torch_tensor(_lowerCamelCase  ):
														return array.numel()
							elif is_tf_tensor(_lowerCamelCase  ):
														import tensorflow as tf

														return tf.size(_lowerCamelCase  )
							elif is_jax_tensor(_lowerCamelCase  ):
														return array.size
							else:
														raise ValueError(F"Type not supported for expand_dims: {type(_lowerCamelCase  )}."  )






def 				A				(					_lowerCamelCase				, _lowerCamelCase  ):





							'''simple docstring'''




							for key, value in auto_map.items():
														if isinstance(_lowerCamelCase				, (tuple, list)  ):
																					_lowerCAmelCase     :							List[Any]    =    [F"{repo_id}--{v}" if (v is not None and "--" not in v) else v for v in value]
														elif value is not None and "--" not in value:
																					_lowerCAmelCase     :							Tuple    =    F"{repo_id}--{value}"

							return auto_map






def 				A				(					_lowerCamelCase  ):





							'''simple docstring'''




							for base_class in inspect.getmro(_lowerCamelCase  ):
														_lowerCAmelCase     :							Tuple    =    base_class.__module__
														_lowerCAmelCase     :							int    =    base_class.__name__
														if module.startswith("tensorflow"  ) or module.startswith("keras"  ) or name == "TFPreTrainedModel":
																					return "tf"
														elif module.startswith("torch"  ) or name == "PreTrainedModel":
																					return "pt"
														elif module.startswith("flax"  ) or module.startswith("jax"  ) or name == "FlaxPreTrainedModel":
																					return "flax"
							else:
														raise TypeError(F"Could not infer framework from class {model_class}."  )
