vllm.distributed.ec_transfer.ec_connector.tiering.layout
¶
Persistent cache identity and full-block disk layout for encoder cache.
Each .ec file contains every complete CPU block allocated to one encoder
cache item, including any final-block padding. Compatibility is isolated by a
stable namespace directory, while the caller validates the expected allocated
file size before loading. There is no per-file header or namespace
config.json.
Classes:
-
ECCacheNamespace–Stable factors that determine encoder-output byte compatibility.
Functions:
-
build_ec_cache_key–Return a filesystem-safe digest for one encoder-cache item.
-
get_ec_entry_path–Map a cache key to a versioned, hash-prefix-sharded raw tensor file.
-
get_ec_namespace_path–Return the versioned directory containing one cache namespace.
-
get_ec_temporary_path–Return a temporary path in the namespace's per-owner staging directory.
ECCacheNamespace
dataclass
¶
Stable factors that determine encoder-output byte compatibility.
The digest excludes process- and request-local identity so compatible model
configurations can reuse files across restarts. Model identity and effective
configuration are captured by encoder_config_hash.
Source code in vllm/distributed/ec_transfer/ec_connector/tiering/layout.py
build_ec_cache_key(namespace_digest, identifier, modality, num_tokens, file_size_bytes)
¶
Return a filesystem-safe digest for one encoder-cache item.
Source code in vllm/distributed/ec_transfer/ec_connector/tiering/layout.py
get_ec_entry_path(root_dir, namespace_digest, cache_key)
¶
Map a cache key to a versioned, hash-prefix-sharded raw tensor file.
Source code in vllm/distributed/ec_transfer/ec_connector/tiering/layout.py
get_ec_namespace_path(root_dir, namespace_digest)
¶
Return the versioned directory containing one cache namespace.
Source code in vllm/distributed/ec_transfer/ec_connector/tiering/layout.py
get_ec_temporary_path(entry_path, operation_token, owner_id)
¶
Return a temporary path in the namespace's per-owner staging directory.