Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
yirongjie committed Aug 2, 2024
1 parent 69bdbfa commit ddf3dfb
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions examples/demo_qwen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,10 @@ int main(int argc, char **argv) {

vector<string> in_strs = {
" Hello, who are you?",
"<|im_start|> <|im_end|> What can you do?",
"<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n<|im_start|>user\nGive me a short introduction to large language model.<|im_end|>\n<|im_start|> assistant\n\n",
" What can you do?",
"Please introduce Beijing University of Posts and Telecommunications.",
};

// auto input_tensor = tokenizer.tokenize(in_strs[2]);
// input_tensor.printData<float>();
// exit(0);

auto processOutput = [&](std::string &text) -> std::pair<bool, std::string> {
if (text == "<|im_start|>" || text == "<|im_end|>" || text == "<unk>") return {true, ""};
if (text == "<|endoftext|>") return {false, ""};
Expand Down

0 comments on commit ddf3dfb

Please sign in to comment.