vllm.config.engram
¶
Classes:
-
EngramConfig–Configuration for Engram embedding storage and sharding.
Functions:
-
model_has_engram_layers–Whether the model carries n-gram embedding layers.
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.
-
resolve_dp_shared_memory–Share host tables by default wherever the configuration permits.
-
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.
-
dp_shared_memory(bool | None) –Share CPU-offloaded embedding weights between co-located
-
embedding_across_dp(bool) –Shard embeddings across TP and all DP ranks when enabled.
-
rdma_keep_prefill_rows(bool) –Retain all producer prefill rows instead of bounded decoder replay.
-
rdma_prefetch(bool) –Allow remote Engram lookups to overlap decoder computation.
-
rdma_provider(str | None) –Experimental dotted module name for a remote Engram reader provider.
-
use_thp(bool) –Back private CPU-offloaded tables with transparent huge pages (best
Source code in vllm/config/engram.py
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 | |
cpu_offload = True
class-attribute
instance-attribute
¶
Store embedding weights in pinned CPU memory for UVA lookup.
dp_shared_memory = None
class-attribute
instance-attribute
¶
Share CPU-offloaded embedding weights between co-located DP replicas. Each node stores one copy of every TP shard, reducing host memory without per-step Engram DP collectives. Requires sufficient /dev/shm capacity and a shared IPC namespace. Defaults to enabled whenever the other settings allow it, falling back to per-replica tables when DP replicas are not co-located on one node or /dev/shm cannot hold them.
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.
rdma_keep_prefill_rows = False
class-attribute
instance-attribute
¶
Retain all producer prefill rows instead of bounded decoder replay.
rdma_prefetch = True
class-attribute
instance-attribute
¶
Allow remote Engram lookups to overlap decoder computation.
rdma_provider = None
class-attribute
instance-attribute
¶
Experimental dotted module name for a remote Engram reader provider.
use_thp = False
class-attribute
instance-attribute
¶
Back private CPU-offloaded tables with transparent huge pages (best effort, falls back to ordinary pinned pages). Prefaulting the tables at startup takes longer. Requires cpu_offload without dp_shared_memory. Always on for private tables on ROCm.
compute_hash()
¶
get_parallel_size(parallel_config)
¶
Derive the embedding group size from the parallel configuration.
Source code in vllm/config/engram.py
resolve_dp_shared_memory(parallel_config)
¶
Share host tables by default wherever the configuration permits.
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
model_has_engram_layers(model_config)
¶
Whether the model carries n-gram embedding layers.