Skip to content

File detection Problem at Huggingface Private Repository #1905

@ShivamDhawan330

Description

@ShivamDhawan330

Have fine-tuned a PHI-3 model on a particular dataset and saved it on huggingface private repository. Since the model is sharded, it has model.safetensors.index.json along with it.

Now when all the files are uploaded using git, an observation is made that .safetensors files have a stack icon beside them, reflecting that even model.safetensors.index.json is considered as safetensors file.

When the file name is even bit modified like model.Safetensors.index.json then the icon will go away, confirming the above mentioned assumption.

Now the problem is that transformers library are very specific with file naming convention.

Tried multiple ways already, like avoiding using lfs for .json file during git Or even specifically mentioning (model.safetensors.index.json text eol=lf) in the gitattribute file. Still the same error:

So Not able to work with the uploaded fine tuned model even the same model and app is working perfectly fine locally.

When tried running app locally and trying to access model present on huggingface repository, then came to know about this error.

Error: Error no file named model.safetensors found in directory ShivamDhawan330/phi3_Quote
_Generator.

Repository: https://huggingface.co/ShivamDhawan330/phi3_Quote_Generator/tree/main

App: https://huggingface.co/spaces/ShivamDhawan330/Quote_Generator

Regular naming Convention : model.safetensors.index.json (Stack Icon)

Image

Changed naming Convention : model.Safetensors.index.json (No Stack Icon)

Image

ERROR RUNNING MODEL FROM HUGGINGFACE REPOSITORY WHILE ACCESSING APP LOCALLY

Image

MODEL AND APP RUNNING SUCCESSFULLY WHILE RUNNING LOCALLY

Image

ERROR RUNNING MODEL FROM HUGGINGFACE REPOSITORY WHILE ACCESSING APP ON HUGGINGFACE SPACE

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions