From 65f265af071557197159546ae9ce721b8d7dafba Mon Sep 17 00:00:00 2001 From: greg pereira Date: Fri, 7 Jun 2024 09:12:59 -0700 Subject: [PATCH 1/2] defaulting no option but allow override chat format Signed-off-by: greg pereira --- model_servers/llamacpp_python/Makefile | 2 +- model_servers/llamacpp_python/base/Containerfile | 2 +- model_servers/llamacpp_python/src/run.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/model_servers/llamacpp_python/Makefile b/model_servers/llamacpp_python/Makefile index b232f332..d8322815 100644 --- a/model_servers/llamacpp_python/Makefile +++ b/model_servers/llamacpp_python/Makefile @@ -1,6 +1,6 @@ APP := llamacpp_python PORT ?= 8001 -CHAT_FORMAT ?= llama-2 +CHAT_FORMAT ?= include ../common/Makefile.common diff --git a/model_servers/llamacpp_python/base/Containerfile b/model_servers/llamacpp_python/base/Containerfile index 2b58c966..c650191d 100644 --- a/model_servers/llamacpp_python/base/Containerfile +++ b/model_servers/llamacpp_python/base/Containerfile @@ -1,5 +1,5 @@ FROM registry.access.redhat.com/ubi9/python-311:1-62.1716478620 -ENV CHAT_FORMAT=llama-2 +ENV CHAT_FORMAT= WORKDIR /locallm COPY src . USER root diff --git a/model_servers/llamacpp_python/src/run.sh b/model_servers/llamacpp_python/src/run.sh index fa38d447..28ccf0df 100644 --- a/model_servers/llamacpp_python/src/run.sh +++ b/model_servers/llamacpp_python/src/run.sh @@ -11,7 +11,7 @@ if [ ${MODEL_PATH} ]; then --port ${PORT:=8001} \ --n_gpu_layers ${GPU_LAYERS:=0} \ --clip_model_path ${CLIP_MODEL_PATH:=None} \ - --chat_format ${CHAT_FORMAT:="llama-2"} \ + --chat_format ${CHAT_FORMAT:=None} \ --interrupt_requests ${INTERRUPT_REQUESTS:=False} exit 0 fi From 558ecafd2c91746fa4104256c70a9976ef4d2930 Mon Sep 17 00:00:00 2001 From: greg pereira Date: Mon, 10 Jun 2024 08:56:01 -0700 Subject: [PATCH 2/2] removing empty default option in containerfile Signed-off-by: greg pereira --- model_servers/common/Makefile.common | 2 +- model_servers/llamacpp_python/base/Containerfile | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/model_servers/common/Makefile.common b/model_servers/common/Makefile.common index b363690d..74a4e378 100644 --- a/model_servers/common/Makefile.common +++ b/model_servers/common/Makefile.common @@ -11,7 +11,7 @@ endif .PHONY: build build: - podman build --squash-all $(CHAT_FORMAT:%=--build-arg CHAT_FORMAT=%) --build-arg PORT=$(PORT) -t $(IMAGE) . -f base/Containerfile + podman build --squash-all --build-arg PORT=$(PORT) -t $(IMAGE) . -f base/Containerfile .PHONY: install install: diff --git a/model_servers/llamacpp_python/base/Containerfile b/model_servers/llamacpp_python/base/Containerfile index c650191d..e1a1516a 100644 --- a/model_servers/llamacpp_python/base/Containerfile +++ b/model_servers/llamacpp_python/base/Containerfile @@ -1,5 +1,4 @@ FROM registry.access.redhat.com/ubi9/python-311:1-62.1716478620 -ENV CHAT_FORMAT= WORKDIR /locallm COPY src . USER root