MCPcopy Index your code
hub / github.com/SooLab/CGFormer / decode

Method decode

utils/simple_tokenizer.py:129–132  ·  view source on GitHub ↗
(self, tokens)

Source from the content-addressed store, hash-verified

127 return bpe_tokens
128
129 def decode(self, tokens):
130 text = ''.join([self.decoder[token] for token in tokens])
131 text = bytearray([self.byte_decoder[c] for c in text]).decode('utf-8', errors="replace").replace('</w>', ' ')
132 return text

Callers 3

showRefMethod · 0.45
getMaskMethod · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected