Improve logging when running Gemma examples: fix the issue when max_tokens, max_generated_tokens and temperature were logging without any trailing space/newline.

PiperOrigin-RevId: 646014268
This commit is contained in:
The gemma.cpp Authors 2024-06-24 01:59:52 -07:00 committed by Copybara-Service
parent 80b1347393
commit 12089417b5
1 changed files with 4 additions and 3 deletions

View File

@ -117,9 +117,10 @@ std::pair<std::string, size_t> GemmaEnv::QueryModel(
return true; return true;
}; };
if (app_.verbosity >= 2) { if (app_.verbosity >= 2) {
std::cout << inference_args_.max_tokens << " " std::cout << "Max tokens: " << inference_args_.max_tokens
<< inference_args_.max_generated_tokens << " " << "\tmax generated tokens: "
<< inference_args_.temperature; << inference_args_.max_generated_tokens
<< "\ttemperature: " << inference_args_.temperature << "\n";
} }
gcpp::TimingInfo timing_info; gcpp::TimingInfo timing_info;
runtime_config_.stream_token = stream_token; runtime_config_.stream_token = stream_token;