bridge.models.qwen.modeling_qwen4_exp.gated_residual_math#
Preserve Qwen4-Exp activation rounding at gated residual operation boundaries.
Module Contents#
Functions#
Keep the low-precision division store before SiLU, including under compile. |
|
Keep sigmoid and multiplication stores before the stream mean. |
Data#
API#
- bridge.models.qwen.modeling_qwen4_exp.gated_residual_math._activate_reference(down: torch.Tensor, streams: int) torch.Tensor#
- bridge.models.qwen.modeling_qwen4_exp.gated_residual_math._mix_reference(
- up: torch.Tensor,
- normalized: torch.Tensor,
- streams: int,
- bridge.models.qwen.modeling_qwen4_exp.gated_residual_math._activate_eager#
‘disable(…)’
- bridge.models.qwen.modeling_qwen4_exp.gated_residual_math._mix_eager#
‘disable(…)’
- bridge.models.qwen.modeling_qwen4_exp.gated_residual_math.activate_residual_gate(
- down: torch.Tensor,
- streams: int,
Keep the low-precision division store before SiLU, including under compile.
- bridge.models.qwen.modeling_qwen4_exp.gated_residual_math.mix_residual_streams(
- up: torch.Tensor,
- normalized: torch.Tensor,
- streams: int,
Keep sigmoid and multiplication stores before the stream mean.