Skip to content

Commit

Permalink
Log all sequence IDs in a batch
Browse files Browse the repository at this point in the history
  • Loading branch information
AutonomicPerfectionist committed Jan 10, 2024
1 parent d23ab1d commit 0082332
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions common/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,12 @@ inline std::string LOG_BATCH_TOSTR_PRETTY(const C & ctx, const B & batch)
<< ":token '" << detokenized << "'"
<< ":pos " << std::to_string(batch.pos[i])
<< ":n_seq_id " << std::to_string(batch.n_seq_id[i])
<< ":seq_id " << std::to_string(batch.seq_id[i][0])
<< ":logits " << std::to_string(batch.logits[i]);
<< ":seq_id ";
for (int j = 0; j < batch.n_seq_id[i]; j++) {
buf << std::to_string(batch.seq_id[i][j]) << ", ";
}

buf << ":logits " << std::to_string(batch.logits[i]);
}
buf << " ]";

Expand Down

0 comments on commit 0082332

Please sign in to comment.