(self)
| 235 | self.module.transformer._prepare_attn_mask = lambda attention_mask, *args, **kwargs: attention_mask |
| 236 | |
| 237 | def build_alibi_tensor(self): |
| 238 | if hasattr(self.module, 'transformer'): |
| 239 | if hasattr(self.module.transformer, 'build_alibi_tensor'): |
| 240 | self.module.transformer.build_alibi_tensor = build_bloom_alibi_tensor |
| 241 | |
| 242 | def _pre_forward_hook(self, module, *inputs, **kwargs): |
| 243 | if self.use_cuda_events: |