def METHOD_NAME(
    self, input_ids, token_type_ids=None, position_ids=None, attention_mask=None, with_pooler=True
):
    # Note: cls_embedding is poolerd embedding with act tanh
    sequence_output, cls_embedding = self.ptm(input_ids, token_type_ids, position_ids, attention_mask)
    if with_pooler is False:
        cls_embedding = sequence_output[:, 0, :]
    if self.output_emb_size > 0:
        cls_embedding = self.emb_reduce_linear(cls_embedding)
    cls_embedding = self.dropout(cls_embedding)
    cls_embedding = F.normalize(cls_embedding, p=2, axis=-1)
    return cls_embedding