We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b504296 commit 3303f35Copy full SHA for 3303f35
modelopt/torch/export/unified_export_megatron.py
@@ -1085,7 +1085,10 @@ def _get_state_dict(self):
1085
self.rules["k_layernorm"](layer.self_attention.k_layernorm, layer_id)
1086
self.rules["linear_qkv"](layer.self_attention.linear_qkv, layer_id)
1087
self.rules["linear_proj"](layer.self_attention.linear_proj, layer_id)
1088
- if hasattr(layer.self_attention.core_attention, "softmax_offset"):
+ if (
1089
+ getattr(layer.self_attention.core_attention, "softmax_offset", None)
1090
+ is not None
1091
+ ):
1092
self.rules["softmax_offset"](
1093
layer.self_attention.core_attention.softmax_offset, layer_id
1094
)
0 commit comments