Archived
From layer n_layer - num_kv_shared_layers on, a layer has no k or v projection and attends over the cache of the last earlier non-shared layer of its class (transformers store_full_length_kv). Shared layers are not bound to a KV group, so pages count only the layers that write. A null num_global_key_value_heads falls back to num_key_value_heads.