# Line 368ifcache_dirisNone:cache_dir=TRANSFORMERS_CACHEifisinstance(cache_dir,Path):cache_dir=str(cache_dir) 这个变量在hub.py开头被导入: # line 93# Determine default cache directory. Lots of legacy environment variables to ensure backward compatibility.# The best way to set the cache path is...
query_length, key_length = query_layer.shape[2], key_layer.shape[2] if use_cache: position_ids_l = torch.tensor(key_length - 1, dtype=torch.long, device=hidden_states.device).view( -1, 1 ) else: position_ids_l = torch.arange(query_length, dtype=torch.long, device=hidden_states....
if last_checkpoint is None and len([i for i in os.listdir(training_args.output_dir) if not i.endswith("log")]) > 0: raise ValueError(f"Output directory ({training_args.output_dir}) already exists and is not empty. " "Use --overwrite_output_dir to overcome.") elif last_checkpoint...
Owner Sanster commented Oct 29, 2022 looks like it‘s controlled by HF_HOME environment variable https://github.com/huggingface/diffusers/blob/d37f08da723cba38965b2df8b21a8136af9f358f/src/diffusers/utils/__init__.py#L58 👍 6 ️ 2 🚀 1 Tobe2d commented Oct 29, 2022 Is there...
huggingface_hub.utils._errors.LocalEntryNotFoundError: Connection error, and we cannot find the requested files in the disk cache. Please try again or make sure your Internet connection is on. During handling of the above exception, another exception occurred: ...
model.save_pretrained("directory_on_my_computer")# 会生成两个文件:config.json pytorch_model.bin Tokenizer transformer模型使用的分词方法,往往不是直接的word-level分词或者char-level分词。 前者会让词表过大,后者则表示能力很低。 因此主流的方式是进行subword-level的分词。例如对 "tokenization" 这个词,可能...
hexiaojin1314changed the titleNo such file or directory: '/root/.cache/huggingface/modules/transformers_modules/chatglm-6b/configuration_chatglm.py'[BUG/Help] May 16, 2023 Author 应该是环境问题,我换了个performance版本就不报这个错误了 transformers...
将hugging face的权重下载到本地,然后我们之后称下载到本地的路径为llama_7b_localpath 【
OSError: Can't load tokenizer for'bert-base-chinese'. If you were trying to load it from'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'bert-base-chinese' is the correct path to a directory containing all relevant...
Args: cache_dir (`str`, *optional*): Directory to cache data. config_name (`str`, *optional*): Name of the dataset configuration. It affects the data generated on disk: different configurations will have their own subdirectories and versions. If not provided, the default configuration is ...