llama-7b-example
llama-7b-example copied to clipboard
Which version of transformers is it? Please download it below
AttributeError: module transformers has no attribute LLaMATokenizer Thanks
Same problem here although I used the right version: pip install git+https://github.com/huggingface/transformers.git@refs/pull/21955/merge
Apparently they have a typo in their code the second L should be lowercase:
tokenizer = transformers.LlamaTokenizer.from_pretrained("decapoda-research/llama-7b-hf")
model = transformers.LlamaForCausalLM.from_pretrained("decapoda-research/llama-7b-hf").to(device)
Install this: pip install git+https://github.com/huggingface/transformers.git@refs/pull/21955/merge and pip install sentencepiece and it will work!
Hmm, I don't see a case typo... also the launch.ps1 should have installed that merge and sentence piece, if it does fail you are correct:
pip install git+https://github.com/huggingface/transformers.git@refs/pull/21955/merge pip install sentencepiece
Ok, I really appreciate your answer
Was the hugginface repo deleted? I'm getting this error:
Collecting git+https://github.com/huggingface/transformers.git@refs/pull/21955/merge
Cloning https://github.com/huggingface/transformers.git (to revision refs/pull/21955/merge) to /tmp/pip-req-build-c5eeph2t
Running command git clone -q https://github.com/huggingface/transformers.git /tmp/pip-req-build-c5eeph2t
WARNING: Did not find branch or tag 'refs/pull/21955/merge', assuming revision or ref.
Running command git fetch -q https://github.com/huggingface/transformers.git refs/pull/21955/merge
fatal: couldn't find remote ref refs/pull/21955/merge
EDIT:
I fixed it changing
pip install git+https://github.com/huggingface/transformers.git@refs/pull/21955/merge
into
pip install git+https://github.com/huggingface/transformers.git@refs/pull/22209/merge
issue with cloning hugging face repo getting this error need some help on this
Collecting git+https://github.com/huggingface/transformers.git@refs/pull/22209/merge Cloning https://github.com/huggingface/transformers.git (to revision refs/pull/22209/merge) to /tmp/pip-req-build-91o7xgyr Running command git clone --filter=blob:none --quiet https://github.com/huggingface/transformers.git /tmp/pip-req-build-91o7xgyr WARNING: Did not find branch or tag 'refs/pull/22209/merge', assuming revision or ref. Running command git fetch -q https://github.com/huggingface/transformers.git refs/pull/22209/merge fatal: couldn't find remote ref refs/pull/22209/merge
@pratiknexsol
Try this :
pip install git+https://github.com/huggingface/transformers.git
Then on src/llama.py
Then replace :
-
transformers.LLaMATokenizer->transformers.LlamaTokenizer -
and
LLaMAForCausalLM->LlamaForCausalLM
Does this fix your problem ?