MCPcopy Create free account
hub / github.com/InternScience/SciReason / build_model_from_cfg

Function build_model_from_cfg

opencompass/utils/build.py:15–24  ·  view source on GitHub ↗
(model_cfg: ConfigDict)

Source from the content-addressed store, hash-verified

13
14
15def build_model_from_cfg(model_cfg: ConfigDict):
16 model_cfg = copy.deepcopy(model_cfg)
17 model_cfg.pop('run_cfg', None)
18 model_cfg.pop('max_out_len', None)
19 model_cfg.pop('batch_size', None)
20 model_cfg.pop('abbr', None)
21 model_cfg.pop('summarizer_abbr', None)
22 model_cfg.pop('pred_postprocessor', None)
23 model_cfg.pop('min_out_len', None)
24 return MODELS.build(model_cfg)

Callers 7

print_promptsFunction · 0.90
test_modelFunction · 0.90
monkey_runFunction · 0.90
__init__Method · 0.90
build_inferencerMethod · 0.90
runMethod · 0.90
runMethod · 0.90

Calls 1

buildMethod · 0.80

Tested by 1

test_modelFunction · 0.72