From 4a7db9075d79bb11199465828b6f1427929e4e07 Mon Sep 17 00:00:00 2001 From: Playdev Date: Sun, 25 Jun 2023 22:50:39 +0900 Subject: [PATCH] py : add requirements.txt (#201) * Add requirements.txt * Fix README.md files --- README.md | 3 +++ examples/dolly-v2/README.md | 3 +++ examples/gpt-neox/README.md | 3 +++ examples/starcoder/README.md | 3 +++ requirements.txt | 7 +++++++ 5 files changed, 19 insertions(+) create mode 100644 requirements.txt diff --git a/README.md b/README.md index 78c9a96a5..16f7cdfcf 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,9 @@ make -j4 gpt-2 gpt-j ../examples/gpt-j/download-ggml-model.sh 6B ./bin/gpt-j -m models/gpt-j-6B/ggml-model.bin -p "This is an example" +# Install Python dependencies +python3 -m pip install -r ../requirements.txt + # Run the Cerebras-GPT 111M model # Download from: https://huggingface.co/cerebras python3 ../examples/gpt-2/convert-cerebras-to-ggml.py /path/to/Cerebras-GPT-111M/ diff --git a/examples/dolly-v2/README.md b/examples/dolly-v2/README.md index 377e816bb..add97385a 100644 --- a/examples/dolly-v2/README.md +++ b/examples/dolly-v2/README.md @@ -21,6 +21,9 @@ make -j # get the Dolly-V2 3B model git clone https://huggingface.co/databricks/dolly-v2-3b +# install Python dependencies +python3 -m pip install -r ../requirements.txt + # convert model to FP16 python3 ../examples/dolly-v2/convert-h5-to-ggml.py ./dolly-v2-3b/ 1 diff --git a/examples/gpt-neox/README.md b/examples/gpt-neox/README.md index d80338ab2..f7a862ff7 100644 --- a/examples/gpt-neox/README.md +++ b/examples/gpt-neox/README.md @@ -17,6 +17,9 @@ make -j # get the StableLM 3B Alpha model git clone https://huggingface.co/stabilityai/gpt_neox-base-alpha-3b +# install Python dependencies +python3 -m pip install -r ../requirements.txt + # convert model to FP16 python3 ../examples/gpt_neox/convert-h5-to-ggml.py ./stablelm-base-alpha-3b/ 1 diff --git a/examples/starcoder/README.md b/examples/starcoder/README.md index 8a43ab702..7d62c0d7c 100644 --- a/examples/starcoder/README.md +++ b/examples/starcoder/README.md @@ -71,6 +71,9 @@ main: total time = 4580.56 ms git clone https://github.com/ggerganov/ggml cd ggml +# Install Python dependencies +python3 -m pip install -r requirements.txt + # Convert HF model to ggml python examples/starcoder/convert-hf-to-ggml.py bigcode/gpt_bigcode-santacoder diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..9be8160aa --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +accelerate==0.19.0 +numpy==1.24.3 +sentencepiece==0.1.98 +torch==2.0.1 +torchaudio==2.0.2 +torchvision==0.15.2 +transformers==4.29.2 \ No newline at end of file