def Params(cls) -> InstantiableParams:
    p = super().Params()
    p.Define('model', layers.TransformerEncoderDecoder.Params(),
             'Sequence model layer for this task.')
    p.Define(
        'return_predictions', False, 'Whether to return predictions during'
        'eval. Returning predictions is more expensive, but may be useful'
        'for debugging.')
    decoder_p = py_utils.Params()
    decoder_p.Define('seqlen', 0, 'Maximum output sequence length.')
    decoder_p.Define(
        'eos_id', 2,
        'The id of EOS token indicating the termination of decoding.')
    p.Define('decoder', decoder_p, 'Decoder params.')
    p.Define(
        'label_smoothing_prob', 0.0,
        'If > 0.0, smooth out one-hot prob by spreading this amount of'
        ' prob mass to all other tokens.')
    return p