MCPcopy Index your code
hub / github.com/zai-org/CodeGeeX / add_code_generation_args

Function add_code_generation_args

tests/test_inference.py:26–115  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

24
25
26def add_code_generation_args(parser):
27 group = parser.add_argument_group(title="code generation")
28 group.add_argument(
29 "--num-layers",
30 type=int,
31 default=39,
32 )
33 group.add_argument(
34 "--hidden-size",
35 type=int,
36 default=5120,
37 )
38 group.add_argument(
39 "--num-attention-heads",
40 type=int,
41 default=40,
42 )
43 group.add_argument(
44 "--padded-vocab-size",
45 type=int,
46 default=52224,
47 )
48 group.add_argument(
49 "--max-position-embeddings",
50 type=int,
51 default=2048,
52 )
53 group.add_argument(
54 "--temperature",
55 type=float,
56 default=1.0,
57 help="Sampling temperature.",
58 )
59 group.add_argument(
60 "--greedy",
61 action="store_true",
62 default=False,
63 help="Use greedy sampling.",
64 )
65 group.add_argument(
66 "--top-p",
67 type=float,
68 default=0.0,
69 help="Top p sampling.",
70 )
71 group.add_argument(
72 "--top-k",
73 type=int,
74 default=0,
75 help="Top k sampling.",
76 )
77 group.add_argument(
78 "--out-seq-length",
79 type=int,
80 default=2048,
81 help="Size of the output generated text.",
82 )
83 group.add_argument(

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected