-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I downloaded E1 files from HF and used them as following:
AutoModelForMaskedLM.from_pretrained(
'/DOWNLOAD_PATH/Synthyra_Profluent-E1-600M',
trust_remote_code=True,
local_files_only=True
)
However, this causes re-download of tokenizer files (even if I request only local files).
The issue is that when tokenizer file is sought after, the current execution path rather than the path given to the AutoModel is used:
FastPLMs/e1_fastplms/modeling_e1.py
Line 760 in 393bf2c
| fname = os.path.join(os.path.dirname(__file__), "tokenizer.json") |
Thus the file is not found as it is sought in my code execution directory and not the directory with the model.
This is the output of the above command (I added print statement of the inferred tokenizer file from the above line)
Compiling flex attention
Fetching 7 files: 100%|██████████| 7/7 [00:00<00:00, 13148.29it/s]
[/CWD/.cache/huggingface/modules/transformers_modules/Synthyra_Profluent-E1-600M/tokenizer.json](https://file+.vscode-resource.vscode-cdn.net/CWD/.cache/huggingface/modules/transformers_modules/Synthyra_Profluent-E1-600M/tokenizer.json)
E1 Tokenizer not found in local directory, downloading from Hugging Face
[/CWD/.cache/huggingface/modules/transformers_modules/Synthyra_Profluent-E1-600M/tokenizer.json](https://file+.vscode-resource.vscode-cdn.net/CWD/.cache/huggingface/modules/transformers_modules/Synthyra_Profluent-E1-600M/tokenizer.json)
E1 Tokenizer not found in local directory, downloading from Hugging Face
[/CWD/.cache/huggingface/modules/transformers_modules/Synthyra_Profluent-E1-600M/tokenizer.json](https://file+.vscode-resource.vscode-cdn.net/CWD/.cache/huggingface/modules/transformers_modules/Synthyra_Profluent-E1-600M/tokenizer.json)
E1 Tokenizer not found in local directory, downloading from Hugging Face
[/CWD/cache/huggingface/modules/transformers_modules/Synthyra_Profluent-E1-600M/tokenizer.json](https://file+.vscode-resource.vscode-cdn.net/CWD/.cache/huggingface/modules/transformers_modules/Synthyra_Profluent-E1-600M/tokenizer.json)
E1 Tokenizer not found in local directory, downloading from Hugging Face
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels