mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-10-28 09:45:55 +08:00
deepseek41 : drop the F32 src1 requests on the router and indexer matmuls
This commit is contained in:
1 parent
d049fa51ec
commit
e96d689dc6
1 file changed
+1
-7
@@ -577,9 +577,6 @@ ggml_tensor * llama_model_deepseek41::graph::build_attention41(
|
||||
ggml_tensor * iqc = ggml_view_4d(ctx0, iq, iq->ne[0], iq->ne[1], nc, n_stream, iq->nb[1], iq->nb[2], iq->nb[3], t0*iq->nb[2]);
|
||||
|
||||
ggml_tensor * kq = ggml_mul_mat(ctx0, ik_p, ggml_permute(ctx0, iqc, 0, 2, 1, 3));
|
||||
if (!ggml_is_quantized(ik->type)) {
|
||||
ggml_prec_set_src(kq, GGML_PREC_F32, 1);
|
||||
}
|
||||
kq = ggml_cont(ctx0, ggml_permute(ctx0, kq, 2, 1, 0, 3));
|
||||
score = ggml_sum_rows(ctx0, ggml_mul(ctx0, ggml_relu(ctx0, kq), rows(iw)));
|
||||
ggml_tensor * mask = rows(ci.kq_mask);
|
||||
@@ -880,12 +877,9 @@ llama_model_deepseek41::graph::graph(const llama_model & model_base, const llm_g
|
||||
cur = build_norm(cur, layer.ffn_norm, nullptr, LLM_NORM_RMS, il);
|
||||
cb(cur, "ffn_norm", il);
|
||||
|
||||
// F32 router inputs: expert selection is near-tie sensitive
|
||||
// F32 router accumulation: expert selection is near-tie sensitive
|
||||
ggml_tensor * logits = build_lora_mm(layer.ffn_gate_inp, cur);
|
||||
ggml_prec_set_acc(logits, GGML_PREC_F32);
|
||||
if (!ggml_is_quantized(layer.ffn_gate_inp->type)) {
|
||||
ggml_prec_set_src(logits, GGML_PREC_F32, 1);
|
||||
}
|
||||
cb(logits, "ffn_moe_logits", il);
|
||||
|
||||
// image (embedding) tokens use the vision router bias, as DeepSeek-V4
|
||||
|
||||
Reference in new issue
Block a user