src/transformers/models/deberta_v2/tokenization_deberta_v2.py/SPMTokenizer/_encode_as_pieces
class SPMTokenizer:    def _encode_as_pieces(self, text):
        text = convert_to_unicode(text)
        if self.split_by_punct:
            words = self._run_split_on_punc(text)
            pieces = [self.spm.encode(w, out_type=str) for w in words]
            return [p for w in pieces for p in w]
        else:
            return self.spm.encode(text, out_type=str)