MCPcopy Create free account
hub / github.com/LargeWorldModel/LWM / __init__

Method __init__

lwm/data.py:144–151  ·  view source on GitHub ↗
(self, config, tokenizer)

Source from the content-addressed store, hash-verified

142 return config
143
144 def __init__(self, config, tokenizer):
145 self.config = self.get_default_config(config)
146 assert self.config.fields_from_example != '', (
147 'fields_from_example must be specified.'
148 )
149 self.tokenizer = tokenizer
150 self.vision_start = tokenizer.encode('<vision>')
151 self.vision_end = tokenizer.encode('</vision>')
152
153 def __call__(self, example, has_aux=False, add_bos_token=True, add_eos_token=True):
154 if has_aux:

Callers

nothing calls this directly

Calls 2

get_default_configMethod · 0.95
encodeMethod · 0.45

Tested by

no test coverage detected