File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -252,14 +252,14 @@ CacheLayerLayout KVCacheManager::getMainModelCacheLayerLayout() const {
252252 auto & all_layer_tensors = all_layout.layers_to_kv_buffer_ptrs ;
253253 auto & all_scale_tensors = all_layout.layers_to_scale_buffer_ptrs ;
254254
255- layout.layer_to_groups .resize (config_.layer_num );
256255 layout.layers_to_kv_buffer_ptrs .resize (config_.layer_num );
257256 if (!all_scale_tensors.empty ()) {
258257 layout.layers_to_scale_buffer_ptrs .resize (config_.layer_num );
259258 }
260259
261260 layout.layer_to_groups = config_.layer_to_group_id ;
262261 layout.group_types = config_.group_types ;
262+ layout.layer_to_groups .resize (config_.layer_num );
263263 layout.layer_attn_types .resize (config_.layer_num , CacheGroupType::FULL );
264264
265265 RTP_LLM_CHECK_WITH_INFO (config_.layer_num <= all_layer_tensors.size (),
You can’t perform that action at this time.
0 commit comments