






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


lowerCamelCase					    =	logging.get_logger(__name__)

lowerCamelCase					    =	{
    '''openbmb/cpm-ant-10b''': '''https://huggingface.co/openbmb/cpm-ant-10b/blob/main/config.json'''
    # See all CPMAnt models at https://huggingface.co/models?filter=cpmant
}

class        snake_case_				(							lowercase_   ):







   """simple docstring"""



   __lowerCAmelCase  =    """cpmant"""

   def __init__(     self:						Tuple ,							snake_case__:						int = 30_720 ,							snake_case__:						int = 4_096 ,							snake_case__:						int = 32 ,							snake_case__:						int = 128 ,							snake_case__:						int = 10_240 ,							snake_case__:						int = 48 ,							snake_case__:						int = 0.0 ,							snake_case__:						int = 512 ,							snake_case__:						int = 2_048 ,							snake_case__:						int = 1E-6 ,							snake_case__:						float = 1.0 ,							snake_case__:						int = 32 ,							snake_case__:						int = 32 ,							snake_case__:						int = 32 ,							snake_case__:						bool = True ,							**snake_case__:						Dict ,							)	->		Union[str, Any]:


       """simple docstring"""



       super().__init__(**snake_case__						)
       _lowercase     			=						prompt_types
       _lowercase     			=						prompt_length
       _lowercase     			=						segment_types
       _lowercase     			=						hidden_size
       _lowercase     			=						num_attention_heads
       _lowercase     			=						dim_head
       _lowercase     			=						dim_ff
       _lowercase     			=						num_hidden_layers
       _lowercase     			=						position_bias_num_buckets
       _lowercase     			=						position_bias_max_distance
       _lowercase     			=						dropout_p
       _lowercase     			=						eps
       _lowercase     			=						use_cache
       _lowercase     			=						vocab_size
       _lowercase     			=						init_std








import json

import requests

from .fetch_github_info import AUTHENTICATED_USER_ENDPOINT, fetch_github_info
def 							UpperCAmelCase   ( _lowercase   ):


    '''simple docstring'''



    class        snake_case_				:







       """simple docstring"""



       def __init__(     self:						Tuple ,							snake_case__:						Optional[int]						)	->		None:


           """simple docstring"""



           assert isinstance(snake_case__ ,							(bytes, str)						)
           _lowercase     			=						content

       def       SCREAMING_SNAKE_CASE__					(     self:						Tuple						)	->		str:


           """simple docstring"""



           return json.loads(self.content						)

    def mock_response(*_lowercase,   **_lowercase   ):
        assert args[0] == AUTHENTICATED_USER_ENDPOINT
        assert "Authorization" in kwargs["headers"]
        assert kwargs["headers"]["Authorization"].startswith('token '   )
        assert "Accept" in kwargs["headers"]
        return FakeResponse(b'{"login":"test","id":1}'   )

    monkeypatch.setattr(_lowercase,   'get',   _lowercase   )
    _lowercase     			=						fetch_github_info('token'   )
    assert result["login"] == "test"
    assert result["id"] == 1
