Skip to content

Commit 5ec91ae

Browse files
author
sd109
committed
Add chartTemplate config value
Also fix missed renames of model_ -> hf_model_ config options.
1 parent 89c0079 commit 5ec91ae

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

chart/azimuth-ui.schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ controls:
55
/huggingface/token:
66
type: TextControl
77
secret: true
8-
/ui/appSettings/model_instruction:
8+
/ui/appSettings/hf_model_instruction:
99
type: TextControl
1010
/ui/appSettings/page_title:
1111
type: TextControl

chart/templates/api/deployment.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ spec:
2828
args:
2929
- --model
3030
- {{ .Values.huggingface.model }}
31+
{{- if .Values.huggingface.chatTemplate }}
32+
- --chat-template
33+
- {{ quote .Values.huggingface.chatTemplate }}
34+
{{- end -}}
3135
{{- if .Values.api.extraArgs -}}
3236
{{- .Values.api.extraArgs | toYaml | nindent 10 }}
3337
{{- end -}}

chart/values.schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
"appSettings": {
2626
"type": "object",
2727
"properties": {
28-
"model_name": {
28+
"hf_model_name": {
2929
"type": "string",
3030
"title": "Model Name",
3131
"description": "Model name supplied to the OpenAI client in frontend web app. Should match huggingface.model above.",
3232
"default": "mistralai/Mistral-7B-Instruct-v0.2"
3333
},
34-
"model_instruction": {
34+
"hf_model_instruction": {
3535
"type": "string",
3636
"title": "Instruction",
3737
"description": "The initial model prompt (i.e. the hidden instructions) to use when generating responses.",
@@ -75,7 +75,7 @@
7575
}
7676

7777
},
78-
"required": ["model_name", "model_instruction"]
78+
"required": ["hf_model_name", "hf_model_instruction"]
7979
}
8080
}
8181
}

chart/values.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ huggingface:
66
# The name of the HuggingFace model to use
77
# Use a yaml anchor to avoid duplication elsewhere
88
model: &model-name ise-uiuc/Magicoder-S-DS-6.7B
9+
# A Jinja formatted chat template to provide to the language model.
10+
# See https://huggingface.co/blog/chat-templates for background info.
11+
# If not provided, the default template specified in the HuggingFace
12+
# model repository's tokenizer_config.json file is used. As explained
13+
# in the above blog post, the HF template key in tokenizer_config.json
14+
# is relatively new and not all HF models include a template in their
15+
# repo files yet. This chart value provides a hook to manually apply the
16+
# correct chat template for such models.
17+
chatTemplate:
918

1019
# For private/gated huggingface models (e.g. Meta's Llama models)
1120
# you must provide your own huggingface token, for details see:
@@ -71,8 +80,8 @@ ui:
7180
# The values to be written to settings.yml for parsing as frontend app setting
7281
# (see example_app.py and config.py for example using pydantic-settings to configure app)
7382
appSettings:
74-
model_name: *model-name
75-
model_instruction: "You are a helpful AI assistant. Please response appropriately."
83+
hf_model_name: *model-name
84+
hf_model_instruction: "You are a helpful AI assistant. Please response appropriately."
7685
# Container image config
7786
image:
7887
repository: ghcr.io/stackhpc/azimuth-llm-ui-base

0 commit comments

Comments
 (0)