|
|
|
|
|
by drewmate
44 days ago
|
|
This is kind of a standard at this point for many models (including prior meta models like llama) You create a hugging face token, set an env variable (HF_TOKEN) and download it with the hugging face CLI or just automatically as needed with trandormers, vllm, etc… |
|
Previously with non-gated models, you could download the XET files with any program, no special software needed.
Now I have wasted some time until finding that I can use curl with the options:
("--location" is needed to follow redirections)Previously I was using wget, which was very reliable, which is important for a download that may take a day or even more.
Now I must use curl due to the authentication method and curl sucks badly at retrying and resuming interrupted transfers. Therefore I must write in the shell script a loop that tests the exit code and re-executes curl with the --continue-at option until the download is successful. Ugly in comparison with wget.
The command written above is a simplified loop. A better loop would need to test specific exit error codes of curl, but discovering which are those would need time for searching the curl documentation or sources.