class_docstr: This is the configuration class to store the configuration of a [`VipLlavaForConditionalGeneration`]. It is used to instantiate an
  VipLlava 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 VipLlava-9B.
  
  e.g. [ybelkada/vip-llava-7b-hf](https://huggingface.co/ybelkada/vip-llava-7b-hf)
  
  Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
  documentation from [`PretrainedConfig`] for more information.
  
  Args:
      vision_config (`VipLlavaVisionConfig`,  *optional*):
          Custom vision config or dict
      text_config (`Union[AutoConfig, dict]`, *optional*):
          The config object of the text backbone. Can be any of `LlamaConfig` or `MistralConfig`.
      ignore_index (`int`, *optional*, defaults to -100):
          The ignore index for the loss function.
      image_token_index (`int`, *optional*, defaults to 32000):
          The image token index to encode the image prompt.
      projector_hidden_act (`str`, *optional*, defaults to `"gelu"`):
          The activation function used by the multimodal projector.
      projector_layernorm_eps (`float`, *optional*, defaults to 1e-05):
          The layer norm epsilon of the projector layernorm
      vision_feature_layers (`List[int]`, *optional*, defaults to `[-2, -5, -8, -11, 6]`):
          The list of layers to select the vision features from.
      vocab_size (`int`, *optional*, defaults to 32000):
          Vocabulary size of the VipLlava model. Defines the number of different tokens that can be represented by the
          `inputs_ids` passed when calling [`~VipLlavaForConditionalGeneration`]
  
  Example:
  
  ```python
  >>> from transformers import VipLlavaForConditionalGeneration, VipLlavaConfig, CLIPVisionConfig, LlamaConfig
  
  >>> # Initializing a CLIP-vision config
  >>> vision_config = CLIPVisionConfig()
  
  >>> # Initializing a Llama config
  >>> text_config = LlamaConfig()
  
  >>> # Initializing a VipLlava vipllava-7b style configuration
  >>> configuration = VipLlavaConfig(vision_config, text_config)
  
  >>> # Initializing a model from the vipllava-7b style configuration
  >>> model = VipLlavaForConditionalGeneration(configuration)
  
  >>> # Accessing the model configuration
  >>> configuration = model.config
  ```
class_docstr_tok: ["This","is","the","configuration","class","to","store","the","configuration","of","a","[","`","VipLlavaForConditionalGeneration","`","]",".","It","is","used","to","instantiate","an","VipLlava","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","VipLlava-9B",".","e.g",".","[","ybelkada\/vip-llava-7b-hf","]","(","https",":","\/\/huggingface.co\/ybelkada\/vip-llava-7b-hf",")","Configuration","objects","inherit","from","[","`","PretrainedConfig","`","]","and","can","be","used","to","control","the","model","outputs",".","Read","the","documentation","from","[","`","PretrainedConfig","`","]","for","more","information",".","Args",":","vision_config","(","`","VipLlavaVisionConfig","`",",","*","optional","*",")",":","Custom","vision","config","or","dict","text_config","(","`","Union","[","AutoConfig",",","dict","]","`",",","*","optional","*",")",":","The","config","object","of","the","text","backbone",".","Can","be","any","of","`","LlamaConfig","`","or","`","MistralConfig","`",".","ignore_index","(","`","int","`",",","*","optional","*",",","defaults","to","-100",")",":","The","ignore","index","for","the","loss","function",".","image_token_index","(","`","int","`",",","*","optional","*",",","defaults","to","32000",")",":","The","image","token","index","to","encode","the","image","prompt",".","projector_hidden_act","(","`","str","`",",","*","optional","*",",","defaults","to","`","``","gelu","''","`",")",":","The","activation","function","used","by","the","multimodal","projector",".","projector_layernorm_eps","(","`","float","`",",","*","optional","*",",","defaults","to","1e-05",")",":","The","layer","norm","epsilon","of","the","projector","layernorm","vision_feature_layers","(","`","List","[","int","]","`",",","*","optional","*",",","defaults","to","`","[","-2",",","-5",",","-8",",","-11",",","6","]","`",")",":","The","list","of","layers","to","select","the","vision","features","from",".","vocab_size","(","`","int","`",",","*","optional","*",",","defaults","to","32000",")",":","Vocabulary","size","of","the","VipLlava","model",".","Defines","the","number","of","different","tokens","that","can","be","represented","by","the","`","inputs_ids","`","passed","when","calling","[","`","~VipLlavaForConditionalGeneration","`","]","Example",":","``","`","python",">",">",">","from","transformers","import","VipLlavaForConditionalGeneration",",","VipLlavaConfig",",","CLIPVisionConfig",",","LlamaConfig",">",">",">","#","Initializing","a","CLIP-vision","config",">",">",">","vision_config","=","CLIPVisionConfig","(",")",">",">",">","#","Initializing","a","Llama","config",">",">",">","text_config","=","LlamaConfig","(",")",">",">",">","#","Initializing","a","VipLlava","vipllava-7b","style","configuration",">",">",">","configuration","=","VipLlavaConfig","(","vision_config",",","text_config",")",">",">",">","#","Initializing","a","model","from","the","vipllava-7b","style","configuration",">",">",">","model","=","VipLlavaForConditionalGeneration","(","configuration",")",">",">",">","#","Accessing","the","model","configuration",">",">",">","configuration","=","model.config","``","`"]
code: def __init__(
      self,
      vision_config=None,
      text_config=None,
      ignore_index=-100,
      image_token_index=32000,
      projector_hidden_act="gelu",
      projector_layernorm_eps=1e-5,
      vision_feature_layers=[-2, -5, -8, -11, 6],
      vocab_size=32000,
      **kwargs,
  ):
      self.ignore_index = ignore_index
      self.image_token_index = image_token_index
      self.projector_hidden_act = projector_hidden_act
      self.projector_layernorm_eps = projector_layernorm_eps
      self.vision_feature_layers = vision_feature_layers
      self.vocab_size = vocab_size
  
      self.vision_config = vision_config
  
      if isinstance(self.vision_config, dict):
          vision_config["model_type"] = (
              vision_config["model_type"]
              if "model_type" in vision_config
              else "clip_vision_model"
          )
          self.vision_config = CONFIG_MAPPING[
              vision_config["model_type"]
          ](**vision_config)
      elif vision_config is None:
          self.vision_config = CONFIG_MAPPING["clip_vision_model"](
              intermediate_size=4096,
              hidden_size=1024,
              patch_size=14,
              image_size=336,
              num_hidden_layers=24,
              num_attention_heads=16,
              vocab_size=32000,
              projection_dim=768,
          )
      self.vocab_size = self.vocab_size
  
      self.text_config = text_config
  
      if isinstance(self.text_config, dict):
          text_config["model_type"] = (
              text_config["model_type"]
              if "model_type" in text_config
              else "llama"
          )
          self.text_config = CONFIG_MAPPING[text_config["model_type"]](
              **text_config
          )
          self.vocab_size = self.text_config.vocab_size
      elif text_config is None:
          self.text_config = CONFIG_MAPPING["llama"]()
  
      super().__init__(**kwargs)
  
imports: from ...configuration_utils import PretrainedConfig
  from ...utils import logging
  from ..auto import CONFIG_MAPPING
label_desc: Use image node_id 1 to create a new VipLlavaConfig object from inherited base classes: PretrainedConfig with example: obj = VipLlavaConfig(vision_config, text_config, ignore_index, image_token_index, projector_hidden_act, projector_layernorm_eps, vision_feature_layers, vocab_size)