Skip to content
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

LLaMA C++ integration with HF #9

Open
davidrpugh opened this issue Oct 7, 2024 · 2 comments
Open

LLaMA C++ integration with HF #9

davidrpugh opened this issue Oct 7, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@davidrpugh
Copy link
Member

There is a nice example in the HF docs showing how you can use both llama-cli and llama-server to work with GGUF files directly from HF.

https://huggingface.co/docs/hub/en/gguf-llamacpp

These are good examples to include in our tutorials.

@davidrpugh davidrpugh added the documentation Improvements or additions to documentation label Oct 7, 2024
@davidrpugh davidrpugh added enhancement New feature or request and removed documentation Improvements or additions to documentation labels Oct 16, 2024
@davidrpugh
Copy link
Member Author

davidrpugh commented Oct 16, 2024

Related examples can be added to the llama-cli tutorial notebooks. Quickstart notebook should show how to download a model from HF.

-   `-mu MODEL_URL --model-url MODEL_URL`: Specify a remote http url to download the file.

Here is an example of usage.

MODEL_URL=https://huggingface.co/ggml-org/gemma-1.1-7b-it-Q4_K_M-GGUF/resolve/main/gemma-1.1-7b-it.Q4_K_M.gguf
llama-cli --model-url "$MODEL_URL" --prompt "Once upon a time"

This requires a working with a build that has enabled curl support. See issue #11 .

@davidrpugh
Copy link
Member Author

davidrpugh commented Oct 16, 2024

Other relevant HF related options for llama-cli.

-hfr,  --hf-repo REPO                   Hugging Face model repository (default: unused)
                                        (env: LLAMA_ARG_HF_REPO)
-hff,  --hf-file FILE                   Hugging Face model file (default: unused)
                                        (env: LLAMA_ARG_HF_FILE)
-hft,  --hf-token TOKEN                 Hugging Face access token (default: value from HF_TOKEN environment
                                        variable)
                                        (env: HF_TOKEN)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant