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

build: add requirements file for convert-hf-to-gguf.py #4277

Merged
merged 1 commit into from
Dec 1, 2023

Commits on Dec 1, 2023

  1. build: add requirements file for convert-hf-to-gguf.py

    This commit adds a requirements file for the convert-hf-to-gguf.py
    script, and also add the torch and transformers packages to it.
    
    The motivation for this is that currently running convert-hf-to-gguf.py
    will produce the following error:
    ```console
    $ python3 -m venv venv
    $ source venv/bin/activate
    (venv) $ pip install -r requirements.txt
    Collecting numpy==1.24.4
    Collecting sentencepiece==0.1.98
    Collecting gguf>=0.1.0
    Installing collected packages: sentencepiece, numpy, gguf
    Successfully installed gguf-0.5.1 numpy-1.24.4 sentencepiece-0.1.98
    
    (venv) $ python convert-hf-to-gguf.py --help
    Traceback (most recent call last):
      File "llama.cpp/convert-hf-to-gguf.py", line 16, in <module>
        import torch
    ModuleNotFoundError: No module named 'torch'
    ```
    With this commit, and using requirements-hf-to-gguf.txt instead of
    requirements.txt, the script can be run and shows the help output.
    
    Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
    danbev committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    ce67fb5 View commit details
    Browse the repository at this point in the history