MCPcopy Index your code
hub / github.com/zai-org/CodeGeeX / decode_tokens

Method decode_tokens

codegeex/mindspore/src/code_tokenizer.py:126–128  ·  view source on GitHub ↗
(self, tokens)

Source from the content-addressed store, hash-verified

124 return [self.map_token(token) for token in tokens]
125
126 def decode_tokens(self, tokens):
127 decoded = [self.string(token) for token in tokens]
128 return [int(x) for x in decoded if not x.startswith("vocab_pad_token")]
129
130
131class CodeTokenizer(object):

Callers 1

decode_codeMethod · 0.80

Calls 1

stringMethod · 0.95

Tested by

no test coverage detected