Skip to content

Commit

Permalink
fix glm4 template
Browse files Browse the repository at this point in the history
  • Loading branch information
黄宇扬 committed Jun 7, 2024
1 parent 15bcc21 commit e048a84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ namespace fastllm {
// ChatGLM采用拼接token的方法,需要强行指定分割词的TokenID
model->pre_prompt = "";
model->user_role = ("<FLM_FIX_TOKEN_" + std::to_string(model->weight.tokenizer.GetTokenId("<|user|>")) + ">\n");
model->bot_role = ("<FLM_FIX_TOKEN_" + std::to_string(model->weight.tokenizer.GetTokenId("<|assistant|>")) + ">");
model->bot_role = ("<FLM_FIX_TOKEN_" + std::to_string(model->weight.tokenizer.GetTokenId("<|assistant|>")) + ">\n");
model->history_sep = "";
model->weight.tokenizer.type = Tokenizer::TokenizerType::QWEN;
} else {
Expand Down

0 comments on commit e048a84

Please sign in to comment.