vllm.models.deepseek_v41.amd.mhc
¶
Overlap the DSV4.1 mHC gate projection with the next sublayer on ROCm.
Classes:
-
MHCOverlapStream–The global aux stream with the fork and join events of the overlap.
Functions:
-
mhc_pre_delayed_overlap–pre_delayedwith the gate projection moved ontooverlap.stream.
MHCOverlapStream
¶
The global aux stream with the fork and join events of the overlap.
Every fork and join waits on its event before the next records it, so all layers share the two events.
Source code in vllm/models/deepseek_v41/amd/mhc.py
mhc_pre_delayed_overlap(pre_delayed, residual, fn, hc_scale, hc_base, rms_eps, hc_pre_eps, hc_sinkhorn_eps, hc_post_mult_value, sinkhorn_repeat, pre_mix=None, x=None, norm_weight=None, norm_eps=1e-06, sublayer_out=None, post_layer_mix=None, comb_res_mix=None, *, overlap)
¶
pre_delayed with the gate projection moved onto overlap.stream.
Returns residual, post_mix, comb_mix, layer_input, next_pre_mix. Only the
residual and layer input are ready on the caller stream; call
overlap.join() before using the gates. Seams without a post block, a
carried pre-mix or a fused norm run pre_delayed on the caller stream.
Source code in vllm/models/deepseek_v41/amd/mhc.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |