code: def load_config(args, llava_config):
      nemo_config = OmegaConf.load(
          os.path.join(
              os.path.dirname(__file__), "conf/llava_config.yaml"
          )
      ).model
      nemo_config.mm_cfg.mm_mlp_adapter_type = llava_config.get(
          "mm_projector_type", "linear"
      )
      nemo_config.mm_cfg.vision_encoder.from_pretrained = (
          llava_config.get(
              "mm_vision_tower", "openai/clip-vit-large-patch14"
          )
      )
      if "336" in nemo_config.mm_cfg.vision_encoder.from_pretrained:
          nemo_config.data.image_token_len = 576
      nemo_config.encoder_seq_length = llava_config[
          "max_position_embeddings"
      ]
      nemo_config.num_layers = int(llava_config["num_hidden_layers"])
      nemo_config.hidden_size = llava_config["hidden_size"]
      nemo_config.ffn_hidden_size = llava_config["intermediate_size"]
      nemo_config.num_attention_heads = llava_config[
          "num_attention_heads"
      ]
      nemo_config.max_position_embeddings = llava_config[
          "max_position_embeddings"
      ]
      nemo_config.init_method_std = llava_config["initializer_range"]
      nemo_config.layernorm_epsilon = llava_config["rms_norm_eps"]
      if "num_key_value_heads" in llava_config:
          nemo_config.num_query_groups = llava_config[
              "num_key_value_heads"
          ]
      nemo_config.use_cpu_initialization = True
      nemo_config.activation = "fast-swiglu"
      if args.tokenizer_model is None:
          nemo_config.tokenizer.model = llava_config["tokenizer_model"]
      else:
          nemo_config.tokenizer.model = args.tokenizer_model
      if llava_config["rope_scaling"] is not None:
          if llava_config["rope_scaling"]["type"] == "linear":
              nemo_config[
                  "seq_len_interpolation_factor"
              ] = llava_config["rope_scaling"]["factor"]
          else:
              raise ValueError(
                  "Only linear rope scaling type is supported now"
              )
  
      base = 128
      while llava_config["vocab_size"] % base != 0:
          base //= 2
      nemo_config.make_vocab_size_divisible_by = base
  
      return nemo_config
  
file_path: NeMo/examples/multimodal/multimodal_llm/neva/convert_hf_llava_to_neva.py
imports: import os
  from argparse import ArgumentParser
  from collections import OrderedDict
  import torch
  from llava import LlavaLlamaForCausalLM
  from omegaconf import OmegaConf
  from pytorch_lightning.core.saving import _load_state
  from pytorch_lightning.trainer.trainer import Trainer
  from transformers import LlamaTokenizer
  from nemo.collections.multimodal.models.multimodal_llm.neva.neva_model import MegatronNevaModel
  from nemo.collections.nlp.parts.nlp_overrides import GradScaler, MegatronHalfPrecisionPlugin, NLPDDPStrategy, NLPSaveRestoreConnector, PipelineMixedPrecisionPlugin
  from nemo.utils import logging
label_desc: Use image node_id 3 for calling a global function with example usage: load_config(args, llava_config) and returns: nemo_config