-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when converting tokenizer from Mistral Large Instruct 2411: "Exception: Cannot resolve bosId or eosIds" #185
Comments
Hello @philigrale, I pushed a fix. I was able to convert the tokenizer for this model, but I haven't checked if it works with the converted model. |
Hello @b4rtaz, thank you very much for the quick reply and fix. I tried just now and the conversion works, thank you ! Unfortunately, when I run the model I get the following error:
these are my start arguments:
Here the full output:
Thank you. |
Thanks for checking it. Unfortunately, it seems that determining what is wrong requires more effort. Mistral is a low priority for now, so this problem will be addressed much later. |
Thanks, that's unfortunate to hear, I was looking forward to using this model. But thank you very much for your efforts ! |
The error comes from the vocabulary not being parsed correctly, which you can see from these 2 lines
This seems to be caused by the tokenizer expecting the bosid to separate the regular vocab from the special vocab. When the bosid is the first element of the vocab, this assumption does not hold so the vocab is not parsed correctly. This is fairly common and not especially linked to mistral. I had the same issue trying to run tinyllama. There is actually a TODO line about this in the code
|
Thank you for the explanation ! |
I patched the vocabulary parsing for my use case yesterday, it's not very pretty nor at all generic but it should work for you as well. You may also need to patch the token converter to handle byte tokens correctly. You may need to change the specialVocabSize which is currently hardcoded to 3 (for bos, eos and unk as the first 3 tokens). @b4rtaz I think it'd be reasonable to assume the special vocab precedes the regular vocab when |
Thanks, Although thank you very much for the diagnose of the problem. |
Hi,
I want to try this program because I love the concept. (I am using version 0.12.8)
I have already converted the Mistral Large Instruct 2411 into the model file, but when I want to convert the tokenizer, I get the following error:
I am not sure what is causing this. Did anyone else have this problem ?
Thanks a lot for any help !
The text was updated successfully, but these errors were encountered: