def METHOD_NAME(
    self, src_tokens, src_lengths, prev_output_tokens, tgt_tokens, **kwargs
):
    # encoding
    encoder_out = self.encoder(src_tokens, src_lengths=src_lengths, **kwargs)
    # length prediction
    length_out = self.decoder.forward_length(
        normalize=False, encoder_out=encoder_out
    )
    length_tgt = self.decoder.forward_length_prediction(
        length_out, encoder_out, tgt_tokens
    )
    # decoding
    word_ins_out = self.decoder(
        normalize=False,
        prev_output_tokens=prev_output_tokens,
        encoder_out=encoder_out,
    )
    word_ins_tgt, word_ins_mask = tgt_tokens, tgt_tokens.ne(self.pad)
    # compute the log-likelihood of CRF
    crf_nll = -self.crf_layer(word_ins_out, word_ins_tgt, word_ins_mask)
    crf_nll = (crf_nll / word_ins_mask.type_as(crf_nll).sum(-1)).mean()
    return {
        "word_ins": {
            "out": word_ins_out,
            "tgt": word_ins_tgt,
            "mask": word_ins_mask,
            "ls": self.args.label_smoothing,
            "nll_loss": True,
            "factor": self.args.word_ins_loss_factor,
        },
        "word_crf": {"loss": crf_nll},
        "length": {
            "out": length_out,
            "tgt": length_tgt,
            "factor": self.decoder.length_loss_factor,
        },
    }