You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I m following the code in "Llama 3.2 Vision Finetuning Unsloth - Radiography.ipynb" for finetuning on my dataset.
but after pushing the merged model to hugging face I got the error when trying to load it:
/usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py:3491: FutureWarning: The `use_auth_token` argument is deprecated and will be removed in v5 of Transformers. Please use `token` instead.
warnings.warn(
Unused kwargs: ['quant_method']. These kwargs are not used in <class 'transformers.utils.quantization_config.BitsAndBytesConfig'>.
`low_cpu_mem_usage` was None, now default to True since model is quantized.
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
[<ipython-input-2-01d76ccf350d>](https://localhost:8080/#) in <cell line: 4>()
2 from transformers import MllamaForConditionalGeneration
3
----> 4 model, tokenizer = MllamaForConditionalGeneration.from_pretrained("Hessa/llama3.2_10k", use_auth_token="hf_***", torch_dtype=torch.float16) #torch_dtype=torch.bfloat16
[/usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py](https://localhost:8080/#) in from_pretrained(cls, pretrained_model_name_or_path, config, cache_dir, ignore_mismatched_sizes, force_download, local_files_only, token, revision, use_safetensors, weights_only, *model_args, **kwargs)
3927 )
3928 else:
-> 3929 raise EnvironmentError(
3930 f"{pretrained_model_name_or_path} does not appear to have a file named"
3931 f" {_add_variant(WEIGHTS_NAME, variant)}, {_add_variant(SAFE_WEIGHTS_NAME, variant)},"
OSError: Hessa/llama3.2_10k does not appear to have a file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt or flax_model.msgpack.
The text was updated successfully, but these errors were encountered:
Yeah that is because the merged model in missing this file: model.safetensors.index.json. That is what i saw when i compared the saved model with the original models that are already out there. You can load from LoRA adapter and merge and try that will work. The last code solution I provided in this issue: #1492 (comment). Try that.
@garg-aayush@mosama1994@hessaAlawwad Much apologies on the delay - I'm currently working on refactoring code to make Unsloth more resilient on saving vision models to 16bit - I'm currently tracking the issue here: #1559
Hello, I m following the code in "Llama 3.2 Vision Finetuning Unsloth - Radiography.ipynb" for finetuning on my dataset.
but after pushing the merged model to hugging face I got the error when trying to load it:
The text was updated successfully, but these errors were encountered: