(self, config: PretrainedConfig)
| 1189 | dtype=self._dtype) |
| 1190 | |
| 1191 | def check_config(self, config: PretrainedConfig): |
| 1192 | config.set_if_not_exist('has_position_embedding', False) |
| 1193 | config.set_if_not_exist('type_vocab_size', None) |
| 1194 | config.set_if_not_exist('rescale_before_lm_head', False) |
| 1195 | config.set_if_not_exist('layernorm_type', LayerNormType.LayerNorm) |
| 1196 | config.set_if_not_exist('layernorm_position', |
| 1197 | LayerNormPositionType.pre_layernorm) |
| 1198 | config.set_if_not_exist('has_attention_qkvo_bias', False) |
| 1199 | config.set_if_not_exist('has_mlp_bias', False) |
| 1200 | config.set_if_not_exist('has_model_final_layernorm', False) |
| 1201 | config.set_if_not_exist('encoder_hidden_size', None) |
| 1202 | config.set_if_not_exist('encoder_num_heads', None) |
| 1203 | config.set_if_not_exist('encoder_num_kv_heads', None) |
| 1204 | config.set_if_not_exist('encoder_head_size', None) |
| 1205 | config.set_if_not_exist('model_type', 't5') |
| 1206 | config.set_if_not_exist('skip_cross_kv', False) |
| 1207 | config.set_if_not_exist('mlp_type', MLPType.MLP) |
| 1208 | config.set_if_not_exist('has_embedding_scale', False) |
| 1209 | config.set_if_not_exist('residual_scaling', 1.0) |
| 1210 | config.set_if_not_exist('has_lm_head_bias', False) |
| 1211 | config.set_if_not_exist('num_buckets', None) |
| 1212 | config.set_if_not_exist('max_distance', None) |
| 1213 | config.set_if_not_exist('relative_attention', False) |
| 1214 | |
| 1215 | def forward(self, |
| 1216 | decoder_input_ids: Tensor, |
no test coverage detected