(self, input_ids)
| 977 | self.fp32_residual_connection = config.fp32_residual_connection |
| 978 | |
| 979 | def forward(self, input_ids): |
| 980 | # Embeddings. |
| 981 | words_embeddings = self.word_embeddings(input_ids) |
| 982 | embeddings = words_embeddings |
| 983 | # Data format change to avoid explicit transposes : [b s h] --> [s b h]. |
| 984 | embeddings = embeddings.transpose(0, 1).contiguous() |
| 985 | # If the input flag for fp32 residual connection is set, convert for float. |
| 986 | if self.fp32_residual_connection: |
| 987 | embeddings = embeddings.float() |
| 988 | return embeddings |
| 989 | |
| 990 | |
| 991 | class ChatGLMModel(ChatGLMPreTrainedModel): |
nothing calls this directly
no outgoing calls
no test coverage detected