Skip to content

Commit 0483b04

Browse files
authored
Merge pull request #58 from stackhpc/fix/base-chart-schema
Reinstate base chart schema to allow smooth Azimuth app transition
2 parents 7981450 + f26524c commit 0483b04

File tree

2 files changed

+161
-0
lines changed

2 files changed

+161
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
controls:
2+
/huggingface/model:
3+
type: TextControl
4+
required: true
5+
/huggingface/token:
6+
type: TextControl
7+
secret: true
8+
# Use mirror to mimic yaml anchor in base Helm chart
9+
/ui/appSettings/model_name:
10+
type: MirrorControl
11+
path: /huggingface/model
12+
visuallyHidden: true
13+
# Azimuth UI doesn't handle json type ["integer","null"]
14+
# properly so we allow any type in JSON schema then
15+
# constrain to (optional) integer here.
16+
/api/modelMaxContextLength:
17+
type: IntegerControl
18+
minimum: 100
19+
required: false
20+
21+
sortOrder:
22+
- /huggingface/model
23+
- /huggingface/token
24+
- /ui/appSettings/model_instruction
25+
- /ui/appSettings/page_title
26+
- /api/image/version
27+
- /ui/appSettings/llm_params/temperature
28+
- /ui/appSettings/llm_params/max_tokens
29+
- /ui/appSettings/llm_params/frequency_penalty
30+
- /ui/appSettings/llm_params/presence_penalty
31+
- /ui/appSettings/llm_params/top_p
32+
- /ui/appSettings/llm_params/top_k
33+
- /api/modelMaxContextLength
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
{
2+
"type": "object",
3+
"properties": {
4+
"huggingface": {
5+
"type": "object",
6+
"properties": {
7+
"model": {
8+
"type": "string",
9+
"title": "Model",
10+
"description": "The [HuggingFace model](https://huggingface.co/models) to deploy (see [here](https://github.com/stackhpc/azimuth-llm?tab=readme-ov-file#tested-models) for a list of tested models).",
11+
"default": "microsoft/Phi-3.5-mini-instruct"
12+
},
13+
"token": {
14+
"type": [
15+
"string",
16+
"null"
17+
],
18+
"title": "Access Token",
19+
"description": "A HuggingFace [access token](https://huggingface.co/docs/hub/security-tokens). Required for [gated models](https://huggingface.co/docs/hub/en/models-gated) (e.g. Llama 3)."
20+
}
21+
},
22+
"required": [
23+
"model"
24+
]
25+
},
26+
"api": {
27+
"type": "object",
28+
"properties": {
29+
"modelMaxContextLength": {
30+
"title": "Model Context Length",
31+
"description": "An override for the maximum context length to allow, if the model's default is not suitable."
32+
},
33+
"image": {
34+
"type": "object",
35+
"properties": {
36+
"version": {
37+
"type": "string",
38+
"title": "Backend vLLM version",
39+
"description": "The vLLM version to use as a backend. Must be a version tag from [this list](https://github.com/vllm-project/vllm/tags)",
40+
"default": "v0.6.3"
41+
}
42+
}
43+
}
44+
}
45+
},
46+
"ui": {
47+
"type": "object",
48+
"properties": {
49+
"appSettings": {
50+
"type": "object",
51+
"properties": {
52+
"model_name": {
53+
"type": "string",
54+
"title": "Model Name",
55+
"description": "Model name supplied to the OpenAI client in frontend web app. Should match huggingface.model above."
56+
},
57+
"model_instruction": {
58+
"type": "string",
59+
"title": "Instruction",
60+
"description": "The initial system prompt (i.e. the hidden instruction) to use when generating responses.",
61+
"default": "You are a helpful AI assistant. Please respond appropriately."
62+
},
63+
"page_title": {
64+
"type": "string",
65+
"title": "Page Title",
66+
"description": "The title to display at the top of the chat interface.",
67+
"default": "Large Language Model"
68+
},
69+
"llm_params": {
70+
"type": "object",
71+
"properties": {
72+
"max_tokens": {
73+
"type": "integer",
74+
"title": "Max Tokens",
75+
"description": "The maximum number of new [tokens](https://platform.openai.com/docs/api-reference/chat/create#chat-create-max_tokens) to generate for each LLM responses.",
76+
"default": 1000
77+
},
78+
"temperature": {
79+
"type": "number",
80+
"title": "LLM Temperature",
81+
"description": "The [temperature](https://platform.openai.com/docs/api-reference/chat/create#chat-create-temperature) value to use when generating LLM responses.",
82+
"default": 0,
83+
"minimum": 0,
84+
"maximum": 2
85+
},
86+
"top_p": {
87+
"type": "number",
88+
"title": "LLM Top P",
89+
"description": "The [top p](https://platform.openai.com/docs/api-reference/chat/create#chat-create-top_p) value to use when generating LLM responses.",
90+
"default": 1,
91+
"exclusiveMinimum": 0,
92+
"maximum": 1
93+
},
94+
"top_k": {
95+
"type": "integer",
96+
"title": "LLM Top K",
97+
"description": "The [top k](https://docs.vllm.ai/en/stable/dev/sampling_params.html) value to use when generating LLM responses (must be an integer).",
98+
"default": -1,
99+
"minimum": -1
100+
},
101+
"presence_penalty": {
102+
"type": "number",
103+
"title": "LLM Presence Penalty",
104+
"description": "The [presence penalty](https://platform.openai.com/docs/api-reference/chat/create#chat-create-presence_penalty) to use when generating LLM responses.",
105+
"default": 0,
106+
"minimum": -2,
107+
"maximum": 2
108+
},
109+
"frequency_penalty": {
110+
"type": "number",
111+
"title": "LLM Frequency Penalty",
112+
"description": "The [frequency_penalty](https://platform.openai.com/docs/api-reference/chat/create#chat-create-frequency_penalty) to use when generating LLM responses.",
113+
"default": 0,
114+
"minimum": -2,
115+
"maximum": 2
116+
}
117+
}
118+
}
119+
},
120+
"required": [
121+
"model_name",
122+
"model_instruction"
123+
]
124+
}
125+
}
126+
}
127+
}
128+
}

0 commit comments

Comments
 (0)