



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


_lowercase						  =		logging.get_logger(__name__)

_lowercase						  =		{
    "facebook/xglm-564M": "https://huggingface.co/facebook/xglm-564M/resolve/main/config.json",
    # See all XGLM models at https://huggingface.co/models?filter=xglm
}



class     _UpperCAmelCase			(       A__     ):
     UpperCamelCase__		    =				'''xglm'''
     UpperCamelCase__		    =				['''past_key_values''']

     UpperCamelCase__		    =				{
         '''num_attention_heads''': '''attention_heads''',
         '''hidden_size''': '''d_model''',
         '''num_hidden_layers''': '''num_layers''',
     }




     def __init__(				self ,						a__=2_5_6_0_0_8 ,						a__=2_0_4_8 ,						a__=1_0_2_4 ,						a__=4_0_9_6 ,						a__=2_4 ,						a__=1_6 ,						a__="gelu" ,						a__=0.1 ,						a__=0.1 ,						a__=0.0 ,						a__=0.0 ,						a__=0.0_2 ,						a__=True ,						a__=True ,						a__=2 ,						a__=1 ,						a__=0 ,						a__=2 ,						**a__ ,						):
         A__		 =					vocab_size
         A__		 =					max_position_embeddings
         A__		 =					d_model
         A__		 =					ffn_dim
         A__		 =					num_layers
         A__		 =					attention_heads
         A__		 =					activation_function
         A__		 =					dropout
         A__		 =					attention_dropout
         A__		 =					activation_dropout
         A__		 =					layerdrop
         A__		 =					init_std
         A__		 =					scale_embedding  # scale factor will be sqrt(d_model) if True
         A__		 =					use_cache

         super().__init__(
             pad_token_id=a__ ,						bos_token_id=a__ ,						eos_token_id=a__ ,						decoder_start_token_id=a__ ,						**a__ ,						)





# Copyright 2022 The HuggingFace Team and The OpenBMB Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


_lowercase						  =		{
    "configuration_cpmant": ["CPMANT_PRETRAINED_CONFIG_ARCHIVE_MAP", "CpmAntConfig"],
    "tokenization_cpmant": ["CpmAntTokenizer"],
}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _lowercase						  =		[
       "CPMANT_PRETRAINED_MODEL_ARCHIVE_LIST",
       "CpmAntForCausalLM",
       "CpmAntModel",
       "CpmAntPreTrainedModel",
   ]


if TYPE_CHECKING:
   from .configuration_cpmant import CPMANT_PRETRAINED_CONFIG_ARCHIVE_MAP, CpmAntConfig
   from .tokenization_cpmant import CpmAntTokenizer

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_cpmant import (
          CPMANT_PRETRAINED_MODEL_ARCHIVE_LIST,
          CpmAntForCausalLM,
          CpmAntModel,
          CpmAntPreTrainedModel,
      )


else:
   import sys

   _lowercase						  =		_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
