-
Notifications
You must be signed in to change notification settings - Fork 12.2k
scripts : add hf.sh helper script #5501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fi | ||
|
||
if [ "$is_url" = false ]; then | ||
exit 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a log could be added here? otherwise non-HF/mistyped URIs will quit silently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love itt! Conceptually I wonder if it'd make more sense to add support for providing the repo name as well as the file name and we make the URL in the script.
This helps remove any possibility of people executing malicious code or accidentally putting in the wrong URL too.
model-repo
& quant-file
(or something like that).
./main \ -m $(./scripts/hf.sh --model-repo TheBloke/Mixtral-8x7B-v0.1-GGUF --quant-file mixtral-8x7b-v0.1.Q4_K_M.gguf) \ -p "I believe the meaning of life is" -n 64
What do you think?
Just added the optional I prefer
This script is mainly a helper for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant thanks for iterating! This looks good to me! I think this could help the community quite a bit! ⚡
* scripts : add hf.sh helper scripts * hf : add error logs * hf : add support for --repo and --file
* scripts : add hf.sh helper scripts * hf : add error logs * hf : add support for --repo and --file
Helper script to download an HF model file using
wget
orcurl
(whichever is available). Supports resuming downloads.Sample usage:
old attempt: #4735