UPDATE (2:43 AM CST): Facebook has closed off this download vector. I’m currently mirroring the model to Cloudflare R2, and I’ll update the script to use it right now; I’ll keep you updated as I go. Check back in like… an hour?
UPDATE (3:58 AM CST): I’ve mirrored everything to R2, and updated the script to point to it. Note that the download command has changed (it uses a new version of the bash script) so you’ll need to re-copy from this README. The safety guarantees are the same for you in the end, though, and the bandwidth is still around 36MB/s, which isn’t too bad. I’m honestly too tired to update the rest of the README to reflect this slowdown; I’ll just leave it the way it was for tonight. Please tweet on the announcement thread if anything breaks again, and I’ll fix it again.
This repository contains a high-speed download of LLaMA, Facebook’s 65B parameter model that was recently made available via torrent. (Discussion: Facebook LLAMA is being openly distributed via torrents)
It downloads all model weights (7B, 13B, 30B, 65B) at around 200 MB/s:
real 19m21.173s
user 3m30.473s
sys 2m30.847s
Download
To download all model weights, cd
into the directory you want them, then run this:
Linux:
curl -o- https://raw.githubusercontent.com/shawwn/llama-dl/56f50b96072f42fb2520b1ad5a1d6ef30351f23c/llama.sh | bash
Mac:
brew install bash curl -o- https://raw.githubusercontent.com/shawwn/llama-dl/56f50b96072f42fb2520b1ad5a1d6ef30351f23c/llama.sh | $(brew --prefix)/bin/bash
(Sorry mac users; they use some array syntax in the script that isn’t supported on the version of bash that ships with Mac.)
Running random bash scripts generally isn’t a good idea, but I’ll stake my personal reputation on the fact that this link is safe. (It points to a specific SHA-1 hash rather than https://raw.githubusercontent.com/shawwn/llama-dl/main/llama.sh so that it’s still safe even in the event that my repo or account got compromised.)
How do I know this is safe?
I ran this:
mkdir LLaMA
cd LLaMA
time curl -o- https://raw.githubusercontent.com/shawwn/llama-dl/56f50b96072f42fb2520b1ad5a1d6ef30351f23c/llama.sh | bash
cd ..
webtorrent 'magnet:?xt=urn:btih:b8287ebfa04f879b048d4d4404108cf3e8014352&dn=LLaMA&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce'
Webtorrent began seeding immediately, which means every file is identical to what you would’ve gotten via the torrent. So this is just a faster version of the torrent.
How much faster?
Roughly 18x. As of March 4 2023, the torrent seems to download at around 11MB/s. Whereas this download script downloads at around 120MB/s on average, bursting occasionally up to 220MB/s.
Will I get in trouble for using this download link?
I doubt it. This is the download link that was leaked in the original torrent. (i.e. the leaker accidentally leaked their own unique download link that Facebook sent them.)
Technically, it may be illegal to knowingly use a private download link that was intended for someone