Cannot test the models

#1
by nicholasKluge - opened

Hi there,

I'm having trouble loading the Granite models.

Here's the Colab snippet I'm using with transformers==4.44.2:

from transformers import AutoModelForCausalLM, AutoTokenizer
device = "auto"
model_path = "ibm-granite/granite-3.0-2b-base"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)

# >>> ValueError: The checkpoint you are trying to load has model type `granite`, but Transformers does not recognize this architecture. This could be due to an issue with the checkpoint or an outdated version of Transformers.

Has GraniteMoeForCausalLM or GraniteForCausalLM been integrated into Transformers yet? If not, are there any workarounds available?

Thanks!

IBM Granite org
edited Oct 23

Hi @nicholasKluge ! Support for Granite was added in transformers 4.45.0, I suggest you upgrade to the latest version (4.45.2) if you can :)

nicholasKluge changed discussion status to closed

Sign up or log in to comment