From 2af23d30434a677c6416812eea52ccc0af65119c Mon Sep 17 00:00:00 2001 From: Bernat Vadell Date: Fri, 17 Mar 2023 10:47:06 +0100 Subject: =?UTF-8?q?=F0=9F=9A=80=20Dockerize=20llamacpp=20(#132)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: dockerize llamacpp * feat: split build & runtime stages * split dockerfile into main & tools * add quantize into tool docker image * Update .devops/tools.sh Co-authored-by: Georgi Gerganov * add docker action pipeline * change CI to publish at github docker registry * fix name runs-on macOS-latest is macos-latest (lowercase) * include docker versioned images * fix github action docker * fix docker.yml * feat: include all-in-one command tool & update readme.md --------- Co-authored-by: Georgi Gerganov --- convert-pth-to-ggml.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'convert-pth-to-ggml.py') diff --git a/convert-pth-to-ggml.py b/convert-pth-to-ggml.py index 5c36e9c..d0eb213 100644 --- a/convert-pth-to-ggml.py +++ b/convert-pth-to-ggml.py @@ -16,7 +16,7 @@ # At the start of the ggml file we write the model parameters # and vocabulary. # - +import os import sys import json import struct @@ -64,6 +64,10 @@ if len(sys.argv) > 2: sys.exit(1) fname_out = sys.argv[1] + "/ggml-model-" + ftype_str[ftype] + ".bin" +if os.path.exists(fname_out): + print(f"Skip conversion, it already exists: {fname_out}") + sys.exit(0) + with open(fname_hparams, "r") as f: hparams = json.load(f) -- cgit v1.2.3