MCPcopy Create free account
hub / github.com/zai-org/CodeGeeX / get_change_ckpt_args

Function get_change_ckpt_args

codegeex/megatron/convert_ckpt_parallel.py:8–30  ·  view source on GitHub ↗

Provide extra arguments required for merging.

(parser)

Source from the content-addressed store, hash-verified

6
7
8def get_change_ckpt_args(parser):
9 """Provide extra arguments required for merging."""
10 group = parser.add_argument_group(title='Mindspore to megatron')
11 group.add_argument(
12 '--load-ckpt-path',
13 type=str,
14 required=True,
15 help='path to load ".pt" checkpoint.',
16 )
17 group.add_argument(
18 '--save-ckpt-path',
19 type=str,
20 required=True,
21 help='dir to save converted checkpoints.',
22 )
23 group.add_argument(
24 '--target-tensor-model-parallel-size',
25 type=int,
26 default=2,
27 help='target tensor model parallel size',
28 )
29
30 return parser
31
32
33def get_element_from_dict_by_path(d, path):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected