Skip to content

Commit fe51006

Browse files
committed
fix - fix mtp target layer_to_groups size error
1 parent 68ff089 commit fe51006

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rtp_llm/cpp/cache/KVCacheManager.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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(),

0 commit comments

Comments
 (0)