class_docstr: [`InstructBlipConfig`] is the configuration class to store the configuration of a
  [`InstructBlipForConditionalGeneration`]. It is used to instantiate a InstructBLIP model according to the specified
  arguments, defining the vision model, Q-Former model and language model configs. Instantiating a configuration with
  the defaults will yield a similar configuration to that of the InstructBLIP
  [Salesforce/instruct-blip-flan-t5](https://huggingface.co/Salesforce/instruct-blip-flan-t5) architecture.
  
  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 (`dict`, *optional*):
          Dictionary of configuration options used to initialize [`InstructBlipVisionConfig`].
      qformer_config (`dict`, *optional*):
          Dictionary of configuration options used to initialize [`InstructBlipQFormerConfig`].
      text_config (`dict`, *optional*):
          Dictionary of configuration options used to initialize any [`PretrainedConfig`].
      num_query_tokens (`int`, *optional*, defaults to 32):
          The number of query tokens passed through the Transformer.
  
      kwargs (*optional*):
          Dictionary of keyword arguments.
  
  Example:
  
  ```python
  >>> from transformers import (
  ...     InstructBlipVisionConfig,
  ...     InstructBlipQFormerConfig,
  ...     OPTConfig,
  ...     InstructBlipConfig,
  ...     InstructBlipForConditionalGeneration,
  ... )
  
  >>> # Initializing a InstructBlipConfig with Salesforce/instruct-blip-flan-t5 style configuration
  >>> configuration = InstructBlipConfig()
  
  >>> # Initializing a InstructBlipForConditionalGeneration (with random weights) from the Salesforce/instruct-blip-flan-t5 style configuration
  >>> model = InstructBlipForConditionalGeneration(configuration)
  
  >>> # Accessing the model configuration
  >>> configuration = model.config
  
  >>> # We can also initialize a InstructBlipConfig from a InstructBlipVisionConfig, InstructBlipQFormerConfig and any PretrainedConfig
  
  >>> # Initializing InstructBLIP vision, InstructBLIP Q-Former and language model configurations
  >>> vision_config = InstructBlipVisionConfig()
  >>> qformer_config = InstructBlipQFormerConfig()
  >>> text_config = OPTConfig()
  
  >>> config = InstructBlipConfig.from_text_vision_configs(vision_config, qformer_config, text_config)
  ```
class_docstr_tok: ["[","`","InstructBlipConfig","`","]","is","the","configuration","class","to","store","the","configuration","of","a","[","`","InstructBlipForConditionalGeneration","`","]",".","It","is","used","to","instantiate","a","InstructBLIP","model","according","to","the","specified","arguments",",","defining","the","vision","model",",","Q-Former","model","and","language","model","configs",".","Instantiating","a","configuration","with","the","defaults","will","yield","a","similar","configuration","to","that","of","the","InstructBLIP","[","Salesforce\/instruct-blip-flan-t5","]","(","https",":","\/\/huggingface.co\/Salesforce\/instruct-blip-flan-t5",")","architecture",".","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","(","`","dict","`",",","*","optional","*",")",":","Dictionary","of","configuration","options","used","to","initialize","[","`","InstructBlipVisionConfig","`","]",".","qformer_config","(","`","dict","`",",","*","optional","*",")",":","Dictionary","of","configuration","options","used","to","initialize","[","`","InstructBlipQFormerConfig","`","]",".","text_config","(","`","dict","`",",","*","optional","*",")",":","Dictionary","of","configuration","options","used","to","initialize","any","[","`","PretrainedConfig","`","]",".","num_query_tokens","(","`","int","`",",","*","optional","*",",","defaults","to","32",")",":","The","number","of","query","tokens","passed","through","the","Transformer",".","kwargs","(","*","optional","*",")",":","Dictionary","of","keyword","arguments",".","Example",":","``","`","python",">",">",">","from","transformers","import","(","...","InstructBlipVisionConfig",",","...","InstructBlipQFormerConfig",",","...","OPTConfig",",","...","InstructBlipConfig",",","...","InstructBlipForConditionalGeneration",",","...",")",">",">",">","#","Initializing","a","InstructBlipConfig","with","Salesforce\/instruct-blip-flan-t5","style","configuration",">",">",">","configuration","=","InstructBlipConfig","(",")",">",">",">","#","Initializing","a","InstructBlipForConditionalGeneration","(","with","random","weights",")","from","the","Salesforce\/instruct-blip-flan-t5","style","configuration",">",">",">","model","=","InstructBlipForConditionalGeneration","(","configuration",")",">",">",">","#","Accessing","the","model","configuration",">",">",">","configuration","=","model.config",">",">",">","#","We","can","also","initialize","a","InstructBlipConfig","from","a","InstructBlipVisionConfig",",","InstructBlipQFormerConfig","and","any","PretrainedConfig",">",">",">","#","Initializing","InstructBLIP","vision",",","InstructBLIP","Q-Former","and","language","model","configurations",">",">",">","vision_config","=","InstructBlipVisionConfig","(",")",">",">",">","qformer_config","=","InstructBlipQFormerConfig","(",")",">",">",">","text_config","=","OPTConfig","(",")",">",">",">","config","=","InstructBlipConfig.from_text_vision_configs","(","vision_config",",","qformer_config",",","text_config",")","``","`"]
docstr: Instantiate a [`InstructBlipConfig`] (or a derived class) from a InstructBLIP vision model, Q-Former and
  language model configurations.
  
  Returns:
      [`InstructBlipConfig`]: An instance of a configuration object
docstr_tok: ["Instantiate","a","[","`","InstructBlipConfig","`","]","(","or","a","derived","class",")","from","a","InstructBLIP","vision","model",",","Q-Former","and","language","model","configurations",".","Returns",":","[","`","InstructBlipConfig","`","]",":","An","instance","of","a","configuration","object"]
code: def from_vision_qformer_text_configs(
      cls,
      vision_config: InstructBlipVisionConfig,
      qformer_config: InstructBlipQFormerConfig,
      text_config: PretrainedConfig,
      **kwargs,
  ):
      r"""
      Instantiate a [`InstructBlipConfig`] (or a derived class) from a InstructBLIP vision model, Q-Former and
      language model configurations.
  
      Returns:
          [`InstructBlipConfig`]: An instance of a configuration object
      """
  
      return cls(
          vision_config=vision_config.to_dict(),
          qformer_config=qformer_config.to_dict(),
          text_config=text_config.to_dict(),
          **kwargs,
      )
  
file_path: transformers/src/transformers/models/instructblip/configuration_instructblip.py
imports: import os
  from typing import Union
  from ...configuration_utils import PretrainedConfig
  from ...models.auto.modeling_auto import MODEL_FOR_CAUSAL_LM_MAPPING_NAMES
  from ...utils import logging
  from ..auto import CONFIG_MAPPING
label_desc: Use image node_id 2 for calling the InstructBlipConfig obj's underlying member method code with example usage: obj.from_vision_qformer_text_configs(cls, vision_config, qformer_config, text_config) and returns: cls