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

Issue Downloading SmartEdit-7B Checkpoint: Missing config.json #43

Open
naajeehxe opened this issue Nov 20, 2024 · 0 comments
Open

Issue Downloading SmartEdit-7B Checkpoint: Missing config.json #43

naajeehxe opened this issue Nov 20, 2024 · 0 comments

Comments

@naajeehxe
Copy link

Thank you for your remarkable work on this project!

I am currently trying to download the checkpoint for SmartEdit-7B using the following code:

from transformers import AutoTokenizer, AutoModelForCausalLM

cache_dir = "/home/jeehye/2024-2/AAA740-2024/jeehye/SmartEdit/checkpoints"

tokenizer = AutoTokenizer.from_pretrained("TencentARC/SmartEdit-7B", cache_dir=cache_dir, force_download=True)
model = AutoModelForCausalLM.from_pretrained("TencentARC/SmartEdit-7B", cache_dir=cache_dir, force_download=True)

However, I encountered an error indicating that the config.json file is missing in the Hugging Face repository:

Traceback (most recent call last):
  File "/hub_data2/jeehye/checkpoints/load_ckpt.py", line 8, in <module>
    tokenizer = AutoTokenizer.from_pretrained("TencentARC/SmartEdit-7B", cache_dir=cache_dir, force_download=True)
  File "/home/jeehye/.conda/envs/smart/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 657, in from_pretrained
    config = AutoConfig.from_pretrained(
  File "/home/jeehye/.conda/envs/smart/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 916, in from_pretrained
    config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/jeehye/.conda/envs/smart/lib/python3.10/site-packages/transformers/configuration_utils.py", line 573, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/jeehye/.conda/envs/smart/lib/python3.10/site-packages/transformers/configuration_utils.py", line 628, in _get_config_dict
    resolved_config_file = cached_file(
  File "/home/jeehye/.conda/envs/smart/lib/python3.10/site-packages/transformers/utils/hub.py", line 454, in cached_file
    raise EnvironmentError(
OSError: TencentARC/SmartEdit-7B does not appear to have a file named config.json. Checkout 'https://huggingface.co/TencentARC/SmartEdit-7B/main' for available files.

As I’m new to Hugging Face, I’d greatly appreciate your guidance on resolving this issue or any additional steps needed to load the checkpoint successfully.

Thank you for your time and support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant