





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


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

_snake_case    :       Union[str, Any]		       =    {
    '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 							_UpperCAmelCase       (       _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   ,    lowerCAmelCase_					:						int=1_7   ,    lowerCAmelCase_					:						Any=4   ,    lowerCAmelCase_					:						List[Any]=1_2_8   ,    lowerCAmelCase_					:						Dict=4_0_9_6   ,    lowerCAmelCase_					:						Optional[Any]=True   ,    lowerCAmelCase_					:						Optional[int]=1   ,    lowerCAmelCase_					:						Union[str, Any]=1_0_2_4   ,    lowerCAmelCase_					:						Dict=3   ,    lowerCAmelCase_					:						Optional[int]=1   ,    lowerCAmelCase_					:						Any=None   ,    lowerCAmelCase_					:						Tuple="relu"   ,    lowerCAmelCase_					:						Any=0.1   ,    lowerCAmelCase_					:						Any=0.1   ,    lowerCAmelCase_					:						Any=0.1   ,    lowerCAmelCase_					:						int=1e-5   ,    lowerCAmelCase_					:						List[Any]=0.02   ,    lowerCAmelCase_					:						Optional[int]=True   ,    lowerCAmelCase_					:						List[Any]=True   ,    lowerCAmelCase_					:						Union[str, Any]=5_0_2_5_6   ,    lowerCAmelCase_					:						Any=5_0_2_5_6   ,    lowerCAmelCase_					:						List[str]=False   ,    lowerCAmelCase_					:						Dict=False   ,    **lowerCAmelCase_					:						Union[str, Any]   ,    )				->		Optional[Any]:
     __lowerCAmelCase				      =      state_dim
     __lowerCAmelCase				      =      act_dim
     __lowerCAmelCase				      =      hidden_size
     __lowerCAmelCase				      =      max_ep_len
     __lowerCAmelCase				      =      action_tanh
     __lowerCAmelCase				      =      vocab_size
     __lowerCAmelCase				      =      n_positions
     __lowerCAmelCase				      =      n_layer
     __lowerCAmelCase				      =      n_head
     __lowerCAmelCase				      =      n_inner
     __lowerCAmelCase				      =      activation_function
     __lowerCAmelCase				      =      resid_pdrop
     __lowerCAmelCase				      =      embd_pdrop
     __lowerCAmelCase				      =      attn_pdrop
     __lowerCAmelCase				      =      layer_norm_epsilon
     __lowerCAmelCase				      =      initializer_range
     __lowerCAmelCase				      =      scale_attn_weights
     __lowerCAmelCase				      =      use_cache
     __lowerCAmelCase				      =      scale_attn_by_inverse_layer_idx
     __lowerCAmelCase				      =      reorder_and_upcast_attn

     __lowerCAmelCase				      =      bos_token_id
     __lowerCAmelCase				      =      eos_token_id

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






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


a_								=       logging.get_logger(__name__)

a_								=       {
    """google/canine-s""": """https://huggingface.co/google/canine-s/resolve/main/config.json""",
    # See all CANINE models at https://huggingface.co/models?filter=canine
}



class 			__lowerCAmelCase  (						lowerCAmelCase__ ):
 lowerCAmelCase__							       =	"""canine"""




 def __init__(    self						,					__UpperCAmelCase=768						,					__UpperCAmelCase=12						,					__UpperCAmelCase=12						,					__UpperCAmelCase=3072						,					__UpperCAmelCase="gelu"						,					__UpperCAmelCase=0.1						,					__UpperCAmelCase=0.1						,					__UpperCAmelCase=16384						,					__UpperCAmelCase=16						,					__UpperCAmelCase=0.02						,					__UpperCAmelCase=1E-1_2						,					__UpperCAmelCase=0						,					__UpperCAmelCase=0Xe_000						,					__UpperCAmelCase=0Xe_001						,					__UpperCAmelCase=4						,					__UpperCAmelCase=4						,					__UpperCAmelCase=8						,					__UpperCAmelCase=16384						,					__UpperCAmelCase=128						,					**__UpperCAmelCase						,					):



    '''simple docstring'''
    super().__init__(pad_token_id=__UpperCAmelCase						,					bos_token_id=__UpperCAmelCase						,					eos_token_id=__UpperCAmelCase						,					**__UpperCAmelCase					)

    __lowerCamelCase    				=     max_position_embeddings
    __lowerCamelCase    				=     hidden_size
    __lowerCamelCase    				=     num_hidden_layers
    __lowerCamelCase    				=     num_attention_heads
    __lowerCamelCase    				=     intermediate_size
    __lowerCamelCase    				=     hidden_act
    __lowerCamelCase    				=     hidden_dropout_prob
    __lowerCamelCase    				=     attention_probs_dropout_prob
    __lowerCamelCase    				=     initializer_range
    __lowerCamelCase    				=     type_vocab_size
    __lowerCamelCase    				=     layer_norm_eps

    # Character config:
    __lowerCamelCase    				=     downsampling_rate
    __lowerCamelCase    				=     upsampling_kernel_size
    __lowerCamelCase    				=     num_hash_functions
    __lowerCamelCase    				=     num_hash_buckets
    __lowerCamelCase    				=     local_transformer_stride






