def METHOD_NAME(model_param, filepath,
                                        input_specs) -> None:
  """Dumps post init model hparams file."""
  model = instantiate(model_param)
  # TODO(pax-dev): Add better/cleaner API to identify pmap vs. pjit models
  # (and check for dcn_mesh_shape too).
  if hasattr(model, 'ici_mesh_shape') and model.ici_mesh_shape is not None:
    input_specs = jax.tree_map(py_utils.get_global_input_shape_dtype,
                               input_specs)
  hyper_params = model.abstract_init_with_mdl_config(input_specs)
  params_inits = model.abstract_init_with_metadata(input_specs)
  with tf.io.gfile.GFile(filepath, 'w') as fout:
    hyper_params_dump = base_hyperparams.nested_struct_to_text(hyper_params)
    fout.write(hyper_params_dump)
    fout.write('\n\n')
    params_inits_text = base_hyperparams.nested_struct_to_text(params_inits)
    fout.write(params_inits_text)