Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defaulting no option but allow override chat format #539

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion model_servers/llamacpp_python/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
APP := llamacpp_python
PORT ?= 8001
CHAT_FORMAT ?= llama-2
CHAT_FORMAT ?=

include ../common/Makefile.common

Expand Down
2 changes: 1 addition & 1 deletion model_servers/llamacpp_python/base/Containerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM registry.access.redhat.com/ubi9/python-311:1-62.1716478620
ENV CHAT_FORMAT=llama-2
ENV CHAT_FORMAT=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this works as you expect? IE if I do

make CHAT_FORMAT=foobar, I don't think the CHAT_FORMAT variable in the podman build will get passed in.

Copy link
Collaborator Author

@Gregory-Pereira Gregory-Pereira Jun 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood. I can remove it, which just means we have no ability to set it at the build stage but we can default the option at the run stage. Updated in: 558ecaf

WORKDIR /locallm
COPY src .
USER root
Expand Down
2 changes: 1 addition & 1 deletion model_servers/llamacpp_python/src/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Gregory-Pereira marked this conversation as resolved.
Show resolved Hide resolved
--interrupt_requests ${INTERRUPT_REQUESTS:=False}
exit 0
fi
Expand Down