liltom-eth / llama2-webui

Run any Llama 2 locally with gradio UI on GPU or CPU from anywhere (Linux/Windows/Mac). Use `llama2-wrapper` as your local llama2 backend for Generative Agents/Apps.
MIT License
1.97k stars 202 forks source link

safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge #80

Closed HougeLangley closed 12 months ago

HougeLangley commented 12 months ago

Running python app.py

(llama2-webui) [09:10:56] houge (llama2-webui) ~/llama2-webui [main ●1…4]
$ python app.py                   
Running on GPU with backend torch transformers.
Loading checkpoint shards:   0%|                         | 0/2 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/home/houge/llama2-webui/app.py", line 418, in <module>
    main()
  File "/home/houge/llama2-webui/app.py", line 60, in main
    llama2_wrapper = LLAMA2_WRAPPER(
                     ^^^^^^^^^^^^^^^
  File "/home/houge/llama2-webui/llama2_wrapper/model.py", line 99, in __init__
    self.init_model()
  File "/home/houge/llama2-webui/llama2_wrapper/model.py", line 103, in init_model
    self.model = LLAMA2_WRAPPER.create_llama2_model(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/houge/llama2-webui/llama2_wrapper/model.py", line 146, in create_llama2_model
    model = AutoModelForCausalLM.from_pretrained(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/houge/llama2-webui/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 493, in from_pretrained
    return model_class.from_pretrained(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/houge/llama2-webui/lib/python3.11/site-packages/transformers/modeling_utils.py", line 2903, in from_pretrained
    ) = cls._load_pretrained_model(
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/houge/llama2-webui/lib/python3.11/site-packages/transformers/modeling_utils.py", line 3246, in _load_pretrained_model
    state_dict = load_state_dict(shard_file)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/houge/llama2-webui/lib/python3.11/site-packages/transformers/modeling_utils.py", line 447, in load_state_dict
    with safe_open(checkpoint_file, framework="pt") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge
[09:11:31] [cost 9.708s] python app.py
HougeLangley commented 12 months ago

image

HougeLangley commented 12 months ago

image

HougeLangley commented 12 months ago

image

HougeLangley commented 12 months ago

image

HougeLangley commented 12 months ago

Sorry for my module file, re-download will be fine.