docstr: Instantiate a [`EncoderDecoderConfig`] (or a derived class) from a pre-trained encoder model configuration and
  decoder model configuration.
  
  Returns:
      [`EncoderDecoderConfig`]: An instance of a configuration object
docstr_tok: ["Instantiate","a","[","`","EncoderDecoderConfig","`","]","(","or","a","derived","class",")","from","a","pre-trained","encoder","model","configuration","and","decoder","model","configuration",".","Returns",":","[","`","EncoderDecoderConfig","`","]",":","An","instance","of","a","configuration","object"]
code: def from_question_encoder_generator_configs(
      cls,
      question_encoder_config: PretrainedConfig,
      generator_config: PretrainedConfig,
      **kwargs,
  ) -> PretrainedConfig:
      r"""
      Instantiate a [`EncoderDecoderConfig`] (or a derived class) from a pre-trained encoder model configuration and
      decoder model configuration.
  
      Returns:
          [`EncoderDecoderConfig`]: An instance of a configuration object
      """
      return cls(
          question_encoder=question_encoder_config.to_dict(),
          generator=generator_config.to_dict(),
          **kwargs,
      )
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/rag/configuration_rag.py
imports: import copy
  from ...configuration_utils import PretrainedConfig
  from ...utils import add_start_docstrings
label_desc: Use image node_id 2 for calling the RagConfig obj's underlying member method code with example usage: obj.from_question_encoder_generator_configs(cls, question_encoder_config, generator_config) and returns: cls