Skip to content

vllm.model_executor.layers.mooncake_engram

Mooncake-backed immutable row storage shared by Engram model families.

Classes:

Functions:

MooncakeEngramStorage

One model layer's node-sharded EngramStore deployment.

Methods:

  • initialize –

    Publish owned heads with populate_and_sync and wait for the group.

  • lookup –

    Enqueue a token-major lookup for a contiguous compute-head shard.

initialize(rows)

Publish owned heads with populate_and_sync and wait for the group.

lookup(ids, output, *, head_start=0)

Enqueue a token-major lookup for a contiguous compute-head shard.

_gather_factor(parallel)

Return the largest attention-DP gather this caller can submit.

_head_shard(head_sizes, num_shards, shard_id)

Return owned head and concatenated-row bounds for one storage node.

_load_mooncake_config(path)

Load the user options accepted by remote EngramStoreConfig.

_lookup_capacity(config, num_heads)

Bound caller-local row IDs from scheduler, graph, and gather width.

_node_identity(parallel)

Identify one engine on one host without using a per-worker CUDA view.

_remote_runtime(num_heads)

Build the Engram fields supplied by vLLM rather than user JSON.

close_mooncake_engram_storages(storages)

Close every store after model CUDA graphs have been released.

collect_mooncake_engram_storages(model)

Collect live stores in a deterministic cross-worker shutdown order.

pack_mooncake_rows(*planes)

Pack same-row CPU tensors into EngramStore's byte-row representation.