def _convert_token_to_id(self, token):
        """ Converts a token (str) in an id using the vocab. """
        if token in self.fairseq_tokens_to_ids:
            return self.fairseq_tokens_to_ids[token]
        return self.sp_model.PieceToId(token) + self.fairseq_offset
 Converts a token (str) in an id using the vocab. 
xtune/src/transformers/tokenization_xlm_roberta.py