
'''simple docstring'''



import copy
import os
from typing import Union

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


__A        =     logging.get_logger(__name__)

__A        =     {
    'microsoft/git-base': 'https://huggingface.co/microsoft/git-base/resolve/main/config.json',
}





class       A				(							_SCREAMING_SNAKE_CASE					):
			lowerCamelCase				:				Optional[Any]									=	"""git_vision_model"""



			def __init__(       self							,  lowerCamelCase__=768							,  lowerCamelCase__=3_072							,  lowerCamelCase__=12							,  lowerCamelCase__=12							,  lowerCamelCase__=3							,  lowerCamelCase__=224							,  lowerCamelCase__=16							,  lowerCamelCase__="quick_gelu"							,  lowerCamelCase__=1e-5							,  lowerCamelCase__=0.0							,  lowerCamelCase__=0.02							,  **lowerCamelCase__							,  )      ->		List[Any]:




									'''simple docstring'''



									super().__init__(**_lowerCAmelCase							)

									lowercase__							=							hidden_size
									lowercase__							=							intermediate_size
									lowercase__							=							num_hidden_layers
									lowercase__							=							num_attention_heads
									lowercase__							=							num_channels
									lowercase__							=							patch_size
									lowercase__							=							image_size
									lowercase__							=							initializer_range
									lowercase__							=							attention_dropout
									lowercase__							=							layer_norm_eps
									lowercase__							=							hidden_act



			@classmethod
			def A__			(       cls							,  lowerCamelCase__							,  **lowerCamelCase__							)      ->		Any:




									'''simple docstring'''



									cls._set_token_in_kwargs(_lowerCAmelCase							)

									lowercase__			,    lowercase__							=							cls.get_config_dict(_lowerCAmelCase							,  **_lowerCAmelCase							)

									# get the vision config dict if we are loading from GITConfig
									if config_dict.get("""model_type"""							) == "git":
															lowercase__							=							config_dict["""vision_config"""]

									if "model_type" in config_dict and hasattr(cls							,  """model_type"""							) and config_dict["model_type"] != cls.model_type:
															logger.warning(
															    F'''You are using a model of type {config_dict['model_type']} to instantiate a model of type '''
															    F'''{cls.model_type}. This is not supported for all configurations of models and can yield errors.'''							)

									return cls.from_dict(_lowerCAmelCase							,  **_lowerCAmelCase							)





class       A				(							_SCREAMING_SNAKE_CASE					):
			lowerCamelCase				:				int									=	"""git"""



			def __init__(       self							,  lowerCamelCase__=None							,  lowerCamelCase__=30_522							,  lowerCamelCase__=768							,  lowerCamelCase__=6							,  lowerCamelCase__=12							,  lowerCamelCase__=3_072							,  lowerCamelCase__="gelu"							,  lowerCamelCase__=0.1							,  lowerCamelCase__=0.1							,  lowerCamelCase__=1_024							,  lowerCamelCase__=0.02							,  lowerCamelCase__=1e-12							,  lowerCamelCase__=0							,  lowerCamelCase__="absolute"							,  lowerCamelCase__=True							,  lowerCamelCase__=False							,  lowerCamelCase__=101							,  lowerCamelCase__=102							,  lowerCamelCase__=None							,  **lowerCamelCase__							,  )      ->		Optional[int]:




									'''simple docstring'''



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

									if vision_config is None:
															lowercase__							=							{}
															logger.info("""vision_config is None. initializing the GitVisionConfig with default values."""							)

									lowercase__							=							GitVisionConfig(**_lowerCAmelCase							)
									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__							=							initializer_range
									lowercase__							=							layer_norm_eps
									lowercase__							=							position_embedding_type
									lowercase__							=							use_cache
									lowercase__							=							tie_word_embeddings
									lowercase__							=							num_image_with_embedding

									lowercase__							=							bos_token_id
									lowercase__							=							eos_token_id



			def A__			(       self							)      ->		List[Any]:




									'''simple docstring'''



									lowercase__							=							copy.deepcopy(self.__dict__							)
									lowercase__							=							self.vision_config.to_dict()
									lowercase__							=							self.__class__.model_type
									return output












from __future__ import annotations

from collections.abc import Generator

def    UpperCAmelCase_				( )   ->					Generator[int, None, None]:
      SCREAMING_SNAKE_CASE_      		=     {}
      SCREAMING_SNAKE_CASE_      		=     2
      while True:
            SCREAMING_SNAKE_CASE_      		=     factor_map.pop(__UpperCAmelCase     ,     __UpperCAmelCase				)
            if factor:
                  SCREAMING_SNAKE_CASE_      		=     factor + prime
                  while x in factor_map:
                        x += factor
                  SCREAMING_SNAKE_CASE_      		=     factor
            else:
                  SCREAMING_SNAKE_CASE_      		=     prime
                  yield prime
            prime += 1

def    UpperCAmelCase_				( __UpperCAmelCase		:      float = 1E10				)   ->					int:
      SCREAMING_SNAKE_CASE_      		=     sieve()

      SCREAMING_SNAKE_CASE_      		=     1
      while True:
            SCREAMING_SNAKE_CASE_      		=     next(__UpperCAmelCase				)
            if (2 * prime * n) > limit:
                  return n
            # Ignore the next prime as the reminder will be 2.
            next(__UpperCAmelCase				)
            n += 2


if __name__ == "__main__":
   print(solution())