




"""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_        =       {
    'Salesforce/blip-vqa-base': 'https://huggingface.co/Salesforce/blip-vqa-base/resolve/main/config.json',
    'Salesforce/blip-vqa-capfit-large': (
        'https://huggingface.co/Salesforce/blip-vqa-base-capfit/resolve/main/config.json'
    ),
    'Salesforce/blip-image-captioning-base': (
        'https://huggingface.co/Salesforce/blip-image-captioning-base/resolve/main/config.json'
    ),
    'Salesforce/blip-image-captioning-large': (
        'https://huggingface.co/Salesforce/blip-image-captioning-large/resolve/main/config.json'
    ),
    'Salesforce/blip-itm-base-coco': 'https://huggingface.co/Salesforce/blip-itm-base-coco/resolve/main/config.json',
    'Salesforce/blip-itm-large-coco': 'https://huggingface.co/Salesforce/blip-itm-large-coco/resolve/main/config.json',
    'Salesforce/blip-itm-base-flikr': 'https://huggingface.co/Salesforce/blip-itm-base-flikr/resolve/main/config.json',
    'Salesforce/blip-itm-large-flikr': (
        'https://huggingface.co/Salesforce/blip-itm-large-flikr/resolve/main/config.json'
    ),
}

class   UpperCAmelCase_    (			snake_case		):
		UpperCamelCase							="blip_text_model"
		def __init__(						self				,						UpperCamelCase_=3_05_24				,						UpperCamelCase_=7_68				,						UpperCamelCase_=7_68				,						UpperCamelCase_=30_72				,						UpperCamelCase_=7_68				,						UpperCamelCase_=12				,						UpperCamelCase_=8				,						UpperCamelCase_=5_12				,						UpperCamelCase_="gelu"				,						UpperCamelCase_=1E-12				,						UpperCamelCase_=0.0				,						UpperCamelCase_=0.0				,						UpperCamelCase_=0.0_2				,						UpperCamelCase_=3_05_22				,						UpperCamelCase_=2				,						UpperCamelCase_=0				,						UpperCamelCase_=1_02				,						UpperCamelCase_=True				,						UpperCamelCase_=True				,						**UpperCamelCase_				,						)						->       Dict:
					super().__init__(
					    pad_token_id=UpperCamelCase_				,						bos_token_id=UpperCamelCase_				,						eos_token_id=UpperCamelCase_				,						sep_token_id=UpperCamelCase_				,						**UpperCamelCase_				,						)

					__lowercase			:  Dict								=       vocab_size
					__lowercase			:  Optional[Any]								=       hidden_size
					__lowercase			:  List[str]								=       encoder_hidden_size
					__lowercase			:  Optional[Any]								=       intermediate_size
					__lowercase			:  str								=       projection_dim
					__lowercase			:  List[str]								=       hidden_dropout_prob
					__lowercase			:  Tuple								=       num_hidden_layers
					__lowercase			:  Optional[int]								=       num_attention_heads
					__lowercase			:  Tuple								=       max_position_embeddings
					__lowercase			:  List[str]								=       layer_norm_eps
					__lowercase			:  List[str]								=       hidden_act
					__lowercase			:  List[Any]								=       initializer_range
					__lowercase			:  str								=       attention_probs_dropout_prob
					__lowercase			:  Union[str, Any]								=       is_decoder
					__lowercase			:  Optional[Any]								=       use_cache
		@classmethod
		def 	_lowerCamelCase							(						cls				,						UpperCamelCase_				,						**UpperCamelCase_       )						->       "PretrainedConfig":
					cls._set_token_in_kwargs(UpperCamelCase_       )

					__lowercase			,__lowercase			:  List[str]								=       cls.get_config_dict(UpperCamelCase_				,						**UpperCamelCase_       )

					# get the text config dict if we are loading from BlipConfig
					if config_dict.get('''model_type'''       ) == "blip":
								__lowercase			:  Tuple								=       config_dict['''text_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(UpperCamelCase_				,						**UpperCamelCase_       )


class   UpperCAmelCase_    (			snake_case		):
		UpperCamelCase							="blip_vision_model"
		def __init__(						self				,						UpperCamelCase_=7_68				,						UpperCamelCase_=30_72				,						UpperCamelCase_=5_12				,						UpperCamelCase_=12				,						UpperCamelCase_=12				,						UpperCamelCase_=3_84				,						UpperCamelCase_=16				,						UpperCamelCase_="gelu"				,						UpperCamelCase_=1E-5				,						UpperCamelCase_=0.0				,						UpperCamelCase_=1E-10				,						**UpperCamelCase_				,						)						->       int:
					super().__init__(**UpperCamelCase_       )

					__lowercase			:  Dict								=       hidden_size
					__lowercase			:  Tuple								=       intermediate_size
					__lowercase			:  Any								=       projection_dim
					__lowercase			:  Tuple								=       num_hidden_layers
					__lowercase			:  List[Any]								=       num_attention_heads
					__lowercase			:  Union[str, Any]								=       patch_size
					__lowercase			:  Tuple								=       image_size
					__lowercase			:  Optional[int]								=       initializer_range
					__lowercase			:  int								=       attention_dropout
					__lowercase			:  List[Any]								=       layer_norm_eps
					__lowercase			:  List[str]								=       hidden_act
		@classmethod
		def 	_lowerCamelCase							(						cls				,						UpperCamelCase_				,						**UpperCamelCase_       )						->       "PretrainedConfig":
					cls._set_token_in_kwargs(UpperCamelCase_       )

					__lowercase			,__lowercase			:  Optional[Any]								=       cls.get_config_dict(UpperCamelCase_				,						**UpperCamelCase_       )

					# get the vision config dict if we are loading from BlipConfig
					if config_dict.get('''model_type'''       ) == "blip":
								__lowercase			:  List[str]								=       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(UpperCamelCase_				,						**UpperCamelCase_       )


class   UpperCAmelCase_    (			snake_case		):
		UpperCamelCase							="blip"
		UpperCamelCase							=True
		def __init__(						self				,						UpperCamelCase_=None				,						UpperCamelCase_=None				,						UpperCamelCase_=5_12				,						UpperCamelCase_=2.6_5_9_2				,						UpperCamelCase_=2_56				,						**UpperCamelCase_				,						)						->       Optional[Any]:
					super().__init__(**UpperCamelCase_       )

					if text_config is None:
								__lowercase			:  Tuple								=       {}
								logger.info('''`text_config` is `None`. Initializing the `BlipTextConfig` with default values.'''       )

					if vision_config is None:
								__lowercase			:  Optional[Any]								=       {}
								logger.info('''`vision_config` is `None`. Initializing the `BlipVisionConfig` with default values.'''       )

					__lowercase			:  Tuple								=       BlipTextConfig(**UpperCamelCase_       )
					__lowercase			:  Optional[int]								=       BlipVisionConfig(**UpperCamelCase_       )

					__lowercase			:  str								=       self.vision_config.hidden_size

					__lowercase			:  List[str]								=       projection_dim
					__lowercase			:  Optional[Any]								=       logit_scale_init_value
					__lowercase			:  Any								=       1.0
					__lowercase			:  str								=       0.0_2
					__lowercase			:  int								=       image_text_hidden_size
		@classmethod
		def 	_lowerCamelCase							(						cls				,						UpperCamelCase_				,						UpperCamelCase_				,						**UpperCamelCase_       )						->       Optional[Any]:
					return cls(text_config=text_config.to_dict()				,						vision_config=vision_config.to_dict()				,						**UpperCamelCase_       )
		def 	_lowerCamelCase							(						self       )						->       Tuple:
					__lowercase			:  str								=       copy.deepcopy(self.__dict__       )
					__lowercase			:  Union[str, Any]								=       self.text_config.to_dict()
					__lowercase			:  Tuple								=       self.vision_config.to_dict()
					__lowercase			:  List[Any]								=       self.__class__.model_type
					return output





from __future__ import annotations

import math





def      lowerCamelCase_					(							lowerCamelCase__       ):

				if 1 < number < 4:
								# 2 and 3 are primes
								return True
				elif number < 2 or number % 2 == 0 or number % 3 == 0:
								# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
								return False

				# All primes number are in format of 6k +/- 1
				for i in range(5      ,					int(math.sqrt(lowerCamelCase__       ) + 1       )      ,					6       ):
								if number % i == 0 or number % (i + 2) == 0:
												return False
				return True


__A							=[num for num in range(3, 1_0_0_0_0_1, 2) if not is_prime(num)]





def      lowerCamelCase_					(							lowerCamelCase__       ):
				if not isinstance(lowerCamelCase__      ,					lowerCamelCase__       ):
								raise ValueError("n must be an integer"       )
				if n <= 0:
								raise ValueError("n must be >= 0"       )

				lowerCamelCase_         =     []
				for num in range(len(lowerCamelCase__       )       ):
								lowerCamelCase_         =     0
								while 2 * i * i <= odd_composites[num]:
												lowerCamelCase_         =     odd_composites[num] - 2 * i * i
												if is_prime(lowerCamelCase__       ):
																break
												i += 1
								else:
												list_nums.append(odd_composites[num]       )
												if len(lowerCamelCase__       ) == n:
																return list_nums

				return []





def      lowerCamelCase_					(							):
				return compute_nums(1       )[0]


if __name__ == "__main__":
			print(F"""{solution() = }""")


