Error downloading the model

#1
by inkognito1982 - opened

I am trying to download this model directly just to play around with it before using the entire optillm repo.
I tried

model_id = 'codelion/optillm-bert-uncased'
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, cache_dir = model_path , use_auth_token=True)

But I get an error:

 File "E:\venvs\Reasoning\Lib\site-packages\transformers\modeling_utils.py", line 3997, in from_pretrained
    if metadata.get("format") == "pt":
       ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

What am I doing wrong?

I have only uploaded the safetensors version of the model. You will need to use the load_model method from from safetensors.torch import load_model method to load it.

I added some more details in the model card to show how to use it here.

Let me know if you still run into issues.

Sign up or log in to comment