huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
135.47k stars 27.11k forks source link

pretrained_model_name_or_path why not absolute path from / #34837

Closed suhjohn closed 4 days ago

suhjohn commented 5 days ago

Feature request

I don't understand why only relative paths are supported for pretrained_model_name_or_path.

Motivation

OSError: Incorrect path_or_model_id: '/models/colpaligemma-3b-pt-448-base'. Please provide either the path to a local folder or the repo_id of a model on the Hub.

Above is a stupid error that shouldn't happen.

Your contribution

No

qubvel commented 4 days ago

Hi @suhjohn! Can you please provide a code example to reproduce the error? Thanks

Rocketknight1 commented 4 days ago

Absolute paths are supported for this. You either made a mistake in the directory name, the directory doesn't contain a valid model for the class you're using, or you're using Unix-style paths on Windows.