SmartEdit
SmartEdit copied to clipboard
Issue Downloading SmartEdit-7B Checkpoint: Missing config.json
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!
SmartEdit
did you make it?I meet the same problem