Error loading model
I'm trying to load the model on a mac m1 laptop and hit a key error using the example script from the model card:
in PreTrainedModel._load_pretrained_model(cls, model, state_dict, loaded_keys, resolved_archive_file, pretrained_model_name_or_path, ignore_mismatched_sizes, sharded_metadata, _fast_init, low_cpu_mem_usage, device_map, offload_folder, offload_state_dict, dtype, hf_quantizer, keep_in_fp32_modules, gguf_path, weights_only)
4701 else:
4702 weight_map = {p: os.path.join(folder, f) for p, f in sharded_metadata["weight_map"].items()}
4703 offload_index = {
4704 p[len(start_prefix) :]: {"safetensors_file": f, "weight_name": p, "dtype": str_dtype}
4705 for p, f in weight_map.items()
-> 4706 if p.startswith(start_prefix) and param_device_map[p[len(start_prefix) :]] == "disk"
4707 }
4708 else:
4709 offload_index = None
KeyError: 'lm_head.weight'
Transformers version:
transformers==4.48.2