MCPcopy Create free account
hub / github.com/allenai/molmo / encode

Method encode

olmo/tokenizer.py:43–44  ·  view source on GitHub ↗
(self, x: str)

Source from the content-addressed store, hash-verified

41 self.pad_id = -1
42
43 def encode(self, x: str):
44 return self.tokenizer.encode(x, add_special_tokens=False)
45
46 def decode(self, x: List[int], truncate_at_eos=True):
47 x = [int(t) for t in x]

Callers 5

build_tokenizerFunction · 0.80
get_special_token_idsFunction · 0.80
compute_hashFunction · 0.80
__call__Method · 0.80
compute_hashFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected