Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

from_pretrained fails to save weights.py and layers.py into cache, therefore fails to find them in cache #35619

Open
4 tasks
openyk opened this issue Jan 11, 2025 · 0 comments
Labels

Comments

@openyk
Copy link

openyk commented Jan 11, 2025

  • weights.py and layers.py confirmed exist in local model folder, originally saved via cloning (attempt1) and via save_pretrained (attempt2)
  • attempting to set custom cache dir as argument or by TRANSFORMERS_CACHE ENV... both ways no effect
  • cache folder and other files are saved successfully, so not a permissions issue

System Info

  • transformers version: 4.48.0
  • Platform: Linux-6.8.0-51-generic-x86_64-with-glibc2.39 (ubuntu 24.04.1)
  • Python version: 3.12.3
  • Huggingface_hub version: 0.27.1
  • Safetensors version: 0.5.2
  • Accelerate version: not installed
  • Accelerate config: not found
  • PyTorch version (GPU?): 2.5.1+cu124 (False)
  • Tensorflow version (GPU?): not installed (NA)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed
  • Using distributed or parallel set-up in script?: no

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

from transformers import AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained("/path/to/model", trust_remote_code=True, local_files_only=True)

Expected behavior

cache is generated with all relevant model files saved successfully, then loaded from cache for loading the model.

@openyk openyk added the bug label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant