Merge pull request #28 from SlyEcho/master

Fix tokenizer reading on Windows
This commit is contained in:
Andrej
2023-07-24 07:23:07 -07:00
committed by GitHub
+1 -1
View File
@@ -425,7 +425,7 @@ int main(int argc, char *argv[]) {
// read in the tokenizer.bin file // read in the tokenizer.bin file
char** vocab = (char**)malloc(config.vocab_size * sizeof(char*)); char** vocab = (char**)malloc(config.vocab_size * sizeof(char*));
{ {
FILE *file = fopen("tokenizer.bin", "r"); FILE *file = fopen("tokenizer.bin", "rb");
if (!file) { if (!file) {
printf("Unable to open the tokenizer file tokenizer.bin! Run " printf("Unable to open the tokenizer file tokenizer.bin! Run "
"python tokenizer.py to convert tokenizer.model -> tokenizer.bin\n"); "python tokenizer.py to convert tokenizer.model -> tokenizer.bin\n");