Skip to content

Commit 3c8521c

Browse files
authored
llama-graph: replace cont with reshape for alpha in qwen35 (#20640)
1 parent 67a2209 commit 3c8521c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/models/qwen35.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ ggml_tensor * llm_build_qwen35::build_layer_attn_linear(
224224
beta = ggml_sigmoid(ctx0, beta);
225225

226226
ggml_tensor * alpha = build_lora_mm(model.layers[il].ssm_alpha, cur, model.layers[il].ssm_alpha_s);
227-
alpha = ggml_cont_3d(ctx0, alpha, num_v_heads, n_seq_tokens, n_seqs);
227+
alpha = ggml_reshape_3d(ctx0, alpha, num_v_heads, n_seq_tokens, n_seqs);
228228
cb(alpha, "alpha", il);
229229

230230
ggml_tensor * alpha_biased = ggml_add(ctx0, alpha, model.layers[il].ssm_dt);

src/models/qwen35moe.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ ggml_tensor * llm_build_qwen35moe ::build_layer_attn_linear(
224224
beta = ggml_sigmoid(ctx0, beta);
225225

226226
ggml_tensor * alpha = build_lora_mm(model.layers[il].ssm_alpha, cur, model.layers[il].ssm_alpha_s);
227-
alpha = ggml_cont_3d(ctx0, alpha, num_v_heads, n_seq_tokens, n_seqs);
227+
alpha = ggml_reshape_3d(ctx0, alpha, num_v_heads, n_seq_tokens, n_seqs);
228228
cb(alpha, "alpha", il);
229229

230230
ggml_tensor * alpha_biased = ggml_add(ctx0, alpha, model.layers[il].ssm_dt);

0 commit comments

Comments
 (0)