Skip to content

Need support for Gemma model which has cross-layer kv sharing #417

Description

@RixinLiu

kvcached crashes with a bare KeyError on models with cross-layer KV sharing

google/gemma-4-E2B-it fails at KV-cache init under kvcached, on both vLLM 0.22.1 and 0.24.0. The same model runs fine with kvcached disabled.

KeyError: 'language_model.model.layers.15.self_attn.attn'
  File "kvcached/integration/vllm/patches.py", line 1285, in _allocate_kv_cache_from_kvcached
    tensor_cfg = layer_to_tensor_cfg[layer_name]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions