Closed AllanOricil closed 3 months ago
error can be fixed by installing the correct snowflake transformers pip install git+https://github.com/Snowflake-Labs/transformers.git@arctic
and then also install , as the llama's conditional causes this error
pip install sentencepiece
pip install tokenizers
@karthik-nexusflow better to add this information here because beginners like me may try to install the official hugging face transformers package instead of the fork one, which will lead to this issue
@AllanOricil, with trust_remote_code=True
this should be working with public/official transformers>=4.39.0
. I am testing this now in a fresh/clean environment with the version you list git+https://github.com/huggingface/transformers@9fe3f585bb4ea29f209dc705d269fbe292e1128f
and I'm not able to reproduce this error for some reason :(
When did you download the weights? If you are running in an offline mode and downloaded them more than 5 days ago then trust_remote_code=True
won't work and might produce this issue? This PR is what should be getting around installing the transformers fork: https://huggingface.co/Snowflake/snowflake-arctic-instruct/commit/f4ca7904b66a80b6f62d6272253ea1e32375ddd6
The core issue is confusing me though, it's saying you can't import the LlamaTokenizer
but this should be available in transformers for a while now well before Arctic was introduced.
@jeffra I don't even know where to use that trust variable. Is that when I run python3 script.py
? I really have no experience with python so pardon me for noob questions 😅
I just copied the simple example, created a virtual env, installed transformers 4.39.0 and deepspeed 0.14.2, then I tried to run the script with python 3, and it did not work. Got the same error that led me to open this issue.
Then I decided to go to hugging face transformers repo to get the latest release of their package, updated my virtual env with it, tried to run the code again, and again the same issue happened. Then I opened this issue here.
To get the list of dependencies I ran a command called freeze.
I have also not download any weights. Isn't that suppose to happen automatically when I ran that example code?
Another question. Can I run this on a M2 Max with 32Gb ram in AWS? This was my plan 😀
We had another user run into this same issue wrt LlamaTokenizer
. It appears there's a dependency on sentencepiece
for this tokenizer. I've updated the requirements.txt file for inference to #25 to address this going forward.
@AllanOricil wrt to M2 Max, it's not on our exact roadmap but i believe this support was recently added in llama.cpp! :) https://github.com/ggerganov/llama.cpp/pull/7020
Closing issue for now as i think the main issue is now resolved.
I will give it another chance
I tried the minimum example from https://huggingface.co/Snowflake/snowflake-arctic-instruct and it did not work. Can you help me to fix it?
Im using the latest trasnformers release commit.
snowflake-arctic-instruct.py
requirements.txt