MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / get_model_config

Function get_model_config

DeepSpeedExample/megatron/core/utils.py:51–55  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

49 return get_attr_wrapped_model(model, 'model_type')
50
51def get_model_config(model):
52 args = get_args()
53 if args.deepspeed:
54 return get_attr_wrapped_model(model.module, 'config', allow_none=False)
55 return get_attr_wrapped_model(model, 'config', allow_none=False)
56
57class GlobalMemoryBuffer:
58 """Global buffer to avoid dynamic memory allocations.

Calls 2

get_attr_wrapped_modelFunction · 0.85
get_argsFunction · 0.50

Tested by

no test coverage detected