From 67fcfeea8bdddea80b4a1b19d074b423d3e8e7b7 Mon Sep 17 00:00:00 2001 From: TheBloke Date: Sun, 16 Apr 2023 12:39:55 +0100 Subject: [PATCH] Update README to include instructions for building CLI only Users may want to play around with gpt4all-j from the command line. But they may not have Qt, and might not want to get it, or may find it very hard to do so - eg when using a Google Colab or similar hosted service. It's easy to build the CLI tools just by building the `ggml` sub folder. So this commit adds instructions on doing that, including an example invocation of the `gpt-j` binary. --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 490a1cd2..230f620a 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,24 @@ python3 ../ggml/examples/gpt-j/convert-h5-to-ggml.py /path/to/your/local/copy/of ./chat ``` +## Building and running CLI tools only (no Qt required) + +* Install cmake for your platform https://cmake.org/install/ +* Clone this repo and build the `ggml` subfolder +``` +git clone --recurse-submodules https://github.com/nomic-ai/gpt4all +cd gpt4all-chat/ggml +mkdir build +cd build +cmake .. +cmake --build . --parallel +wget https://gpt4all.io/models/ggml-gpt4all-j.bin # Download GGML model if required +./bin/gpt-j -m ggml-gpt4all-j.bin -n 200 --top_k 40 --top_p 0.9 -b 9 --temp 0.9 -p "Below is an instruction that describes a task. Write a response that appropriately completes the request. +### Instruction: +Write a story about llamas +### Response:" +``` + ## Contributing * Pull requests welcome. See the feature wish list for ideas :)