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

Method __init__

codegeex/mindspore/src/pangu_alpha_fp16_predict.py:108–138  ·  view source on GitHub ↗
(
            self,
            batch_size,
            hidden_size,
            ffn_hidden_size,
            num_heads,
            seq_length,
            attention_dropout_rate=0.1,
            hidden_dropout_rate=0.1,
            post_layernorm_residual=False,
            param_init_type=mstype.float32,
            hidden_act="fast_gelu",
            use_past=False,
            parallel_config=None,
            softmax_compute_type=mstype.float32,
    )

Source from the content-addressed store, hash-verified

106 r"""Query Layer at the final layer."""
107
108 def __init__(
109 self,
110 batch_size,
111 hidden_size,
112 ffn_hidden_size,
113 num_heads,
114 seq_length,
115 attention_dropout_rate=0.1,
116 hidden_dropout_rate=0.1,
117 post_layernorm_residual=False,
118 param_init_type=mstype.float32,
119 hidden_act="fast_gelu",
120 use_past=False,
121 parallel_config=None,
122 softmax_compute_type=mstype.float32,
123 ):
124 super(QueryLayer, self).__init__(
125 batch_size=batch_size,
126 hidden_size=hidden_size,
127 ffn_hidden_size=ffn_hidden_size,
128 num_heads=num_heads,
129 seq_length=seq_length,
130 attention_dropout_rate=attention_dropout_rate,
131 hidden_dropout_rate=hidden_dropout_rate,
132 post_layernorm_residual=post_layernorm_residual,
133 param_init_type=param_init_type,
134 hidden_act=hidden_act,
135 use_past=use_past,
136 parallel_config=parallel_config.dp_mp_config,
137 softmax_compute_type=softmax_compute_type,
138 )
139
140 def construct(
141 self,

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected