From b9fd3bcef5fc3619a9c8e6f9b016a18a046280f0 Mon Sep 17 00:00:00 2001 From: lucylq Date: Wed, 22 Oct 2025 17:53:05 -0700 Subject: [PATCH] Revert "Runner logs (#15279)" This reverts commit 8ce3095d3d3b8358fb93009ac54ab92e25a81265. --- extension/llm/runner/text_llm_runner.cpp | 9 ++++----- extension/llm/runner/text_token_generator.h | 6 +----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/extension/llm/runner/text_llm_runner.cpp b/extension/llm/runner/text_llm_runner.cpp index a5e35972e65..626c888f3a2 100644 --- a/extension/llm/runner/text_llm_runner.cpp +++ b/extension/llm/runner/text_llm_runner.cpp @@ -175,11 +175,6 @@ Error TextLLMRunner::generate( stats_->first_token_ms = time_in_ms(); stats_->prompt_eval_end_ms = time_in_ms(); - RUNNER_ET_LOG( - config.warming, - "RSS after prompt prefill: %f MiB (0 if unsupported)", - get_rss_bytes() / 1024.0 / 1024.0); - // print the first token from prefill. No prev_token so use cur_token for it. auto decode_result = tokenizer_->decode(cur_token, cur_token); if (!decode_result.ok()) { @@ -190,6 +185,10 @@ Error TextLLMRunner::generate( return ::executorch::runtime::Error::InvalidArgument; } wrapped_callback(std::move(*decode_result)); + RUNNER_ET_LOG( + config.warming, + "RSS after prompt prefill: %f MiB (0 if unsupported)", + get_rss_bytes() / 1024.0 / 1024.0); // start the main loop prompt_tokens.push_back(cur_token); diff --git a/extension/llm/runner/text_token_generator.h b/extension/llm/runner/text_token_generator.h index 7880dee81fb..b7fca420bc3 100644 --- a/extension/llm/runner/text_token_generator.h +++ b/extension/llm/runner/text_token_generator.h @@ -128,13 +128,9 @@ class ET_EXPERIMENTAL TextTokenGenerator { if (eos_ids_->find(cur_token) != eos_ids_->end()) { printf("\n"); ET_LOG(Info, "\nReached to the end of generation"); - return pos - start_pos; + break; } } - ET_LOG( - Info, - "\nFinished generation. Generated %" PRIi32 " tokens.", - start_pos + max_new_tokens); return pos - start_pos; }