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) {
917
917
embd_inp.insert (embd_inp.end (), line_inp.begin (), line_inp.end ());
918
918
embd_inp.insert (embd_inp.end (), line_sfx.begin (), line_sfx.end ());
919
919
920
+ if (params.verbose_prompt ) {
921
+ LOG_INF (" %s: number of tokens in prompt = %zu\n " , __func__, embd_inp.size () - original_size);
922
+ }
923
+
920
924
for (size_t i = original_size; i < embd_inp.size (); ++i) {
921
925
const llama_token token = embd_inp[i];
926
+ const std::string token_str = common_token_to_piece (ctx, token);
922
927
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
+ }
924
933
}
925
934
926
935
// reset assistant message
You can’t perform that action at this time.
0 commit comments