meta-llama / llama3

The official Meta Llama 3 GitHub site
Other
26.08k stars 2.92k forks source link

Unable to Download Meta Llama 3.1 Model Using Provided URL #313

Open AuthorDustin opened 1 month ago

AuthorDustin commented 1 month ago

Description: I have been trying to download the Meta Llama 3.1 model using the provided custom URL from the Meta AI website. Despite multiple attempts using both wget and curl commands, as well as testing the URL directly in a web browser, the download fails with either a “403 Forbidden” error or a “Missing Key-Pair-Id query parameter” error. The issue persists across different attempts and new URLs generated by Meta AI.

Minimal reproducible example

Example curl command used:

curl -o llama_model.zip "https://llama3-1.llamameta.net/?Policy=eyJTdGF0ZW1lbnQiOlt7InVuaXF1ZV9oYXNoIjoiamdzeW5wcmRjNmRrN3lvY2ZqeGxhc3NkIiwiUmVzb3VyY2UiOiJodHRwczpcL1wvbGxhbWEzLTEubGxhbWFtZXRhLm5ldFwvKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcyMjc4NDg4MX19fV19&Signature=gRROwDMaGPGQgGyBfYT%7Er0AaesfT4PIjGl9AsjHVj82cnk7FlHtLlzwUTBGtN6BoGaDEu2gS8c-so-W1MdxTShTLljTHyfAa4v0k5kbMNJzOdQLwkXFM6mqnuvbEZR22DjlBLPJo2UBgMrn0wRj%7ElARoqrRwznmwmBnLM39yOpOxTgeKrWW5BpteofJvGmTZOIFvPY53HInMaN6SOEKl4a5vcdJC0Ph9ka7OVcsQrFR003FFAsBP-KL4R4wm0FNbazUeU4t6Od-ROgPid-sOGjTC4yCYHLKTpZGJ66cF-wfVzPEbHlMIkLMlae%7EuysURkakfT4cauT2OQL1zMVoxXQ__&Key-Pair-Id=K15QRJLYKIFSLZ&Download-Request-ID=1529566194622487"

Output

curl: (23) Failed writing received data to disk/application or 403 Forbidden

Runtime Environment

•   Model: meta-llama-3-8b-instruct
•   Using via huggingface?: no
•   OS: Windows 10
•   GPU VRAM: [N/A if not relevant]
•   Number of GPUs: [N/A if not relevant]
•   GPU Make: [N/A if not relevant]

Additional context I’ve followed all the recommended steps to ensure that the URL is correctly copied and that all necessary dependencies like curl and wget are correctly installed. The issue persists with newly generated URLs from the Meta AI website.

jollybutterfly commented 3 weeks ago

I run into the same problem trying to download 3.1-70B with new approved URL and the issue confirmed persists with newly generated ones. All environment dependencies follow instructions on Meta site confirmed installed without error. Appreciate any help to resolve.

hmark:~$ llama download --source meta --model-id Llama-3-70B /home/smc/.local/lib/python3.10/site-packages/pydantic/_internal/_fields.py:161: UserWarning: Field "modelid" has conflict with protected namespace "model".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = (). warnings.warn( Please provide the signed URL you received via email (e.g., https://llama3-1.llamameta.net/*?Policy...): https://llama3-1.llamameta.net/*?Policy=eyJTdGF0ZW1lbnQiOlt7InVuaXF1ZV9oYXNoIjoiN3I4N2ZieHQ4N2pqM3FuMXlzOWI5dTlyIiwiUmVzb3VyY2UiOiJodHRwczpcL1wvbGxhbWEzLTEubGxhbWFtZXRhLm5ldFwvKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcyNDUxOTE3NH19fV19&Signature=PfeZ7P-ai%7EhvmoKEq03JfZ6Z8KT-BsbXVecLCTcfs%7EsP%7EWY6jKvsahKgWeizW-Sn%7EyGv-WWU3WXz1Sj4YfWdstrjDOERVYNbfjtO7WUn7Zje4vsrga614UhVwSyzHNJ4G5q3Y7KHDG39znnxWYuCgJW2I2%7EeKPTLY-52bud29l77Vx%7ESGQbGYXKqRHWxTpOJmoUd8F%7E6CkEFb8MIw7I%7EGzynUYXF8TGhKUxTrDDXq30-kUi4SNeDFvlxqSNhOL8rS2d9sqeWhSyI5lygszVmDCzjFTEPze-Rf6aqE2j8OzckgOcB570bpWgiF%7Es9Dz4QoqnyQWBmx9apTiR8G1r4GA__&Key-Pair-Id=K15QRJLYKIFSLZ&Download-Request-ID=3908249022832792 Downloading checklist.chk... Traceback (most recent call last): File "/home/smc/.local/bin/llama", line 8, in sys.exit(main()) File "/home/smc/.local/lib/python3.10/site-packages/llama_toolchain/cli/llama.py", line 54, in main parser.run(args) File "/home/smc/.local/lib/python3.10/site-packages/llama_toolchain/cli/llama.py", line 48, in run args.func(args) File "/home/smc/.local/lib/python3.10/site-packages/llama_toolchain/cli/download.py", line 174, in run_download_cmd _meta_download(model, meta_url) File "/home/smc/.local/lib/python3.10/site-packages/llama_toolchain/cli/download.py", line 143, in _meta_download asyncio.run(downloader.download()) File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/home/smc/.local/lib/python3.10/site-packages/llama_toolchain/cli/download.py", line 260, in download await self.get_file_info(client) File "/home/smc/.local/lib/python3.10/site-packages/llama_toolchain/cli/download.py", line 249, in get_file_info response.raise_for_status() File "/home/smc/.local/lib/python3.10/site-packages/httpx/_models.py", line 761, in raise_for_status raise HTTPStatusError(message, request=request, response=self) httpx.HTTPStatusError: Client error '403 Forbidden' for url 'https://llama3-1.llamameta.net/Meta-Llama-3-70B/checklist.chk?Policy=eyJTdGF0ZW1lbnQiOlt7InVuaXF1ZV9oYXNoIjoiN3I4N2ZieHQ4N2pqM3FuMXlzOWI5dTlyIiwiUmVzb3VyY2UiOiJodHRwczpcL1wvbGxhbWEzLTEubGxhbWFtZXRhLm5ldFwvKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcyNDUxOTE3NH19fV19&Signature=PfeZ7P-ai%7EhvmoKEq03JfZ6Z8KT-BsbXVecLCTcfs%7EsP%7EWY6jKvsahKgWeizW-Sn%7EyGv-WWU3WXz1Sj4YfWdstrjDOERVYNbfjtO7WUn7Zje4vsrga614UhVwSyzHNJ4G5q3Y7KHDG39znnxWYuCgJW2I2%7EeKPTLY-52bud29l77Vx%7ESGQbGYXKqRHWxTpOJmoUd8F%7E6CkEFb8MIw7I%7EGzynUYXF8TGhKUxTrDDXq30-kUi4SNeDFvlxqSNhOL8rS2d9sqeWhSyI5lygszVmDCzjFTEPze-Rf6aqE2j8OzckgOcB570bpWgiF%7Es9Dz4QoqnyQWBmx9apTiR8G1r4GA__&Key-Pair-Id=K15QRJLYKIFSLZ&Download-Request-ID=3908249022832792' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403

Additional note Model ID get from: usage: llama download [-h] --source {meta,huggingface} [--model-id {Llama-2-7b,Llama-2-13b,Llama-2-70b,Llama-2-7b-chat,Llama-2-13b-chat,Llama-2-70b-chat,Llama-3-8B,Llama-3-70B,Llama-3-8B-Instruct,Llama-3-70B-Instruct,Meta-Llama3.1-8B,Meta-Llama3.1-70B,Meta-Llama3.1-405B:bf16-mp8,Meta-Llama3.1-405B,Meta-Llama3.1-405B:bf16-mp16,Meta-Llama3.1-8B-Instruct,Meta-Llama3.1-70B-Instruct,Meta-Llama3.1-405B-Instruct:bf16-mp8,Meta-Llama3.1-405B-Instruct,Meta-Llama3.1-405B-Instruct:bf16-mp16,Llama-Guard-3-8B,Llama-Guard-3-8B:int8-mp1,Prompt-Guard-86M}]

AuthorDustin commented 2 weeks ago

Title: Unable to Download Meta Llama 3.1 Model Using Provided URL

Description:

I’m having trouble downloading the Llama 3.1 model using the URL provided by Meta. The URL consistently returns a 403 Forbidden error. Here are the steps I’ve taken:

1.  Requested a New URL:
•   I’ve requested a new download URL multiple times to ensure it wasn’t an expiration issue.
•   Each time, the URL still returns a 403 error when attempting to download via curl and wget.
2.  Checked System Setup:
•   Verified that all dependencies and environmental variables are correctly set up on my system.
•   Tested download commands using both curl and wget, but both return the same error.
3.  Used Direct Browser Access:
•   Attempted to open the URL directly in the browser, which also resulted in an error message indicating “Missing Key-Pair Id query parameter or cookie value.”

Minimal Reproducible Example:

Here is the command I tried using in cmd:

curl -o llama_model.zip "https://llama3-1.llamameta.net/*?Policy=your_policy_here"

I also tried:

wget -O llama_model.zip "https://llama3-1.llamameta.net/*?Policy=your_policy_here"

Output:

Warning: wildcards not supported in HTTP. --2024-08-24 13:51:47-- https://llama3-1.llamameta.net/*?Policy=your_policy_here Resolving llama3-1.llamameta.net (llama3-1.llamameta.net)... 3.163.80.90, 3.163.80.110, 3.163.80.49, ... Connecting to llama3-1.llamameta.net (llama3-1.llamameta.net)|3.163.80.90|:443... connected. HTTP request sent, awaiting response... 403 Forbidden 2024-08-24 13:51:47 ERROR 403: Forbidden.

Runtime Environment:

•   Model: Llama-3.1
•   Using via huggingface?: No
•   OS: Windows 10
•   Tools Used: curl, wget

Additional Context:

I’ve attempted to download this model multiple times with different URLs provided by Meta, but the issue remains consistent. Any advice or further troubleshooting steps would be greatly appreciated.