vllm.models.deepseek_v4.amd.mono.dims
¶
DeepSeek-V4-Pro's widths as the mono kernels read them, and Dims, a TP
rank's share of them with every count the stages derive from it.
Classes:
-
Dims–A TP rank's share of the model's widths.
Functions:
-
cdiv–ceil(a / b) for a >= 0, b > 0.
-
ld–The row stride of a row-major FP8 weight of K =
k(bytes): vLLM pads -
tile_rows–The LDS rows an x tile holds.
-
token_tiles–A step's tokens in GEMV passes: [(first token, tokens)]. A GEMV loads its
Dims
dataclass
¶
A TP rank's share of the model's widths.
Attributes:
-
down_scale_cols(int) –w2_s's e8m0 columns: inter / 32, padded to a multiple of 8
-
group_k(int) –wo_a's K a group: its heads' outputs.
-
inter(int) –... padded as the loader pads it (the rest zero weights).
-
inter_real(int) –A routed expert's real intermediate width on this rank.
-
keys(int) –A token's attention keys at most: its top-k, then its window.
-
mid_words(int) –MXFP8 words of a pick's routed intermediate.
-
sh_inter(int) –The shared expert's intermediate width on this rank.
-
topk_width(int) –A token's compressed keys at most.
Source code in vllm/models/deepseek_v4/amd/mono/dims.py
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 | |
down_scale_cols
property
¶
w2_s's e8m0 columns: inter / 32, padded to a multiple of 8
(aiter shuffle_scale).
group_k
property
¶
wo_a's K a group: its heads' outputs.
inter
property
¶
... padded as the loader pads it (the rest zero weights).
inter_real
property
¶
A routed expert's real intermediate width on this rank.
keys
property
¶
A token's attention keys at most: its top-k, then its window.
mid_words
property
¶
MXFP8 words of a pick's routed intermediate.
sh_inter
property
¶
The shared expert's intermediate width on this rank.
topk_width
property
¶
A token's compressed keys at most.
cdiv(a, b)
¶
ld(k)
¶
The row stride of a row-major FP8 weight of K = k (bytes): vLLM pads
the rows of a multiple of 512 bytes by 256 (VLLM_ROCM_FP8_PADDING).
tile_rows(s)
¶
token_tiles(s)
¶
A step's tokens in GEMV passes: [(first token, tokens)]. A GEMV loads its weights once and runs every pass on them, an x tile in LDS at a time.