models : Attach Mistral3 NVFP4 weight scales (#23629)
This commit is contained in:
@@ -177,9 +177,9 @@ llama_model_mistral3::graph::graph(const llama_model & model, const llm_graph_pa
|
|||||||
cb(cur, "ffn_norm", il);
|
cb(cur, "ffn_norm", il);
|
||||||
|
|
||||||
cur = build_ffn(cur,
|
cur = build_ffn(cur,
|
||||||
model.layers[il].ffn_up, model.layers[il].ffn_up_b, NULL,
|
model.layers[il].ffn_up, model.layers[il].ffn_up_b, model.layers[il].ffn_up_s,
|
||||||
model.layers[il].ffn_gate, model.layers[il].ffn_gate_b, NULL,
|
model.layers[il].ffn_gate, model.layers[il].ffn_gate_b, model.layers[il].ffn_gate_s,
|
||||||
model.layers[il].ffn_down, model.layers[il].ffn_down_b, NULL,
|
model.layers[il].ffn_down, model.layers[il].ffn_down_b, model.layers[il].ffn_down_s,
|
||||||
NULL,
|
NULL,
|
||||||
LLM_FFN_SILU, LLM_FFN_PAR, il);
|
LLM_FFN_SILU, LLM_FFN_PAR, il);
|
||||||
cb(cur, "ffn_out", il);
|
cb(cur, "ffn_out", il);
|
||||||
@@ -200,7 +200,11 @@ llama_model_mistral3::graph::graph(const llama_model & model, const llm_graph_pa
|
|||||||
LLM_FFN_SILU, true,
|
LLM_FFN_SILU, true,
|
||||||
hparams.expert_weights_scale,
|
hparams.expert_weights_scale,
|
||||||
LLAMA_EXPERT_GATING_FUNC_TYPE_SOFTMAX,
|
LLAMA_EXPERT_GATING_FUNC_TYPE_SOFTMAX,
|
||||||
il);
|
il,
|
||||||
|
nullptr, nullptr,
|
||||||
|
model.layers[il].ffn_up_exps_s,
|
||||||
|
model.layers[il].ffn_gate_exps_s,
|
||||||
|
model.layers[il].ffn_down_exps_s);
|
||||||
cb(cur, "ffn_moe_out", il);
|
cb(cur, "ffn_moe_out", il);
|
||||||
}
|
}
|
||||||
cur = ggml_add(ctx0, cur, ffn_inp);
|
cur = ggml_add(ctx0, cur, ffn_inp);
|
||||||
|
|||||||
Reference in New Issue
Block a user