MCPcopy
hub / github.com/facebookresearch/MetaCLIP / decode

Method decode

src/mini_clip/tokenizer.py:145–148  ·  view source on GitHub ↗
(self, tokens)

Source from the content-addressed store, hash-verified

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

Callers 8

process_dateFunction · 0.80
parseMethod · 0.80
wiki_bigramsFunction · 0.80
wiki_titleFunction · 0.80
parse_watMethod · 0.80
__init__Method · 0.80
llm_decodeFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected