Skip to content

Commit 2fa51c1

Browse files
authored
model-conversion : add token ids to prompt token output [no ci] (#17863)
This commit adds the token ids to the printed prompt outputs. The motivation for this is that is can be useful to see the actual token ids alongside the token strings for debugging.
1 parent 951520d commit 2fa51c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/model-conversion/logits.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ int main(int argc, char ** argv) {
144144
return 1;
145145
}
146146
std::string s(buf, n);
147-
printf("%s", s.c_str());
147+
printf("%s (%d)", s.c_str(), id);
148148
}
149149
printf("\n");
150150

0 commit comments

Comments
 (0)