From 4aec68fd81b657869ad4a0841ec5e9d340dea75f Mon Sep 17 00:00:00 2001 From: Giacomo Date: Fri, 9 Jun 2023 17:12:23 +0200 Subject: [PATCH 1/3] Dockerfile to run as a Docker container --- Docker/Dockerfile.chat3b | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Docker/Dockerfile.chat3b diff --git a/Docker/Dockerfile.chat3b b/Docker/Dockerfile.chat3b new file mode 100644 index 0000000000000..53281d4a00e7b --- /dev/null +++ b/Docker/Dockerfile.chat3b @@ -0,0 +1,20 @@ +FROM python:3.11.3-bullseye +WORKDIR /root + +# Install dependencies +RUN pip install --upgrade pip +RUN pip install torch==2.0.0 +RUN pip install transformers==4.28.1 + +RUN git clone https://github.com/togethercomputer/redpajama.cpp.git + +# Build it! +WORKDIR /root/redpajama.cpp +RUN make redpajama-chat quantize-gptneox +RUN bash ./examples/redpajama/scripts/install-RedPajama-INCITE-Chat-3B-v1.sh +RUN pip install -r requirements.txt +RUN python convert.py ./examples/redpajama/models/pythia/ggml-RedPajama-INCITE-Chat-3B-v1-f16.bin + +CMD ["./redpajama-chat", "-m", "./examples/redpajama/models/pythia/ggml-RedPajama-INCITE-Chat-3B-v1-f16.bin", \ +"-c", "2048", "-b", "128", "-n", "1", "-t", "8", "--instruct", "--color", "--top_k", "30", "--top_p", "0.95", "--temp", "0.8", \ +"--repeat_last_n", "3", "--repeat_penalty", "1.1", "--seed", "0"] From 926a005684bfb89446a3827356205264ec631c53 Mon Sep 17 00:00:00 2001 From: Giacomo Date: Fri, 9 Jun 2023 17:16:01 +0200 Subject: [PATCH 2/3] Removed call to convert.py as it proved to be unhelpful --- Docker/Dockerfile.chat3b | 1 - 1 file changed, 1 deletion(-) diff --git a/Docker/Dockerfile.chat3b b/Docker/Dockerfile.chat3b index 53281d4a00e7b..6c187bd17015b 100644 --- a/Docker/Dockerfile.chat3b +++ b/Docker/Dockerfile.chat3b @@ -13,7 +13,6 @@ WORKDIR /root/redpajama.cpp RUN make redpajama-chat quantize-gptneox RUN bash ./examples/redpajama/scripts/install-RedPajama-INCITE-Chat-3B-v1.sh RUN pip install -r requirements.txt -RUN python convert.py ./examples/redpajama/models/pythia/ggml-RedPajama-INCITE-Chat-3B-v1-f16.bin CMD ["./redpajama-chat", "-m", "./examples/redpajama/models/pythia/ggml-RedPajama-INCITE-Chat-3B-v1-f16.bin", \ "-c", "2048", "-b", "128", "-n", "1", "-t", "8", "--instruct", "--color", "--top_k", "30", "--top_p", "0.95", "--temp", "0.8", \ From b2f484fdc028e15daec50f39f63f5f9e536c6e51 Mon Sep 17 00:00:00 2001 From: Giacomo Date: Fri, 9 Jun 2023 17:21:41 +0200 Subject: [PATCH 3/3] Added Dockerfile for chat 7B model --- Docker/Dockerfile.chat7b | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Docker/Dockerfile.chat7b diff --git a/Docker/Dockerfile.chat7b b/Docker/Dockerfile.chat7b new file mode 100644 index 0000000000000..077b97d4ba8d3 --- /dev/null +++ b/Docker/Dockerfile.chat7b @@ -0,0 +1,19 @@ +FROM python:3.11.3-bullseye +WORKDIR /root + +# Install dependencies +RUN pip install --upgrade pip +RUN pip install torch==2.0.0 +RUN pip install transformers==4.28.1 + +RUN git clone https://github.com/togethercomputer/redpajama.cpp.git + +# Build it! +WORKDIR /root/redpajama.cpp +RUN make redpajama-chat quantize-gptneox +RUN bash ./examples/redpajama/scripts/install-RedPajama-INCITE-Chat-7B.sh +RUN pip install -r requirements.txt + +CMD ["./redpajama-chat", "-m", "./examples/redpajama/models/pythia/ggml-RedPajama-INCITE-7B-Chat-q4_0.bin", \ +"-c", "2048", "-b", "128", "-n", "1", "-t", "8", "--instruct", "--color", "--top_k", "50", "--top_p", "0.95", "--temp", "0.95", \ +"--repeat_last_n", "3", "--repeat_penalty", "1.0", "--seed", "0"]