Skip to content

Commit 21b1041

Browse files
sammcjCISC
andauthored
model: glm 4.5 apply suggestions from code review
Co-authored-by: Sigbjørn Skjæret <[email protected]>
1 parent 07416e0 commit 21b1041

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/llama-arch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static const std::map<llm_kv, const char *> LLM_KV_NAMES = {
126126
{ LLM_KV_EXPERT_WEIGHTS_NORM, "%s.expert_weights_norm" },
127127
{ LLM_KV_EXPERT_GATING_FUNC, "%s.expert_gating_func" },
128128
{ LLM_KV_MOE_EVERY_N_LAYERS, "%s.moe_every_n_layers" },
129-
{ LLM_KV_NEXTN_PREDICT_LAYERS, "%s.nextn_predict_layers" },
129+
{ LLM_KV_NEXTN_PREDICT_LAYERS, "%s.nextn_predict_layers" },
130130
{ LLM_KV_POOLING_TYPE, "%s.pooling_type" },
131131
{ LLM_KV_LOGIT_SCALE, "%s.logit_scale" },
132132
{ LLM_KV_DECODER_START_TOKEN_ID, "%s.decoder_start_token_id" },

src/llama-kv-cache-unified.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ llama_kv_cache_unified::llama_kv_cache_unified(
4141
}
4242
if (model.arch == LLM_ARCH_GLM4_MOE) {
4343
// GLM-4.5: Only process up to last layer, skip final NextN layer
44-
n_layer_cache = hparams.n_layer - hparam.nextn_predict_layers;
44+
n_layer_cache = hparams.n_layer - hparams.nextn_predict_layers;
4545
}
4646

4747
// create a context for each buffer type

src/llama-model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13494,7 +13494,7 @@ struct llm_build_glm4_moe : public llm_graph_context {
1349413494

1349513495
// Only process up to last layer (skip final NextN layer)
1349613496
// Final layer tensors are loaded but not processed in forward pass
13497-
const int n_transformer_layers = n_layer - hparam.nextn_predict_layers;
13497+
const int n_transformer_layers = n_layer - hparams.nextn_predict_layers;
1349813498
for (int il = 0; il < n_transformer_layers; ++il) {
1349913499
ggml_tensor * inpSA = inpL;
1350013500

0 commit comments

Comments
 (0)