Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/models/glm5next.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,9 @@ ggml_tensor * llama_model_glm5next::graph::build_indexer(
ggml_tensor * ape = ggml_cont(ctx0, ggml_transpose(ctx0, layer.indexer_comp_ape));
gate_t = ggml_add(ctx0, gate_t, ggml_reshape_4d(ctx0, ape, r, d_idx, 1, 1));

ggml_tensor * probs = ggml_soft_max(ctx0, gate_t);
// soft_max maps ne2/ne3 to gridDim.y/z (65535 cap); fold into ne1
ggml_tensor * probs = ggml_soft_max(ctx0, ggml_reshape_2d(ctx0, gate_t, r, d_idx*n_new_max*n_stream));
probs = ggml_reshape_4d(ctx0, probs, r, d_idx, n_new_max, n_stream);
cb(probs, "indexer_pool_probs", il);

ggml_tensor * pool_new = ggml_sum_rows(ctx0, ggml_mul(ctx0, keys_t, probs));
Expand Down