def base_lm(hparams):
  """Adds base hparams for LM."""

  # Language model.
  hparams.add_hparam("lm_type", "left2right")
  hparams.add_hparam("lm_num_layers", 2)
  hparams.add_hparam("lm_num_residual_layers", 1)

  # Language model training and loss.
  hparams.add_hparam("lm_do_train", False)
  hparams.add_hparam("lm_loss_coeff", 0.001)
  hparams.add_hparam("lm_loss_enable_step", 400000)

  return hparams