MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / build_alibi_tensor

Method build_alibi_tensor

deepspeed/inference/engine.py:237–240  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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:

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected