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

Method load_config

lwm/llama.py:301–312  ·  view source on GitHub ↗
(cls, path)

Source from the content-addressed store, hash-verified

299
300 @classmethod
301 def load_config(cls, path):
302 if path in LLAMA_STANDARD_CONFIGS:
303 return cls.from_dict(LLAMA_STANDARD_CONFIGS[path])
304 load_type, load_path = path.split('::', 1)
305 if load_type == 'pickle':
306 return cls.from_dict(load_pickle(load_path)['llama_config'])
307 elif load_type == 'json':
308 with open_file(load_path, 'r') as fin:
309 raw_config = fin.read()
310 return cls.from_dict(json.loads(raw_config))
311 else:
312 raise ValueError(f'Unsupported load config type: {load_type}')
313
314
315remat = nn_partitioning.remat

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected