-
Notifications
You must be signed in to change notification settings - Fork 11.8k
convert.py
: --pad-vocab not working with SPM, 'SentencePieceVocab' object has no attribute 'added_tokens_dict'. Did you mean: 'added_tokens_list'?
#4958
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
Comments
I've got another issue with the same model. This is not directly related to the SPM issue, but I believe might be related to the As the SPM convert wasn't working, I made the TigerResearch model using the HFFT conversion, like so:
This ran successfully. But the resulting FP16 cannot be used:
The AWQ has completed and runs fine, so the source model appears fine. If I'm understanding correctly, it looks like Here is the top of the logs from
Note But then on running main:
Now it shows So maybe the |
same problem here as problem 2: llama_model_load: error loading model: _Map_base::at
llama_load_model_from_file: failed to load model
llama_init_from_gpt_params: error: failed to load model '/home/manuel/base_190k-GGUF/base_190k.Q4_K_M.gguf'
main: error: unable to load model |
same error here |
There's a potentially related issue when converting the https://huggingface.co/ise-uiuc/Magicoder-DS-6.7B model: |
Please check if #4971 resolves the original issue. However, notice that there seems to be something wrong with this model - |
Conversion with --pad-vocab works for me now. The converted Magicoder-DS still generates garbage, but that's potentially a separate issue. |
@ggerganov Thanks for the fix, I can confirm that this model now converts in both SPM and HFFT tokenisation modes. Regarding:
It's not uncommon for models to require a larger vocab than they provide tokens for. Some model trainers do this deliberately, so as to increase the vocab size to an amount which is equally divisible for tensor parallelism. I don't know if that's the case here or if this one is just a mistake, but in any case it's fairly common to see this mismatch, which is why I originally asked for The extra tokens are no issue with Transformers models, but of course breaks llama.cpp, so we need the workaround of adding extra dummy tokens. FYI with your fix, we now seem to have a bit of a duplication / re-definition of the extra tokens added:
The Doesn't really matter as it now works fine, and it doesn't matter what the extra tokens are called, but I thought I'd highlight that discrepancy for a future patch. Thanks very much for the fix! |
Thanks for the feedback! Yup, the implementation is probably not great - I will revisit tomorrow and see if I can improve it and avoid this duplication |
Hi guys
I've just noticed that since the recent
convert.py
refactor, the new--pad-vocab
feature does not work with SPM vocabs. It does work as expected with HFFT. EDIT: actually there might be a different bug with HFFT, see next post on that.Example command, converting model: https://huggingface.co/TigerResearch/tigerbot-13b-chat-v5
Error message:
In this example, I did the conversion with
--vocab-type hfft
instead which worked OK.Thanks in advance for looking at this.
The text was updated successfully, but these errors were encountered: