token probs for non HF loaders (#3957)

This commit is contained in:
saltacc 2023-09-17 13:42:32 +00:00 committed by GitHub
parent 0668f4e67f
commit cd08eb0753
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 5 deletions

View file

@ -150,7 +150,7 @@ def get_token_ids(prompt):
output = ''
for row in list(zip(tokens, decoded_tokens)):
output += f"{str(int(row[0])).ljust(5)} - {row[1]}\n"
output += f"{str(int(row[0])).ljust(5)} - {repr(row[1])[1:-1]}\n"
return output