class_docstr: This is the configuration class to store the configuration of a [`IdeficsModel`]. It is used to instantiate an
  Idefics 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 Idefics-9B.
  e.g. [HuggingFaceM4/idefics-9b](https://huggingface.co/HuggingFaceM4/idefics-9b)
  Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
  documentation from [`PretrainedConfig`] for more information.
  Args:
      use_resampler (`bool`, *optional*, defaults to `False`):
          Whether or not to use the resampler
      resampler_n_latents (`int`, *optional*, defaults to ):
          Number of latent embeddings to resample ("compress") the input sequence to (usually < 128).
      resampler_depth (`int`, *optional*, defaults to 6):
          Depth of the Perceiver Resampler (Transformer w/ cross attention). Should be shallow (< 3).
      resampler_n_heads (`int`, *optional*, defaults to 16):
          Number of heads in each Transformer block (for multi-headed self-attention).
      resampler_head_dim (`int`, *optional*, defaults to 96):
          Dimensionality of each head projection in the Transformer block.
      qk_layer_norms_perceiver (`bool`, *optional*, defaults to `False`):
          Whether or not to use qk layer norms in perceiver
class_docstr_tok: ["This","is","the","configuration","class","to","store","the","configuration","of","a","[","`","IdeficsModel","`","]",".","It","is","used","to","instantiate","an","Idefics","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","Idefics-9B",".","e.g",".","[","HuggingFaceM4\/idefics-9b","]","(","https",":","\/\/huggingface.co\/HuggingFaceM4\/idefics-9b",")","Configuration","objects","inherit","from","[","`","PretrainedConfig","`","]","and","can","be","used","to","control","the","model","outputs",".","Read","the","documentation","from","[","`","PretrainedConfig","`","]","for","more","information",".","Args",":","use_resampler","(","`","bool","`",",","*","optional","*",",","defaults","to","`","False","`",")",":","Whether","or","not","to","use","the","resampler","resampler_n_latents","(","`","int","`",",","*","optional","*",",","defaults","to",")",":","Number","of","latent","embeddings","to","resample","(","``","compress","''",")","the","input","sequence","to","(","usually","<","128",")",".","resampler_depth","(","`","int","`",",","*","optional","*",",","defaults","to","6",")",":","Depth","of","the","Perceiver","Resampler","(","Transformer","w\/","cross","attention",")",".","Should","be","shallow","(","<","3",")",".","resampler_n_heads","(","`","int","`",",","*","optional","*",",","defaults","to","16",")",":","Number","of","heads","in","each","Transformer","block","(","for","multi-headed","self-attention",")",".","resampler_head_dim","(","`","int","`",",","*","optional","*",",","defaults","to","96",")",":","Dimensionality","of","each","head","projection","in","the","Transformer","block",".","qk_layer_norms_perceiver","(","`","bool","`",",","*","optional","*",",","defaults","to","`","False","`",")",":","Whether","or","not","to","use","qk","layer","norms","in","perceiver"]
code: def __init__(
      self,
      use_resampler=False,
      resampler_n_latents=64,
      resampler_depth=6,
      resampler_n_heads=16,
      resampler_head_dim=96,
      qk_layer_norms_perceiver=False,
      **kwargs,
  ):
      self.use_resampler = use_resampler
      self.resampler_n_latents = resampler_n_latents
      self.resampler_depth = resampler_depth
      self.resampler_n_heads = resampler_n_heads
      self.resampler_head_dim = resampler_head_dim
      self.qk_layer_norms_perceiver = qk_layer_norms_perceiver
  
      super().__init__(**kwargs)
  
file_path: text-generation-inference/server/text_generation_server/models/custom_modeling/idefics_config.py
imports: import copy
  from transformers import PretrainedConfig
label_desc: Use image node_id 1 to create a new IdeficsPerceiverConfig object from inherited base classes: PretrainedConfig with example: obj = IdeficsPerceiverConfig(use_resampler, resampler_n_latents, resampler_depth, resampler_n_heads, resampler_head_dim, qk_layer_norms_perceiver)