File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff 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);
Original file line number Diff line number Diff 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, " \n Reached to the end of generation" );
131- return pos - start_pos ;
131+ break ;
132132 }
133133 }
134- ET_LOG (
135- Info,
136- " \n Finished generation. Generated %" PRIi32 " tokens." ,
137- start_pos + max_new_tokens);
138134 return pos - start_pos;
139135 }
140136
You can’t perform that action at this time.
0 commit comments