randaller / llama-chat

Chat with Meta's LLaMA models at home made easy
GNU General Public License v3.0
833 stars 118 forks source link

why does this happen? #4

Closed breadbrowser closed 1 year ago

breadbrowser commented 1 year ago

PS F:\downloads\llama-chat-main\llama-chat-main> python3.7 merge-weights.py --input_dir F:\Downloads\LLaMA --model_size 13B Traceback (most recent call last): File "merge-weights.py", line 168, in main() File "merge-weights.py", line 163, in main model_size=args.model_size, File "merge-weights.py", line 95, in write_model f"layers.{layer_i}.ffn_norm.weight": loaded[0][f"layers.{layer_i}.ffn_norm.weight"], TypeError: unsupported operand type(s) for |=: 'dict' and 'dict'

nazthelizard122 commented 1 year ago

Same issue

I've tried on python 3.8 and 3.11, I don't think the versions matter much Attempted to troubleshoot with chatGPT's advice to no avail

breadbrowser commented 1 year ago

python 3.8.10 fixed it for me.

now i just need 317214720 bytes more of memory.

nazthelizard122 commented 1 year ago

I'm on Mac, conda cant find 3.8.10

Chting commented 1 year ago

The merge (|) and update (|=) operators of the dictionary were introduced in Python 3.9

tkone2018 commented 1 year ago

@breadbrowser i also met the error,how can i do?

randaller commented 1 year ago

Use python 3.9 or higher. There is 3.10 version noted in example.

breadbrowser commented 1 year ago

Use python 3.9 or higher. There is 3.10 version noted in example.

I was wrong, he is right python 3.10 fixed it for me