class_docstr: This is the configuration class to store the configuration of a [`XCLIPModel`]. It is used to instantiate an X-CLIP
  model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
  defaults will yield a similar configuration to that of the X-CLIP
  [microsoft/xclip-base-patch32](https://huggingface.co/microsoft/xclip-base-patch32) architecture.
  
  Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
  documentation from [`PretrainedConfig`] for more information.
  
  
  Args:
      hidden_size (`int`, *optional*, defaults to 768):
          Dimensionality of the encoder layers and the pooler layer.
      intermediate_size (`int`, *optional*, defaults to 3072):
          Dimensionality of the "intermediate" (i.e., feed-forward) layer in the Transformer encoder.
      num_hidden_layers (`int`, *optional*, defaults to 12):
          Number of hidden layers in the Transformer encoder.
      num_attention_heads (`int`, *optional*, defaults to 12):
          Number of attention heads for each attention layer in the Transformer encoder.
      mit_hidden_size (`int`, *optional*, defaults to 512):
          Dimensionality of the encoder layers of the Multiframe Integration Transformer (MIT).
      mit_intermediate_size (`int`, *optional*, defaults to 2048):
          Dimensionality of the "intermediate" (i.e., feed-forward) layer in the Multiframe Integration Transformer
          (MIT).
      mit_num_hidden_layers (`int`, *optional*, defaults to 1):
          Number of hidden layers in the Multiframe Integration Transformer (MIT).
      mit_num_attention_heads (`int`, *optional*, defaults to 8):
          Number of attention heads for each attention layer in the Multiframe Integration Transformer (MIT).
      image_size (`int`, *optional*, defaults to 224):
          The size (resolution) of each image.
      patch_size (`int`, *optional*, defaults to 32):
          The size (resolution) of each patch.
      hidden_act (`str` or `function`, *optional*, defaults to `"quick_gelu"`):
          The non-linear activation function (function or string) in the encoder and pooler. If string, `"gelu"`,
          `"relu"`, `"selu"`, `"gelu_new"` and ``"quick_gelu"` are supported.
      layer_norm_eps (`float`, *optional*, defaults to 1e-5):
          The epsilon used by the layer normalization layers.
      attention_dropout (`float`, *optional*, defaults to 0.0):
          The dropout ratio for the attention probabilities.
      initializer_range (`float`, *optional*, defaults to 0.02):
          The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
      initializer_factor (`float`, *optional*, defaults to 1):
          A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
          testing).
      drop_path_rate (`float`, *optional*, defaults to 0.0):
          Stochastic depth rate.
  
  Example:
  
  ```python
  >>> from transformers import XCLIPVisionModel, XCLIPVisionConfig
  
  >>> # Initializing a XCLIPVisionModel with microsoft/xclip-base-patch32 style configuration
  >>> configuration = XCLIPVisionConfig()
  
  >>> # Initializing a XCLIPVisionModel model from the microsoft/xclip-base-patch32 style configuration
  >>> model = XCLIPVisionModel(configuration)
  
  >>> # Accessing the model configuration
  >>> configuration = model.config
  ```
class_docstr_tok: ["This","is","the","configuration","class","to","store","the","configuration","of","a","[","`","XCLIPModel","`","]",".","It","is","used","to","instantiate","an","X-CLIP","model","according","to","the","specified","arguments",",","defining","the","model","architecture",".","Instantiating","a","configuration","with","the","defaults","will","yield","a","similar","configuration","to","that","of","the","X-CLIP","[","microsoft\/xclip-base-patch32","]","(","https",":","\/\/huggingface.co\/microsoft\/xclip-base-patch32",")","architecture",".","Configuration","objects","inherit","from","[","`","PretrainedConfig","`","]","and","can","be","used","to","control","the","model","outputs",".","Read","the","documentation","from","[","`","PretrainedConfig","`","]","for","more","information",".","Args",":","hidden_size","(","`","int","`",",","*","optional","*",",","defaults","to","768",")",":","Dimensionality","of","the","encoder","layers","and","the","pooler","layer",".","intermediate_size","(","`","int","`",",","*","optional","*",",","defaults","to","3072",")",":","Dimensionality","of","the","``","intermediate","''","(","i.e.",",","feed-forward",")","layer","in","the","Transformer","encoder",".","num_hidden_layers","(","`","int","`",",","*","optional","*",",","defaults","to","12",")",":","Number","of","hidden","layers","in","the","Transformer","encoder",".","num_attention_heads","(","`","int","`",",","*","optional","*",",","defaults","to","12",")",":","Number","of","attention","heads","for","each","attention","layer","in","the","Transformer","encoder",".","mit_hidden_size","(","`","int","`",",","*","optional","*",",","defaults","to","512",")",":","Dimensionality","of","the","encoder","layers","of","the","Multiframe","Integration","Transformer","(","MIT",")",".","mit_intermediate_size","(","`","int","`",",","*","optional","*",",","defaults","to","2048",")",":","Dimensionality","of","the","``","intermediate","''","(","i.e.",",","feed-forward",")","layer","in","the","Multiframe","Integration","Transformer","(","MIT",")",".","mit_num_hidden_layers","(","`","int","`",",","*","optional","*",",","defaults","to","1",")",":","Number","of","hidden","layers","in","the","Multiframe","Integration","Transformer","(","MIT",")",".","mit_num_attention_heads","(","`","int","`",",","*","optional","*",",","defaults","to","8",")",":","Number","of","attention","heads","for","each","attention","layer","in","the","Multiframe","Integration","Transformer","(","MIT",")",".","image_size","(","`","int","`",",","*","optional","*",",","defaults","to","224",")",":","The","size","(","resolution",")","of","each","image",".","patch_size","(","`","int","`",",","*","optional","*",",","defaults","to","32",")",":","The","size","(","resolution",")","of","each","patch",".","hidden_act","(","`","str","`","or","`","function","`",",","*","optional","*",",","defaults","to","`","``","quick_gelu","''","`",")",":","The","non-linear","activation","function","(","function","or","string",")","in","the","encoder","and","pooler",".","If","string",",","`","``","gelu","''","`",",","`","``","relu","''","`",",","`","``","selu","''","`",",","`","``","gelu_new","''","`","and","``","``","quick_gelu","''","`","are","supported",".","layer_norm_eps","(","`","float","`",",","*","optional","*",",","defaults","to","1e-5",")",":","The","epsilon","used","by","the","layer","normalization","layers",".","attention_dropout","(","`","float","`",",","*","optional","*",",","defaults","to","0.0",")",":","The","dropout","ratio","for","the","attention","probabilities",".","initializer_range","(","`","float","`",",","*","optional","*",",","defaults","to","0.02",")",":","The","standard","deviation","of","the","truncated_normal_initializer","for","initializing","all","weight","matrices",".","initializer_factor","(","`","float","`",",","*","optional","*",",","defaults","to","1",")",":","A","factor","for","initializing","all","weight","matrices","(","should","be","kept","to","1",",","used","internally","for","initialization","testing",")",".","drop_path_rate","(","`","float","`",",","*","optional","*",",","defaults","to","0.0",")",":","Stochastic","depth","rate",".","Example",":","``","`","python",">",">",">","from","transformers","import","XCLIPVisionModel",",","XCLIPVisionConfig",">",">",">","#","Initializing","a","XCLIPVisionModel","with","microsoft\/xclip-base-patch32","style","configuration",">",">",">","configuration","=","XCLIPVisionConfig","(",")",">",">",">","#","Initializing","a","XCLIPVisionModel","model","from","the","microsoft\/xclip-base-patch32","style","configuration",">",">",">","model","=","XCLIPVisionModel","(","configuration",")",">",">",">","#","Accessing","the","model","configuration",">",">",">","configuration","=","model.config","``","`"]
code: def from_pretrained(
      cls,
      pretrained_model_name_or_path: Union[str, os.PathLike],
      **kwargs,
  ) -> "PretrainedConfig":
      cls._set_token_in_kwargs(kwargs)
  
      config_dict, kwargs = cls.get_config_dict(
          pretrained_model_name_or_path, **kwargs
      )
  
      # get the vision config dict if we are loading from XCLIPConfig
      if config_dict.get("model_type") == "xclip":
          config_dict = 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(config_dict, **kwargs)
  
file_path: transformers/src/transformers/models/x_clip/configuration_x_clip.py
imports: import os
  from typing import Union
  from ...configuration_utils import PretrainedConfig
  from ...utils import logging
label_desc: Use image node_id 2 for calling the XCLIPVisionConfig obj's underlying member method code with example usage: obj.from_pretrained(cls, pretrained_model_name_or_path) and returns: cls