(self, input_ids)
| 630 | self.fp32_residual_connection = config.fp32_residual_connection |
| 631 | |
| 632 | def forward(self, input_ids): |
| 633 | # Embeddings. |
| 634 | words_embeddings = self.word_embeddings(input_ids) |
| 635 | embeddings = words_embeddings |
| 636 | # Data format change to avoid explicit tranposes : [b s h] --> [s b h]. |
| 637 | embeddings = embeddings.transpose(0, 1).contiguous() |
| 638 | # If the input flag for fp32 residual connection is set, convert for float. |
| 639 | if self.fp32_residual_connection: |
| 640 | embeddings = embeddings.float() |
| 641 | return embeddings |
| 642 | |
| 643 | |
| 644 | class ChatGLMModel(ChatGLMPreTrainedModel): |
nothing calls this directly
no outgoing calls
no test coverage detected