


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


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

A			:						str        =  {
    'edbeeching/decision-transformer-gym-hopper-medium': (
        'https://huggingface.co/edbeeching/decision-transformer-gym-hopper-medium/resolve/main/config.json'
    ),
    # See all DecisionTransformer models at https://huggingface.co/models?filter=decision_transformer
}



class 				A       (			UpperCAmelCase__				):
					'''simple docstring'''






					A__     =					'''decision_transformer'''
					A__     =					['''past_key_values''']
					A__     =					{
					    '''max_position_embeddings''': '''n_positions''',
					    '''num_attention_heads''': '''n_head''',
					    '''num_hidden_layers''': '''n_layer''',
					}

					def __init__(self       :		Any ,   _UpperCAmelCase       :		Optional[int]=17 ,   _UpperCAmelCase       :		int=4 ,   _UpperCAmelCase       :		str=128 ,   _UpperCAmelCase       :		Union[str, Any]=4096 ,   _UpperCAmelCase       :		int=True ,   _UpperCAmelCase       :		Optional[int]=1 ,   _UpperCAmelCase       :		Union[str, Any]=1024 ,   _UpperCAmelCase       :		Optional[int]=3 ,   _UpperCAmelCase       :		Optional[int]=1 ,   _UpperCAmelCase       :		List[Any]=None ,   _UpperCAmelCase       :		str="relu" ,   _UpperCAmelCase       :		str=0.1 ,   _UpperCAmelCase       :		str=0.1 ,   _UpperCAmelCase       :		Union[str, Any]=0.1 ,   _UpperCAmelCase       :		Union[str, Any]=1E-5 ,   _UpperCAmelCase       :		Optional[Any]=0.02 ,   _UpperCAmelCase       :		Dict=True ,   _UpperCAmelCase       :		Optional[Any]=True ,   _UpperCAmelCase       :		int=5_0256 ,   _UpperCAmelCase       :		str=5_0256 ,   _UpperCAmelCase       :		Optional[int]=False ,   _UpperCAmelCase       :		Any=False ,   **_UpperCAmelCase       :		Optional[int] ,   )		->  Any:




							"""simple docstring"""


							lowercase__	     =						state_dim
							lowercase__	     =						act_dim
							lowercase__	     =						hidden_size
							lowercase__	     =						max_ep_len
							lowercase__	     =						action_tanh
							lowercase__	     =						vocab_size
							lowercase__	     =						n_positions
							lowercase__	     =						n_layer
							lowercase__	     =						n_head
							lowercase__	     =						n_inner
							lowercase__	     =						activation_function
							lowercase__	     =						resid_pdrop
							lowercase__	     =						embd_pdrop
							lowercase__	     =						attn_pdrop
							lowercase__	     =						layer_norm_epsilon
							lowercase__	     =						initializer_range
							lowercase__	     =						scale_attn_weights
							lowercase__	     =						use_cache
							lowercase__	     =						scale_attn_by_inverse_layer_idx
							lowercase__	     =						reorder_and_upcast_attn

							lowercase__	     =						bos_token_id
							lowercase__	     =						eos_token_id

							super().__init__(bos_token_id=_UpperCAmelCase ,   eos_token_id=_UpperCAmelCase ,   **_UpperCAmelCase						)





from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


A			:						List[str]        =  logging.get_logger(__name__)

A			:						Tuple        =  {
    'kssteven/ibert-roberta-base': 'https://huggingface.co/kssteven/ibert-roberta-base/resolve/main/config.json',
    'kssteven/ibert-roberta-large': 'https://huggingface.co/kssteven/ibert-roberta-large/resolve/main/config.json',
    'kssteven/ibert-roberta-large-mnli': (
        'https://huggingface.co/kssteven/ibert-roberta-large-mnli/resolve/main/config.json'
    ),
}



class 				A       (			UpperCAmelCase__				):
					'''simple docstring'''






					A__     =					'''ibert'''

					def __init__(self       :		int ,   _UpperCAmelCase       :		Union[str, Any]=3_0522 ,   _UpperCAmelCase       :		Any=768 ,   _UpperCAmelCase       :		Optional[Any]=12 ,   _UpperCAmelCase       :		Union[str, Any]=12 ,   _UpperCAmelCase       :		List[Any]=3072 ,   _UpperCAmelCase       :		List[Any]="gelu" ,   _UpperCAmelCase       :		List[str]=0.1 ,   _UpperCAmelCase       :		Union[str, Any]=0.1 ,   _UpperCAmelCase       :		Optional[int]=512 ,   _UpperCAmelCase       :		str=2 ,   _UpperCAmelCase       :		Union[str, Any]=0.02 ,   _UpperCAmelCase       :		Dict=1E-1_2 ,   _UpperCAmelCase       :		int=1 ,   _UpperCAmelCase       :		str=0 ,   _UpperCAmelCase       :		Tuple=2 ,   _UpperCAmelCase       :		int="absolute" ,   _UpperCAmelCase       :		Any=False ,   _UpperCAmelCase       :		List[Any]="none" ,   **_UpperCAmelCase       :		List[Any] ,   )		->  Any:




							"""simple docstring"""


							super().__init__(pad_token_id=_UpperCAmelCase ,   bos_token_id=_UpperCAmelCase ,   eos_token_id=_UpperCAmelCase ,   **_UpperCAmelCase						)

							lowercase__	     =						vocab_size
							lowercase__	     =						hidden_size
							lowercase__	     =						num_hidden_layers
							lowercase__	     =						num_attention_heads
							lowercase__	     =						hidden_act
							lowercase__	     =						intermediate_size
							lowercase__	     =						hidden_dropout_prob
							lowercase__	     =						attention_probs_dropout_prob
							lowercase__	     =						max_position_embeddings
							lowercase__	     =						type_vocab_size
							lowercase__	     =						initializer_range
							lowercase__	     =						layer_norm_eps
							lowercase__	     =						position_embedding_type
							lowercase__	     =						quant_mode
							lowercase__	     =						force_dequant






class 				A       (			UpperCAmelCase__				):
					'''simple docstring'''






					@property
					def     lowerCamelCase__	(self       :		Dict						)		->  Mapping[str, Mapping[int, str]]:




							"""simple docstring"""


							if self.task == "multiple-choice":
									lowercase__	     =						{0: """batch""", 1: """choice""", 2: """sequence"""}
							else:
									lowercase__	     =						{0: """batch""", 1: """sequence"""}
							return OrderedDict(
							    [
							        ("""input_ids""", dynamic_axis),
							        ("""attention_mask""", dynamic_axis),
							    ]						)

