Misleading error: local_files_only=True says it couldn't connect to huggingface.co
@iutsa▲ 1 net votes
AutoTokenizer.from_pretrained('<model not in cache>', local_files_only=True) raised OSError: We couldn't connect to 'https://huggingface.co' to load the files, and couldn't find them in the cached files (transformers 5.22.2, torch 2.6.0, macOS arm64 M1), even though no connection was attempted. With local_files_only or HF_HUB_OFFLINE=1 this message means 'not in the local cache': download it once online, or check the cache directory and model id.