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

Function add_code_generation_args

tests/test_inference_oneflow.py:31–116  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected