Skip to content

Commit b9fd3bc

Browse files
committed
Revert "Runner logs (#15279)"
This reverts commit 8ce3095.
1 parent 788ef2f commit b9fd3bc

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

extension/llm/runner/text_llm_runner.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,6 @@ Error TextLLMRunner::generate(
175175
stats_->first_token_ms = time_in_ms();
176176
stats_->prompt_eval_end_ms = time_in_ms();
177177

178-
RUNNER_ET_LOG(
179-
config.warming,
180-
"RSS after prompt prefill: %f MiB (0 if unsupported)",
181-
get_rss_bytes() / 1024.0 / 1024.0);
182-
183178
// print the first token from prefill. No prev_token so use cur_token for it.
184179
auto decode_result = tokenizer_->decode(cur_token, cur_token);
185180
if (!decode_result.ok()) {
@@ -190,6 +185,10 @@ Error TextLLMRunner::generate(
190185
return ::executorch::runtime::Error::InvalidArgument;
191186
}
192187
wrapped_callback(std::move(*decode_result));
188+
RUNNER_ET_LOG(
189+
config.warming,
190+
"RSS after prompt prefill: %f MiB (0 if unsupported)",
191+
get_rss_bytes() / 1024.0 / 1024.0);
193192

194193
// start the main loop
195194
prompt_tokens.push_back(cur_token);

extension/llm/runner/text_token_generator.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,9 @@ class ET_EXPERIMENTAL TextTokenGenerator {
128128
if (eos_ids_->find(cur_token) != eos_ids_->end()) {
129129
printf("\n");
130130
ET_LOG(Info, "\nReached to the end of generation");
131-
return pos - start_pos;
131+
break;
132132
}
133133
}
134-
ET_LOG(
135-
Info,
136-
"\nFinished generation. Generated %" PRIi32 " tokens.",
137-
start_pos + max_new_tokens);
138134
return pos - start_pos;
139135
}
140136

0 commit comments

Comments
 (0)