vllm.model_executor.model_loader.weight_cache.seed
¶
Daemon-to-daemon seeding over an authenticated JSON channel.
A :class:Seedable is one kind of state a daemon can seed to or from a peer
daemon: warmup caches today, weight shards later. The target names what it
wants by kind and key fields; the source resolves the key to a payload; the
target validates and installs it:
request: {"kind": "flashinfer_autotune", <key fields>..., "token": "..."}
response: {"status": "ok", "payload": <kind-specific>}
{"status": "miss"} | {"status": "error", "message": "..."}
Payloads are JSON values. Large binary state (weights) must not be inlined:
the payload then describes the transfer (e.g. a storage manifest) and the
kind's install drives the data plane itself.
The connection is unencrypted beyond the shared token; keep the listener on a trusted network.
Classes:
-
SeedConfig–One daemon's D2D seeding configuration: its listener, its source
-
SeedTransport–The daemon's D2D seeding endpoint: serves and fetches seedables.
-
Seedable–One kind of state a daemon can seed to or from a peer daemon.
SeedConfig
¶
Bases: NamedTuple
One daemon's D2D seeding configuration: its listener, its source replica, and the shared token authenticating both.
Source code in vllm/model_executor/model_loader/weight_cache/seed.py
SeedTransport
¶
The daemon's D2D seeding endpoint: serves and fetches seedables.
Methods:
-
adopt–Best-effort: fetch and install
seedablefrom the source daemon. -
handle_request–Source side: answer one authenticated seed request.
-
request–Send one authenticated request to the source daemon.
-
start_listener–Start serving this rank's seedables to peer daemons.
Source code in vllm/model_executor/model_loader/weight_cache/seed.py
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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |
adopt(seedable, ctx)
¶
Best-effort: fetch and install seedable from the source daemon.
Any failure degrades to the local path with a log line.
Source code in vllm/model_executor/model_loader/weight_cache/seed.py
handle_request(request)
¶
Source side: answer one authenticated seed request.
Source code in vllm/model_executor/model_loader/weight_cache/seed.py
request(payload)
¶
Send one authenticated request to the source daemon.
Returns the response, or None with a log line on any transport failure; the caller falls back to its local path then.
Source code in vllm/model_executor/model_loader/weight_cache/seed.py
start_listener()
¶
Start serving this rank's seedables to peer daemons.
Returns the bound address, or None when no listener is configured.
Source code in vllm/model_executor/model_loader/weight_cache/seed.py
Seedable
¶
Bases: Protocol
One kind of state a daemon can seed to or from a peer daemon.
Methods:
-
install–Target side: install a validated payload.
-
request_params–Target side: the key fields identifying what this rank needs.
-
resolve–Source side: produce the payload named by
request. -
validate_payload–Target side: validate the fetched payload, or raise ValueError.
Source code in vllm/model_executor/model_loader/weight_cache/seed.py
install(ctx, payload)
¶
request_params(ctx)
¶
resolve(request)
¶
Source side: produce the payload named by request.
Validate the wire key first — raise an error on any malformed field
(ValueError for bad values, KeyError for missing ones), before
touching local state. The transport turns it into an error response.
Return None on a miss.