def transformer_tpu_bf16_activation():
  """HParams for Transformer model with BF16 activation on TPU."""
  hparams = transformer_tpu()
  hparams.activation_dtype = "bfloat16"
  return hparams
HParams for Transformer model with BF16 activation on TPU.
tensor2tensor/models/transformer.py