Skip to content

Commit

Permalink
Merge pull request #362 from byte-6174/upmaster
Browse files Browse the repository at this point in the history
freeing tokenizer in test.c
  • Loading branch information
karpathy authored Aug 26, 2023
2 parents 50832e3 + 32cecbf commit 7b0017c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ void test_prompt_encodings() {
char* prompt4 = "Translate English to French:\n\n sea otter => loutre de mer\n peppermint => menthe poivrée\n plush girafe => girafe peluche\n cheese =>";
int expected_tokens4[] = {1, 4103, 9632, 4223, 304, 5176, 29901, 13, 13, 4706, 7205, 4932, 357, 1149, 301, 449, 276, 316, 2778, 13, 4706, 1236, 407, 837, 524, 1149, 6042, 354, 772, 440, 29878, 1318, 13, 4706, 715, 1878, 330, 3055, 1725, 1149, 330, 3055, 1725, 4639, 28754, 13, 4706, 923, 968, 1149};
test_prompt_encoding(&tokenizer, prompt4, expected_tokens4, sizeof(expected_tokens4) / sizeof(int));

// memory and file handles cleanup
free_tokenizer(&tokenizer);
}

int main(int argc, char *argv[]) {
Expand Down

0 comments on commit 7b0017c

Please sign in to comment.