pytorch / torchchat

Run PyTorch LLMs locally on servers, desktop and mobile
BSD 3-Clause "New" or "Revised" License
3.3k stars 211 forks source link

[FEATURE REQUEST] Could not find... Probably missing HF token/login, but if so we might indicate? #740

Closed mikekgfb closed 2 months ago

mikekgfb commented 5 months ago

(base) mikekg@mikekg-mbp torchchat % python3 torchchat.py generate llama3 --device cpu --compile Downloading meta-llama/Meta-Llama-3-8B-Instruct from HuggingFace... Converting meta-llama/Meta-Llama-3-8B-Instruct to torchchat format... known configs: ['13B', '70B', 'CodeLlama-7b-Python-hf', '34B', 'stories42M', '30B', 'stories110M', '7B', 'stories15M', 'Mistral-7B', 'Meta-Llama-3-8B'] Model config {'block_size': 2048, 'vocab_size': 128256, 'n_layers': 32, 'n_heads': 32, 'dim': 4096, 'hidden_dim': 14336, 'n_local_heads': 8, 'head_dim': 128, 'rope_base': 500000.0, 'norm_eps': 1e-05, 'multiple_of': 1024, 'ffn_dim_multiplier': 1.3, 'use_tiktoken': True, 'max_seq_length': 8192} Traceback (most recent call last): File "/Users/mikekg/m14/torchchat/torchchat.py", line 143, in check_args(args, "generate") File "/Users/mikekg/m14/torchchat/cli.py", line 39, in check_args download_and_convert(args.model, args.model_directory, args.hf_token) File "/Users/mikekg/m14/torchchat/download.py", line 91, in download_and_convert _download_hf_snapshot(model_config, temp_dir, hf_token) File "/Users/mikekg/m14/torchchat/download.py", line 55, in _download_hf_snapshot convert_hf_checkpoint( File "/Users/mikekg/miniconda3/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/Users/mikekg/m14/torchchat/build/convert_hf_checkpoint.py", line 60, in convert_hf_checkpoint raise RuntimeError( RuntimeError: Could not find /Users/mikekg/.torchchat/model-cache/downloads/meta-llama/Meta-Llama-3-8B-Instruct/pytorch_model.bin.index.json or /Users/mikekg/.torchchat/model-cache/downloads/meta-llama/Meta-Llama-3-8B-Instruct/original/consolidated.00.pth plus /Users/mikekg/.torchchat/model-cache/downloads/meta-llama/Meta-Llama-3-8B-Instruct/original/tokenizer.model

Jack-Khuu commented 2 months ago

Same vein as https://github.com/pytorch/torchchat/issues/782