File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -755,19 +755,17 @@ int main(int argc, char ** argv) {
755
755
for (auto id : embd) {
756
756
const std::string token_str = llama_token_to_piece (ctx, id, params.special );
757
757
758
+ // Console/Stream Output
758
759
// Suppress printing while generating token healing prefix
759
760
if (n_bytes_to_skip > 0 && n_bytes_to_skip < (int )token_str.size ()) {
760
- printf ( " %s" , token_str.substr (n_bytes_to_skip).c_str ());
761
+ fprintf (stdout, " %s" , token_str.substr (n_bytes_to_skip).c_str ());
761
762
n_bytes_to_skip = 0 ;
762
763
} else if (n_bytes_to_skip > 0 ) {
763
764
n_bytes_to_skip -= token_str.size ();
764
765
} else {
765
- printf ( " %s" , token_str.c_str ());
766
+ fprintf (stdout, " %s" , token_str.c_str ());
766
767
}
767
768
768
- // Console/Stream Output
769
- fprintf (stdout, " %s" , token_str.c_str ());
770
-
771
769
// Record Displayed Tokens To Log
772
770
// Note: Generated tokens are created one by one hence this check
773
771
if (embd.size () > 1 ) {
You can’t perform that action at this time.
0 commit comments