





from __future__ import annotations






def 							_lowerCAmelCase (  _a   :					int			)	->			list[int]:
     lowerCAmelCase_					:       int    =		[True] * limit
     lowerCAmelCase_					:       Optional[Any]    =		False
     lowerCAmelCase_					:       int    =		False
     lowerCAmelCase_					:       Optional[int]    =		True

     for i in range(3					,   int(limit**0.5 + 1			)					,   2			):
          lowerCAmelCase_					:       Dict    =		i * 2
          while index < limit:
               lowerCAmelCase_					:       str    =		False
               lowerCAmelCase_					:       Dict    =		index + i

     lowerCAmelCase_					:       Dict    =		[2]

     for i in range(3					,   _a					,   2			):
          if is_prime[i]:
               primes.append(_a			)

     return primes






def 							_lowerCAmelCase (  _a   :					int = 1_00_00_00			)	->			int:
     lowerCAmelCase_					:       Dict    =		prime_sieve(_a			)
     lowerCAmelCase_					:       Any    =		0
     lowerCAmelCase_					:       List[str]    =		0

     for i in range(len(_a			)			):
          for j in range(i + length					,   len(_a			)			):
               lowerCAmelCase_					:       Optional[int]    =		sum(primes[i:j]			)
               if sol >= ceiling:
                    break

               if sol in primes:
                    lowerCAmelCase_					:       Union[str, Any]    =		j - i
                    lowerCAmelCase_					:       Any    =		sol

     return largest


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







import torch
from transformers import PreTrainedModel, XLMRobertaConfig, XLMRobertaModel





class      lowercase__    (							__A  ):
  __UpperCamelCase	     =  """M-CLIP"""







  def __init__(	self    ,						_lowercase=1_024    ,						_lowercase=768    ,						**_lowercase						):
       lowerCAmelCase_					:       Tuple    =		transformerDimSize
       lowerCAmelCase_					:       Optional[Any]    =		imageDimSize
       super().__init__(**_lowercase						)





class      lowercase__    (							__A  ):
  __UpperCamelCase	     =  MCLIPConfig







  def __init__(	self    ,						_lowercase    ,						*_lowercase    ,						**_lowercase						):
       super().__init__(_lowercase    ,						*_lowercase    ,						**_lowercase						)
       lowerCAmelCase_					:       str    =		XLMRobertaModel(_lowercase						)
       lowerCAmelCase_					:       str    =		torch.nn.Linear(
           in_features=config.transformerDimensions    ,						out_features=config.numDims						)







  def 	UpperCAmelCase__		(	self    ,						_lowercase    ,						_lowercase						):
       lowerCAmelCase_					:       Optional[int]    =		self.transformer(input_ids=_lowercase    ,						attention_mask=_lowercase						)[0]
       lowerCAmelCase_					:       Any    =		(embs * attention_mask.unsqueeze(2						)).sum(dim=1						) / attention_mask.sum(dim=1						)[:, None]
       return self.LinearTransformation(_lowercase						), embs
