MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / tokenize

Function tokenize

cldm/hack.py:37–38  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

35 BOS = self.tokenizer.bos_token_id
36
37 def tokenize(t):
38 return self.tokenizer(t, truncation=False, add_special_tokens=False)["input_ids"]
39
40 def transformer_encode(t):
41 if self.clip_skip > 1:

Callers 1

_hacked_clip_forwardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected