MCPcopy Create free account
hub / github.com/zai-org/CodeGeeX / attention_mask_func

Function attention_mask_func

codegeex/megatron/model/utils.py:41–44  ·  view source on GitHub ↗
(attention_scores, attention_mask)

Source from the content-addressed store, hash-verified

39
40
41def attention_mask_func(attention_scores, attention_mask):
42 attention_scores.masked_fill_(attention_mask, -10000.0)
43
44 return attention_scores
45
46
47def get_linear_layer(rows, columns, init_method):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected