MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / build_moe_ffn

Method build_moe_ffn

subprojects/llama.cpp/src/llama-graph.cpp:1058–1091  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1056}
1057
1058ggml_tensor * llm_graph_context::build_moe_ffn(
1059 ggml_tensor * cur,
1060 ggml_tensor * gate_inp,
1061 ggml_tensor * up_exps,
1062 ggml_tensor * gate_exps,
1063 ggml_tensor * down_exps,
1064 ggml_tensor * exp_probs_b,
1065 int64_t n_expert,
1066 int64_t n_expert_used,
1067 llm_ffn_op_type type_op,
1068 bool norm_w,
1069 bool scale_w,
1070 float w_scale,
1071 llama_expert_gating_func_type gating_op,
1072 int il,
1073 ggml_tensor * probs_in) const {
1074 return build_moe_ffn(
1075 cur,
1076 gate_inp, /* gate_inp_b */ nullptr,
1077 up_exps, /* up_exps_b */ nullptr,
1078 gate_exps, /* gate_exps_b */ nullptr,
1079 down_exps, /* down_exps_b */ nullptr,
1080 exp_probs_b,
1081 n_expert,
1082 n_expert_used,
1083 type_op,
1084 norm_w,
1085 scale_w,
1086 w_scale,
1087 gating_op,
1088 il,
1089 probs_in
1090 );
1091}
1092
1093ggml_tensor * llm_graph_context::build_moe_ffn(
1094 ggml_tensor * cur,

Callers

nothing calls this directly

Calls 15

ggml_addFunction · 0.85
ggml_soft_maxFunction · 0.85
ggml_sigmoidFunction · 0.85
ggml_reshape_3dFunction · 0.85
ggml_argsort_top_kFunction · 0.85
ggml_get_rowsFunction · 0.85
ggml_reshape_4dFunction · 0.85
ggml_sum_rowsFunction · 0.85
ggml_reshape_2dFunction · 0.85
ggml_set_rowsFunction · 0.85
ggml_fillFunction · 0.85
ggml_castFunction · 0.85

Tested by

no test coverage detected