

def  _snake_case		(snake_case_					:     list[list[int]]  )							->		bool:
  # must be
  __UpperCAmelCase	:  int		=     [list(snake_case_  ) for row in matrix]
  if matrix and isinstance(snake_case_    ,       snake_case_  ):
    if isinstance(matrix[0]    ,       snake_case_  ):
      __UpperCAmelCase	:  Tuple		=     0
      for row in matrix:
        if prev_len == 0:
          __UpperCAmelCase	:  Dict		=     len(snake_case_  )
          __UpperCAmelCase	:  Optional[Any]		=     True
        else:
          __UpperCAmelCase	:  Union[str, Any]		=     prev_len == len(snake_case_  )
    else:
      __UpperCAmelCase	:  int		=     True
  else:
    __UpperCAmelCase	:  str		=     False

  return result





def  _snake_case		(snake_case_					:     list[list[int]]  )							->		None:
  if check_matrix(snake_case_  ) and len(snake_case_  ) > 0:
    __UpperCAmelCase	:  List[str]		=     [list(snake_case_  ) for row in a]
    __UpperCAmelCase	:  Union[str, Any]		=     len(snake_case_  )
    if isinstance(a[0]    ,       snake_case_  ):
      __UpperCAmelCase	:  Tuple		=     len(a[0]  )
    else:
      for dat in a:
        print(snake_case_  )
      return

    # horizotal printing increasing
    for i in range(0    ,       snake_case_  ):
      print(a[0][i]  )
    # vertical printing down
    for i in range(1    ,       snake_case_  ):
      print(a[i][mat_col - 1]  )
    # horizotal printing decreasing
    if mat_row > 1:
      for i in range(mat_col - 2    ,       -1    ,       -1  ):
        print(a[mat_row - 1][i]  )
        # vertical printing up
    for i in range(mat_row - 2    ,       0    ,       -1  ):
      print(a[i][0]  )
    __UpperCAmelCase	:  str		=     [row[1 : mat_col - 1] for row in a[1 : mat_row - 1]]
    if len(snake_case_  ) > 0:
      spiral_print_clockwise(snake_case_  )
    else:
      return
  else:
    print('Not a valid matrix'  )
    return





def  _snake_case		(snake_case_					:     list[list]  )							->		list[int]:
  if matrix:
    return list(matrix.pop(0  )  ) + spiral_traversal(list(zip(*snake_case_  )  )[::-1]  )
  else:
    return []


# driver code
if __name__ == "__main__":
      import doctest

      doctest.testmod()

      _SCREAMING_SNAKE_CASE							 =			[[1, 2, 3, 4], [5, 6, 7, 8], [9, 1_0, 1_1, 1_2]]
      spiral_print_clockwise(a)






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


UpperCAmelCase				 =   logging.get_logger(__name__)

UpperCAmelCase				 =   {
    """facebook/opt-125m""": """https://huggingface.co/facebook/opt-125m/blob/main/config.json""",
    """facebook/opt-350m""": """https://huggingface.co/facebook/opt-350m/blob/main/config.json""",
    """facebook/opt-1.3b""": """https://huggingface.co/facebook/opt-1.3b/blob/main/config.json""",
    """facebook/opt-2.7b""": """https://huggingface.co/facebook/opt-2.7b/blob/main/config.json""",
    """facebook/opt-6.7b""": """https://huggingface.co/facebook/opt-6.7b/blob/main/config.json""",
    """facebook/opt-13b""": """https://huggingface.co/facebook/opt-13b/blob/main/config.json""",
}






class 				_SCREAMING_SNAKE_CASE( snake_case__						):
   UpperCamelCase_					:    List[str]			      = 'opt'
   UpperCamelCase_					:    List[str]			      = ['past_key_values']
   def __init__(     self				,  lowerCAmelCase_=5_02_72				,  lowerCAmelCase_=7_68				,  lowerCAmelCase_=12				,  lowerCAmelCase_=30_72				,  lowerCAmelCase_=20_48				,  lowerCAmelCase_=True				,  lowerCAmelCase_=False				,  lowerCAmelCase_=None				,  lowerCAmelCase_=0.1				,  lowerCAmelCase_=0.0				,  lowerCAmelCase_=12				,  lowerCAmelCase_="relu"				,  lowerCAmelCase_=0.0				,  lowerCAmelCase_=0.02				,  lowerCAmelCase_=True				,  lowerCAmelCase_=1				,  lowerCAmelCase_=2				,  lowerCAmelCase_=2				,  lowerCAmelCase_=True				,  lowerCAmelCase_=True				,  **lowerCAmelCase_				,  )						->Any:
        super().__init__(
            pad_token_id=lowerCAmelCase_				,  bos_token_id=lowerCAmelCase_				,  eos_token_id=lowerCAmelCase_				,  **lowerCAmelCase_				,  )
        a	:     Dict						      =    vocab_size
        a	:     int						      =    max_position_embeddings
        a	:     List[Any]						      =    num_attention_heads
        a	:     Union[str, Any]						      =    word_embed_proj_dim if word_embed_proj_dim is not None else hidden_size
        a	:     Any						      =    ffn_dim
        a	:     Optional[int]						      =    hidden_size
        a	:     Optional[Any]						      =    num_hidden_layers
        a	:     Optional[int]						      =    dropout
        a	:     Optional[Any]						      =    attention_dropout
        a	:     Union[str, Any]						      =    activation_function
        a	:     Any						      =    init_std
        a	:     List[Any]						      =    layerdrop
        a	:     str						      =    use_cache
        a	:     Any						      =    do_layer_norm_before
        # We keep these variables at `True` for backward compatibility.
        a	:     List[Any]						      =    enable_bias
        a	:     List[str]						      =    layer_norm_elementwise_affine

        # Note that the only purpose of `_remove_final_layer_norm` is to keep backward compatibility
        # with checkpoints that have been fine-tuned before transformers v4.20.1
        # see https://github.com/facebookresearch/metaseq/pull/164
        a	:     Dict						      =    _remove_final_layer_norm