vllm.config.engram ¶
Classes:
-
EngramConfig–Configuration for Engram embedding storage and sharding.
EngramConfig ¶
Configuration for Engram embedding storage and sharding.
Methods:
-
compute_hash–Hash settings that affect embedding execution and graph structure.
-
get_parallel_size–Derive the embedding group size from the parallel configuration.
-
verify_model_config–Reject Engram configuration for models without n-gram embeddings.
-
verify_parallel_config–Reject unsupported embedding parallel topologies.
Attributes:
-
cpu_offload(bool) –Store embedding weights in pinned CPU memory for UVA lookup.
-
embedding_across_dp(bool) –Shard embeddings across TP and all DP ranks when enabled.
Source code in vllm/config/engram.py
cpu_offload = Field(default_factory=_default_cpu_offload) class-attribute instance-attribute ¶
Store embedding weights in pinned CPU memory for UVA lookup. Defaults to False, or VLLM_PLE_CPU_OFFLOAD when set for compatibility. An explicit value takes precedence over the legacy environment variable.
embedding_across_dp = False class-attribute instance-attribute ¶
Shard embeddings across TP and all DP ranks when enabled. Otherwise, each DP rank has a separate TP-sharded embedding replica.
compute_hash() ¶
get_parallel_size(parallel_config) ¶
Derive the embedding group size from the parallel configuration.
Source code in vllm/config/engram.py
verify_model_config(model_config) ¶
Reject Engram configuration for models without n-gram embeddings.
Source code in vllm/config/engram.py
verify_parallel_config(parallel_config) ¶
Reject unsupported embedding parallel topologies.
Source code in vllm/config/engram.py
_default_cpu_offload() ¶
Honor the legacy environment variable only when the field is omitted.