(cls, path)
| 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 | |
| 315 | remat = nn_partitioning.remat |
nothing calls this directly
no outgoing calls
no test coverage detected