Skip to content
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

Which version of transformers is it? Please download it below #1

Open
zhangzai666 opened this issue Mar 15, 2023 · 7 comments
Open

Comments

@zhangzai666
Copy link

AttributeError: module transformers has no attribute LLaMATokenizer Thanks

@windprak
Copy link

Same problem here although I used the right version: pip install git+https://github.com/huggingface/transformers.git@refs/pull/21955/merge

@windprak
Copy link

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!

@treadon
Copy link
Owner

treadon commented Mar 15, 2023

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

@zhangzai666
Copy link
Author

Ok, I really appreciate your answer

@compadrejavo
Copy link

compadrejavo commented Mar 16, 2023

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

@pratiknexsol
Copy link

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

@Anvil-Late
Copy link

Anvil-Late commented Mar 27, 2023

@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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants