InternVL icon indicating copy to clipboard operation
InternVL copied to clipboard

[Bug] Getting raise NotImplementedError for model.get_input_embeddings()

Open podyss opened this issue 1 year ago • 1 comments

Checklist

  • [X] 1. I have searched related issues but cannot get the expected help.
  • [X] 2. The bug has not been fixed in the latest version.
  • [X] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.

Describe the bug

Getting raise NotImplementedError for model.get_input_embeddings()

Reproduction

model = AutoModel.from_pretrained("OpenGVLab/InternVL2-2B", trust_remote_code=True) input_embeddings = model.get_input_embeddings()

Environment

Python: 3.11.9
torch: 2.4.0
transformers: 4.44.0

Error traceback

No response

podyss avatar Aug 16 '24 15:08 podyss

Hello, if you want to get input_embeddings for the language model, you can use model.language_model.get_input_embeddings().

czczup avatar Aug 26 '24 05:08 czczup