by adrian_b · 1mo ago · 0 comments
This means that you must first create a personal account at Huggingface.co, then you must fill a request form for Meta, including whom you work for and in which position, submit the request to Meta and wait for it to be approved.
In my case the approval was received in about 10 minutes or so.
Presumably after that you are able to download the files, though I will have to see how easy it is to use your credentials from a CLI download program, because downloading a big LLM with a browser is completely impractical, as the transfer of the big files breaks very frequently so you need a download program like wget or curl, which will restart the interrupted transfers as often as necessary.
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:
until curl --user "name" --oauth2-bearer "access_token" --location --continue-at - "HF_XET_link"; do sleep xx; done
("--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.