Skip to content

Commit 0e24c4a

Browse files
authored
address review suggestions
1 parent ec5fd81 commit 0e24c4a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/llama-chat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ int32_t llm_chat_apply_template(
650650
if (add_ass) {
651651
ss << " Ассистент:[SEP]";
652652
}
653-
} else if (tmpl == LLM_CHAT_TEMPLATE_BAILING || tmpl == LLM_CHAT_TEMPLATE_BAILING_THINK) {
653+
} else if (tmpl == LLM_CHAT_TEMPLATE_BAILING || tmpl == LLM_CHAT_TEMPLATE_BAILING_THINK) {
654654
// Bailing (Ling/Ring) template
655655
for (auto message : chat) {
656656
std::string role(message->role);
@@ -671,7 +671,7 @@ int32_t llm_chat_apply_template(
671671
ss << "<think>";
672672
}
673673
}
674-
} else if (tmpl == LLM_CHAT_TEMPLATE_BAILING2) {
674+
} else if (tmpl == LLM_CHAT_TEMPLATE_BAILING2) {
675675
// Bailing2 (Ling 2.0) template
676676
bool has_system = !chat.empty() && std::string(chat[0]->role) == "system";
677677

src/llama-graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,7 @@ ggml_tensor * llm_graph_context::build_moe_ffn(
929929
}
930930

931931
// select top n_group_used expert groups
932+
// https://huggingface.co/deepseek-ai/DeepSeek-V3/blob/e815299b0bcbac849fa540c768ef21845365c9eb/modeling_deepseek.py#L440-L457
932933
if (hparams.n_expert_groups > 1 && n_tokens > 0) {
933934
const int64_t n_exp_per_group = n_expert / hparams.n_expert_groups;
934935

@@ -943,7 +944,6 @@ ggml_tensor * llm_graph_context::build_moe_ffn(
943944
group_scores = ggml_reshape_2d(ctx0, group_scores, group_scores->ne[1], group_scores->ne[2]); // [n_expert_groups, n_tokens]
944945

945946
ggml_tensor * expert_groups = ggml_top_k(ctx0, group_scores, hparams.n_group_used); // [n_group_used, n_tokens]
946-
cb(expert_groups->src[0], "ffn_moe_group_argsort", il);
947947
cb(expert_groups, "ffn_moe_group_topk", il);
948948

949949
// mask out the other groups

0 commit comments

Comments
 (0)