vllm.models.inkling2.nvidia.ops.seq_parallel
¶
Sequence-parallel residual stream of large batches (TP > 1, CUDA).
Each rank owns a contiguous token shard of the hidden stream. The attention partial sums (written straight into this rank's symmetric buffer) are reduce-scattered to the shard owners; the MoE combine pushes its partial rows straight into the owners' per-source slots instead. The owners run the short conv (on the slots' rank-order sum) and the AttnRes mix + RMSNorm on their shard only and push the normalized mix outputs into every rank's all-gather buffer.
Classes:
-
SeqParallel–Symmetric (MNNVL) buffers of up to
max_tokensrows: the partial
SeqParallel
¶
Symmetric (MNNVL) buffers of up to max_tokens rows: the partial
sums (aliased by the per-source slots of pushed partial rows), the
(3, max_tokens, hidden) all-gather destination and the staging rows
of the conv-state cache.
Later steps read the conv-state cache rows of each request's last
tail_rows tokens (decode and verify rollbacks, the next chunk) and of
the tokens before prefix-cache hit boundaries; their owners push them to
every rank, which writes them to its cache.
Methods:
-
partial–Where this rank writes its
(T, hidden)partial sums. -
pushed–The
(world, halo + shard, hidden)partial rows of this rank's -
reduce_scatter–The reduced rows of this rank's shard, preceded by the conv taps'
-
shard–This rank's tokens
[begin, end)and the shard capacity.
Source code in vllm/models/inkling2/nvidia/ops/seq_parallel.py
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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
partial(num_tokens)
¶
Where this rank writes its (T, hidden) partial sums.
pushed(num_tokens)
¶
The (world, halo + shard, hidden) partial rows of this rank's
shard every rank pushed (ops.moe.combine_push), and the halo count.
Source code in vllm/models/inkling2/nvidia/ops/seq_parallel.py
reduce_scatter(num_tokens)
¶
The reduced rows of this rank's shard, preceded by the conv taps' halo rows (and their count).
Source code in vllm/models/inkling2/nvidia/ops/seq_parallel.py
shard(num_tokens)
¶
This rank's tokens [begin, end) and the shard capacity.