vllm.models.inkling2.nvidia.ops.conv_mix
¶
Hidden-stream short conv fused with the AttnRes mix + RMSNorm of the next sublayer, for large batches of an already reduced input (CUDA).
Functions:
-
conv_mix–short_convthe reduced bf16xintoconv_out(with the
conv_mix(x, conv_weight, cache, positions, block_table, seq_idx, slot_mapping, query_start, stream_offset, stream_width, conv_out, residual, addend, stack, last, queries, norm_weight, norm_eps, eps=1e-06, sp=None, halo=0, prefix_align=0)
¶
short_conv the reduced bf16 x into conv_out (with the
optional (residual + addend) + y update), then attn_res over
[*stack, (last +) conv_out] with each query. Returns the (Q, T, D)
bf16 mix outputs, or without norm_weight the fp32 mixes before the
RMSNorm (not with sp).
With sp, the tokens are this rank's shard of the batch, x starts
with the halo rows before it (or is (world, halo + T, D), the
partial rows every rank pushed, summed in rank order), and the mix
outputs of all shards land in the all-gather buffer of every rank
(returned once all have landed).
Every rank writes the conv-state cache rows that later steps read (see
SeqParallel) given the batch's prefix_align.
Source code in vllm/models/inkling2/nvidia/ops/conv_mix.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 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 141 142 143 144 145 146 | |