MCPcopy
hub / github.com/deepspeedai/DeepSpeedExamples / setup_model

Function setup_model

Megatron-LM/evaluate_gpt2.py:78–87  ·  view source on GitHub ↗

Setup model and optimizer.

(args)

Source from the content-addressed store, hash-verified

76
77
78def setup_model(args):
79 """Setup model and optimizer."""
80
81 model = get_model(args)
82
83 if args.load is not None:
84 _ = load_checkpoint(
85 model, None, None, args)
86
87 return model
88
89def get_masks_and_position_ids(data,
90 eod_token,

Callers 1

mainFunction · 0.70

Calls 2

load_checkpointFunction · 0.90
get_modelFunction · 0.70

Tested by

no test coverage detected