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

can't load 8B llava model #6065

Open
1 task done
end-me-please opened this issue May 28, 2024 · 2 comments
Open
1 task done

can't load 8B llava model #6065

end-me-please opened this issue May 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@end-me-please
Copy link

Describe the bug

Unable to load 8B llava model:
https://huggingface.co/xtuner/llava-llama-3-8b-v1_1-transformers

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

  1. apply fix from Bug fixes for llava multimodal #5038
  2. try loading the model
  3. AssertionError: Padding_idx must be within num_embeddings

Screenshot

No response

Logs

Traceback (most recent call last):
  File "D:\text-generation-webui\modules\ui_model_menu.py", line 249, in load_model_wrapper
    shared.model, shared.tokenizer = load_model(selected_model, loader)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\text-generation-webui\modules\models.py", line 94, in load_model
    output = load_func_map[loader](model_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\text-generation-webui\modules\models.py", line 363, in GPTQ_loader
    model = modules.GPTQ_loader.load_quantized(model_name)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\text-generation-webui\modules\GPTQ_loader.py", line 144, in load_quantized
    model = load_quant(str(path_to_model), str(pt_path), shared.args.wbits, shared.args.groupsize, kernel_switch_threshold=threshold)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\text-generation-webui\modules\GPTQ_loader.py", line 34, in _load_quant
    model = AutoModelForCausalLM.from_config(config, trust_remote_code=shared.args.trust_remote_code)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\text-generation-webui\installer_files\env\Lib\site-packages\transformers\models\auto\auto_factory.py", line 437, in from_config
    return model_class._from_config(config, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\text-generation-webui\installer_files\env\Lib\site-packages\transformers\modeling_utils.py", line 1401, in _from_config
    model = cls(config, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^
  File "D:\text-generation-webui\installer_files\env\Lib\site-packages\transformers\models\llama\modeling_llama.py", line 1138, in __init__
    self.model = LlamaModel(config)
                 ^^^^^^^^^^^^^^^^^^
  File "D:\text-generation-webui\installer_files\env\Lib\site-packages\transformers\models\llama\modeling_llama.py", line 925, in __init__
    self.embed_tokens = nn.Embedding(config.vocab_size, config.hidden_size, self.padding_idx)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\text-generation-webui\installer_files\env\Lib\site-packages\torch\nn\modules\sparse.py", line 134, in __init__
    assert padding_idx < self.num_embeddings, 'Padding_idx must be within num_embeddings'
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Padding_idx must be within num_embeddings

System Info

win10, CPU: 5700x, GPU: RTX 4070ti super
@end-me-please end-me-please added the bug Something isn't working label May 28, 2024
@Tedy50
Copy link

Tedy50 commented Jun 2, 2024

I think this multimodal pipeline is not supported yet
but it wud be nice to see it implemented.
GGUF format also already supports multimodal pipelines
exllama seems to be missing support yet

@Touch-Night
Copy link
Contributor

If you use llama.cpp's multimodal support, you cannot have custom prompt template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants