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.
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
11 12 13 14 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 | |