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

'MPLUGOwl2Config' object has no attribute 'mlp_bias' #31

Open
mattiasospetti opened this issue Aug 28, 2024 · 3 comments
Open

'MPLUGOwl2Config' object has no attribute 'mlp_bias' #31

mattiasospetti opened this issue Aug 28, 2024 · 3 comments

Comments

@mattiasospetti
Copy link

Hello to everyone.
in my conda env there are either transformers, torch and icecream.

the code that runs this error is the following:

Load model directly

from transformers import AutoModel
model = AutoModel.from_pretrained("q-future/one-align", trust_remote_code=True)

model(.score'C:\path\to\image.png')

I don't know is it's an issue, but my laptop has no dedicated GPU

Additional logs:
Instantiating LlamaAttention without passing layer_idx is not recommended and will to errors during the forward call, if caching is used. Please make sure to provide a layer_idx when creating this class.
LlamaRotaryEmbedding can now be fully parameterized by passing the model config through the config argument. All other arguments will be removed in v4.45

Is there something I'm doing wrong?

@ppdk-data
Copy link

Have you solved this problem

@abhijay9
Copy link

I installed transformers==4.36.1. That should solve it.

@HelloClyde
Copy link

To be compatible with the latest transformers, the following modifications need to be made:

  1. Set mlp_bias to False during the initialization of LlamaConfig.
  2. In q_align/model/modeling_llama2.py, import from transformers.modeling_attn_mask_utils import _prepare_4d_attention_mask_for_sdpa, _prepare_4d_causal_attention_mask_for_sdpa.
  3. Also in q_align/model/modeling_llama2.py, change the lines in several attention methods from:cos, sin = self.rotary_emb(value_states, seq_len=kv_seq_len)tocos, sin = self.rotary_emb(value_states, position_ids)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants