KeyError: 'hidden_size'

#6
by willu - opened

Hi,

I'm trying to use this with text-generation-webui, but unfortunately I'm getting the following:

 
2 INFO     Loading TheBloke_phi-2-GPTQ
 !! Warning, unknown architecture ['PhiForCausalLM']
 !! Loading as LlamaForCausalLM

ERROR    Failed to load the model.
Traceback (most recent call last):
  File "~/git/text-generation-webui/modules/ui_model_menu.py", line 213, in load_model_wrapper
    shared.model, shared.tokenizer = load_model(selected_model, loader)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/git/text-generation-webui/modules/models.py", line 87, in load_model
    output = load_func_map[loader](model_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/git/text-generation-webui/modules/models.py", line 389, in ExLlamav2_HF_loader
    return Exllamav2HF.from_pretrained(model_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/git/text-generation-webui/modules/exllamav2_hf.py", line 162, in from_pretrained
    config.prepare()
  File "~/git/text-generation-webui/installer_files/env/lib/python3.11/site-packages/exllamav2/config.py", line 150, in prepare
    self.hidden_size = read_config["hidden_size"]
                       ~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'hidden_size'

Many thanks for any help, and all your amazing work!!

@willu you cant use phi with exllamav2 yet i believe. you have to use transformers or auto gptq(im not sure if autogptq has support yet but transformers does)

Thanks for the info @YaTharThShaRma999 , I've been following https://huggingface.co/TheBloke/phi-2-GPTQ#in-text-generation-webui, but it would appear to not currently work.

@willu yeah theblokess information just tells you how to load the model but not what loader to choose in text generation web ui. You have to select transformers as the loader

Many thanks for your help @YaTharThShaRma999 , can confirm these settings worked for me:

image.png

willu changed discussion status to closed

Sign up or log in to comment