File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -917,10 +917,19 @@ int main(int argc, char ** argv) {
917917 embd_inp.insert (embd_inp.end (), line_inp.begin (), line_inp.end ());
918918 embd_inp.insert (embd_inp.end (), line_sfx.begin (), line_sfx.end ());
919919
920+ if (params.verbose_prompt ) {
921+ LOG_INF (" %s: number of tokens in prompt = %zu\n " , __func__, embd_inp.size () - original_size);
922+ }
923+
920924 for (size_t i = original_size; i < embd_inp.size (); ++i) {
921925 const llama_token token = embd_inp[i];
926+ const std::string token_str = common_token_to_piece (ctx, token);
922927 output_tokens.push_back (token);
923- output_ss << common_token_to_piece (ctx, token);
928+ output_ss << token_str;
929+
930+ if (params.verbose_prompt ) {
931+ LOG_INF (" %6d -> '%s'\n " , token, token_str.c_str ());
932+ }
924933 }
925934
926935 // reset assistant message
You can’t perform that action at this time.
0 commit comments