MCPcopy Create free account
hub / github.com/microsoft/Cream / decode

Method decode

TinyCLIP/src/open_clip/tokenizer.py:149–153  ·  view source on GitHub ↗
(self, tokens)

Source from the content-addressed store, hash-verified

147 return bpe_tokens
148
149 def decode(self, tokens):
150 text = ''.join([self.decoder[token] for token in tokens])
151 text = bytearray([self.byte_decoder[c] for c in text]).decode(
152 'utf-8', errors="replace").replace('</w>', ' ')
153 return text
154
155
156_tokenizer = SimpleTokenizer()

Callers 15

_runFunction · 0.80
collect_resultsFunction · 0.80
get_git_hashFunction · 0.80
collect_results_cpuFunction · 0.80
process_checkpointFunction · 0.80
collect_envFunction · 0.80
segm2jsonFunction · 0.80
show_resultFunction · 0.80
_segm2jsonMethod · 0.80
_poly2maskMethod · 0.80

Calls

no outgoing calls

Tested by 2

collect_resultsFunction · 0.64
collect_results_cpuFunction · 0.64