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

Method __init__

codegeex/mindspore/src/pangu_alpha.py:112–142  ·  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

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

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected