Open Sosycs opened 6 months ago
I have also downloaded llama 7B wights and when I try to covert to hf I got the error:
You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama_fast.LlamaTokenizerFast'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565
You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565
Saving a LlamaTokenizerFast to /content/llama_7b.
Fetching all parameters from the checkpoint at /content/llama_7b.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/transformers/models/llama/convert_llama_weights_to_hf.py", line 407, in <module>
main()
File "/usr/local/lib/python3.10/dist-packages/transformers/models/llama/convert_llama_weights_to_hf.py", line 396, in main
write_model(
File "/usr/local/lib/python3.10/dist-packages/transformers/models/llama/convert_llama_weights_to_hf.py", line 178, in write_model
f"model.layers.{layer_i}.self_attn.k_proj.weight": permute(
File "/usr/local/lib/python3.10/dist-packages/transformers/models/llama/convert_llama_weights_to_hf.py", line 154, in permute
return w.view(n_heads, dim1 // n_heads // 2, 2, dim2).transpose(1, 2).reshape(dim1, dim2)
RuntimeError: shape '[32, 2, 2, 4096]' is invalid for input of size 16777216
AttributeError: 'NoneType' object has no attribute 'from_pretrained'
I also have this problem now,did u solve it?
Thank you for such work!
I have been trying to use the Library for image captioning. by follwoing the instructions in @ouhenio comment on this thread: https://github.com/salesforce/LAVIS/issues/313
I am using google colab pro and did the follwoing:
next: installed Fastchat using:
Then,
!python3 -m fastchat.serve.cli --model-path lmsys/vicuna-7b-v1.5
at last, I installed Lavis:
after that I changed the line in "blip2_instruct_vicuna7b.yaml" into:
path to Vicuna checkpoint
llm_model: "lmsys/vicuna-7b-v1.5"
then I used the code:
and got the error:
what am I missing? is it the folder I download the llama2 toknizer? or the path to the Vicuna checkpoint?