So I am retraining a whisper model and have it saved in a certain path (model_name_or_path
).
When I want to push it to the hub I sometimes get a [Errno 13] Permission denied
I can push the adapter but not the model.
PermissionError: [Errno 13] Permission denied: '4STest\\DataSize02AudioModel-medium'
I would like to push to trained_model_repo ='4STest/DataSize02AudioModel-medium'
If I change the repo to ''4STest/lol''
there is no problem…
Can anyone explain this?
My code looks as follows:
model = WhisperForConditionalGeneration.from_pretrained(model_name_or_path,load_in_8bit=False, device_map="auto")
model = PeftModel.from_pretrained(
model,
adapter_to_push,
)
#push adapter
model.push_to_hub(trained_adapter_repo,private=True)
#save model
model = model.merge_and_unload()
model.save_pretrained(trained_model_repo)
processor.save_pretrained(trained_model_repo)
#push model
model.push_to_hub(trained_model_repo,safe_serialization=True,private=True)
processor.push_to_hub(trained_model_repo,private=True)
Variables:
model_name_or_path="openai/whisper-medium"
adapter_to_push="./4STest/DA_model_partial_DS02medium/checkpoint-9"
trained_adapter_repo="4STest/DataSize02AudioAdapter-medium"
trained_model_repo="4STest/DataSize02AudioModel-medium"
Alternative trained_model_repo="4STest/lol"
works just fine.
Any help is appreciated.