





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


_lowerCAmelCase 				=     logging.get_logger(__name__)

_lowerCAmelCase 				=     {"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/config.json"""}

class    _UpperCAmelCase							(		__SCREAMING_SNAKE_CASE     ):
						a						       =							'openai-gpt'
						a						       =							{
						    'max_position_embeddings': 'n_positions',
						    'hidden_size': 'n_embd',
						    'num_attention_heads': 'n_head',
						    'num_hidden_layers': 'n_layer',
						}
						def __init__(		self      ,       a__=40478      ,       a__=512      ,       a__=768      ,       a__=12      ,       a__=12      ,       a__="gelu"      ,       a__=0.1      ,       a__=0.1      ,       a__=0.1      ,       a__=1E-5      ,       a__=0.02      ,       a__="cls_index"      ,       a__=True      ,       a__=None      ,       a__=True      ,       a__=0.1      ,       **a__      ,       ):
									A_     :				Dict			      =	vocab_size
									A_     :				List[Any]			      =	n_positions
									A_     :				Optional[int]			      =	n_embd
									A_     :				List[str]			      =	n_layer
									A_     :				Any			      =	n_head
									A_     :				List[str]			      =	afn
									A_     :				Dict			      =	resid_pdrop
									A_     :				List[str]			      =	embd_pdrop
									A_     :				Dict			      =	attn_pdrop
									A_     :				List[Any]			      =	layer_norm_epsilon
									A_     :				List[str]			      =	initializer_range
									A_     :				Union[str, Any]			      =	summary_type
									A_     :				Optional[int]			      =	summary_use_proj
									A_     :				List[str]			      =	summary_activation
									A_     :				int			      =	summary_first_dropout
									A_     :				str			      =	summary_proj_to_labels
									super().__init__(**_a       )













# coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# 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.

# this script dumps information about the environment

import os
import sys

import transformers


_lowerCAmelCase 				=     """3"""

print("""Python version:""", sys.version)
print("""transformers version:""", transformers.__version__)

try:
      import torch

      print("""Torch version:""", torch.__version__)
      print("""Cuda available:""", torch.cuda.is_available())
      print("""Cuda version:""", torch.version.cuda)
      print("""CuDNN version:""", torch.backends.cudnn.version())
      print("""Number of GPUs available:""", torch.cuda.device_count())
      print("""NCCL version:""", torch.cuda.nccl.version())
except ImportError:
      print("""Torch version:""", None)

try:
      import deepspeed

      print("""DeepSpeed version:""", deepspeed.__version__)
except ImportError:
      print("""DeepSpeed version:""", None)

try:
      import tensorflow as tf

      print("""TensorFlow version:""", tf.__version__)
      print("""TF GPUs available:""", bool(tf.config.list_physical_devices("""GPU""")))
      print("""Number of TF GPUs available:""", len(tf.config.list_physical_devices("""GPU""")))
except ImportError:
      print("""TensorFlow version:""", None)






