Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
minor : add braces
  • Loading branch information
ggerganov authored Dec 6, 2023
commit b2e8a2e22fbae9903b949a3e1204feda87fecc18
6 changes: 4 additions & 2 deletions examples/speculative/speculative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,9 @@ int main(int argc, char ** argv) {

const std::string token_str = llama_token_to_piece(ctx_tgt, id);

if (!params.use_color)
if (!params.use_color) {
printf("%s", token_str.c_str());
}

if (id == llama_token_eos(model_tgt)) {
has_eos = true;
Expand Down Expand Up @@ -244,8 +245,9 @@ int main(int argc, char ** argv) {
continue;
}
}
if (params.use_color)
if (params.use_color) {
printf("%s", token_str.c_str());
}
fflush(stdout);

LOG("the sampled target token (%d, '%s') did not match, or we ran out of drafted tokens\n", id, token_str.c_str());
Expand Down