Skip to content

Commit 815c51b

Browse files
committed
♻️ Removed global Model ID var | resolved readme conflicts
Signed-off-by: Krishna Murti <krishna.murti@intel.com>
1 parent 140d1b5 commit 815c51b

10 files changed

Lines changed: 55 additions & 17 deletions

File tree

helm-charts/chatqna/README.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@ Apart from above mentioned services, there are following conditional dependencie
2424

2525
## Installing the Chart
2626

27-
To install the chart, run the following:
27+
Please follow the following steps to install the ChatQnA Chart:
28+
29+
1. Clone the GenAIInfra repository:
30+
31+
```bash
32+
git clone https://github.com/opea-project/GenAIInfra.git
33+
```
34+
35+
2. Setup the dependencies and required environment variables:
2836

2937
```bash
3038
cd GenAIInfra/helm-charts/
@@ -33,20 +41,41 @@ helm dependency update chatqna
3341
export HFTOKEN="insert-your-huggingface-token-here"
3442
export MODELDIR="/mnt/opea-models"
3543
export MODELNAME="Intel/neural-chat-7b-v3-3"
44+
```
45+
46+
3. Depending on the device which we are targeting for running ChatQnA, please use one the following installation commands:
47+
48+
```bash
49+
# Install the chart on a Xeon machine
3650
helm install chatqna chatqna --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.modelUseHostPath=${MODELDIR} --set tgi.LLM_MODEL_ID=${MODELNAME}
51+
```
3752

53+
```bash
3854
# To use Gaudi device
3955
helm install chatqna chatqna --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.modelUseHostPath=${MODELDIR} --set tgi.LLM_MODEL_ID=${MODELNAME} -f chatqna/gaudi-values.yaml
56+
```
4057

58+
```bash
4159
# To use Nvidia GPU
4260
helm install chatqna chatqna --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.modelUseHostPath=${MODELDIR} --set tgi.LLM_MODEL_ID=${MODELNAME} -f chatqna/nv-values.yaml
61+
```
4362

63+
```bash
64+
# To include guardrail component in chatqna on Xeon
65+
helm install chatqna chatqna --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.modelUseHostPath=${MODELDIR} -f chatqna/guardrails-values.yaml
66+
```
4467

45-
# To use OpenVINO vLLM inference engine on Xeon device
46-
47-
helm install chatqna chatqna --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.modelUseHostPath=${MODELDIR} --set global.LLM_MODEL_ID=${MODELNAME} --set tags.tgi=false --set vllm-openvino.enabled=true
68+
```bash
69+
# To include guardrail component in chatqna on Gaudi
70+
helm install chatqna chatqna --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.modelUseHostPath=${MODELDIR} -f chatqna/guardrails-gaudi-values.yaml
4871
```
4972

73+
>**_NOTE:_** Default installation will use [TGI (Text Generation Inference)](https://github.com/huggingface/text-generation-inference) as inference engine. To use vLLM as inference engine, please see below.
74+
75+
```bash
76+
# To use OpenVINO vLLM inference engine on Xeon device
77+
helm install chatqna chatqna --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.modelUseHostPath=${MODELDIR} --set llm-vllm-uservice.LLM_MODEL_ID=${MODELNAME} --set vllm-openvino.LLM_MODEL_ID=${MODELNAME} --set tags.tgi=false --set vllm-openvino.enabled=true
78+
```
5079

5180
### IMPORTANT NOTE
5281

helm-charts/chatqna/values.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,17 @@ tolerations: []
4343

4444
affinity: {}
4545

46-
# To override values in subchart tgi and vllm-ov
46+
# To override values in subchart tgi, vllm-openvino and llm-vllm-uservice
4747
tgi:
4848
LLM_MODEL_ID: Intel/neural-chat-7b-v3-3
4949

5050
vllm-openvino:
51+
LLM_MODEL_ID: Intel/neural-chat-7b-v3-3
5152
enabled: false
5253

54+
llm-vllm-uservice:
55+
LLM_MODEL_ID: Intel/neural-chat-7b-v3-3
56+
5357
tags:
5458
tgi: true
5559
vllm: false
@@ -61,7 +65,6 @@ global:
6165
no_proxy: ""
6266
HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
6367

64-
LLM_MODEL_ID: Intel/neural-chat-7b-v3-3
6568
# set modelUseHostPath or modelUsePVC to use model cache.
6669
modelUseHostPath: ""
6770
# modelUsePVC: model-volume

helm-charts/common/llm-vllm-uservice/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,23 @@ export http_proxy=<your_http_proxy>
3131
export https_proxy=<your_https_proxy>
3232

3333
helm dependency update
34-
helm install llm-vllm-uservice . --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set vLLM_ENDPOINT=${vLLM_ENDPOINT} --set global.LLM_MODEL_ID=${MODELNAME} --set global.http_proxy=${http_proxy} --set global.https_proxy=${https_proxy} --wait
34+
helm install llm-vllm-uservice . --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set vLLM_ENDPOINT=${vLLM_ENDPOINT} --set LLM_MODEL_ID=${MODELNAME} --set global.http_proxy=${http_proxy} --set global.https_proxy=${https_proxy} --wait
3535
```
3636

3737
## (Option 2): Installing the chart with automatic installation of dependency:
3838

3939
```bash
4040
cd GenAIInfra/helm-charts/common/llm-vllm-uservice
4141
export HFTOKEN="insert-your-huggingface-token-here"
42+
export MODELDIR="/mnt/opea-models"
4243
export MODELNAME="bigscience/bloom-560m"
4344

4445
# If proxy is required, please export the appropriate proxy values.
4546
export http_proxy=<your_http_proxy>
4647
export https_proxy=<your_https_proxy>
4748

4849
helm dependency update
49-
helm install llm-vllm-uservice . --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.LLM_MODEL_ID=${MODELNAME} --set autodependency.enabled=true --set global.http_proxy=${http_proxy} --set global.https_proxy=${https_proxy} --wait
50+
helm install llm-vllm-uservice . --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.modelUseHostPath=${MODELDIR} --set LLM_MODEL_ID=${MODELNAME} --set vllm-openvino.LLM_MODEL_ID=${MODELNAME} --set autodependency.enabled=true --set global.http_proxy=${http_proxy} --set global.https_proxy=${https_proxy} --wait
5051
```
5152

5253
`--wait` flag in above installation command will make sure that all the dependencies are resolved and all services are deployed.

helm-charts/common/llm-vllm-uservice/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ data:
1313
{{- else }}
1414
vLLM_ENDPOINT: "http://{{ .Release.Name }}-vllm-openvino"
1515
{{- end }}
16-
LLM_MODEL: {{ .Values.global.LLM_MODEL_ID | quote }}
16+
LLM_MODEL: {{ .Values.LLM_MODEL_ID | quote }}
1717
HUGGINGFACEHUB_API_TOKEN: {{ .Values.global.HUGGINGFACEHUB_API_TOKEN | quote}}
1818
HF_HOME: "/tmp/.cache/huggingface"
1919
{{- if .Values.global.HF_ENDPOINT }}

helm-charts/common/llm-vllm-uservice/values.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ tolerations: []
8787

8888
affinity: {}
8989

90+
# Model ID to be used by llm-vllm microservice
91+
LLM_MODEL_ID: "Intel/neural-chat-7b-v3-3"
92+
93+
# Overriding the Model ID being used by vllm-openvino service.(As llm-vllm microservice depends on vllm-openvino, these 2 values should be same.)
94+
vllm-openvino:
95+
LLM_MODEL_ID: "Intel/neural-chat-7b-v3-3"
96+
9097
global:
9198
http_proxy: ""
9299
https_proxy: ""
@@ -98,4 +105,3 @@ global:
98105
# comment out modeluseHostPath if you want to download the model from huggingface
99106
# modelUseHostPath: ""
100107
modelUseHostPath: ""
101-
LLM_MODEL_ID: "Intel/neural-chat-7b-v3-3"

helm-charts/common/vllm-openvino/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export HFTOKEN="insert-your-huggingface-token-here"
1616
export http_proxy=<your_http_proxy>
1717
export https_proxy=<your_https_proxy>
1818

19-
helm install vllm-openvino vllm-openvino --set global.modelUseHostPath=${MODELDIR} --set global.LLM_MODEL_ID=${MODELNAME} --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.http_proxy=${http_proxy} --set global.https_proxy=${https_proxy} --wait
19+
helm install vllm-openvino vllm-openvino --set global.modelUseHostPath=${MODELDIR} --set LLM_MODEL_ID=${MODELNAME} --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.http_proxy=${http_proxy} --set global.https_proxy=${https_proxy} --wait
2020
```
2121

2222
`--wait` flag in the above helm installation command lets the shell wait till `vllm-openvino` is completely up and ready.

helm-charts/common/vllm-openvino/templates/configmap.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
labels:
99
{{- include "vllm-openvino.labels" . | nindent 4 }}
1010
data:
11-
MODEL_ID: {{ .Values.global.LLM_MODEL_ID | quote }}
11+
MODEL_ID: {{ .Values.LLM_MODEL_ID | quote }}
1212
PORT: {{ .Values.service.port | quote }}
1313
HF_TOKEN: {{ .Values.global.HUGGINGFACEHUB_API_TOKEN | quote}}
1414
VLLM_CPU_KVCACHE_SPACE: {{ .Values.VLLM_CPU_KVCACHE_SPACE | quote }}
@@ -22,7 +22,6 @@ data:
2222
no_proxy: {{ .Values.global.no_proxy | quote }}
2323
HABANA_LOGS: "/tmp/habana_logs"
2424
NUMBA_CACHE_DIR: "/tmp"
25-
TRANSFORMERS_CACHE: "/tmp/transformers_cache"
2625
HF_HOME: "/tmp/.cache/huggingface"
2726
{{- if .Values.CUDA_GRAPHS }}
2827
CUDA_GRAPHS: {{ .Values.CUDA_GRAPHS | quote }}

helm-charts/common/vllm-openvino/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ spec:
7878
- |
7979
cd / && \
8080
python3 -m vllm.entrypoints.openai.api_server \
81-
--model "{{ .Values.global.LLM_MODEL_ID }}" \
81+
--model "{{ .Values.LLM_MODEL_ID }}" \
8282
--host 0.0.0.0 \
8383
--port 80
8484
volumes:

helm-charts/common/vllm-openvino/templates/tests/test-pod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
for ((i=1; i<=max_retry; i++)); do \
2121
curl http://{{ include "vllm-openvino.fullname" . }}/v1/completions -sS --fail-with-body \
2222
-X POST \
23-
-d '{"prompt":"What is Deep Learning?", "model": {{ .Values.global.LLM_MODEL_ID | quote }}, "max_tokens":17, "temperature": 0.5}' \
23+
-d '{"prompt":"What is Deep Learning?", "model": {{ .Values.LLM_MODEL_ID | quote }}, "max_tokens":17, "temperature": 0.5}' \
2424
-H 'Content-Type: application/json' && break;
2525
curlcode=$?
2626
if [[ $curlcode -eq 7 ]]; then sleep 10; else echo "curl failed with code $curlcode"; exit 1; fi;

helm-charts/common/vllm-openvino/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ tolerations: []
9696

9797
affinity: {}
9898

99+
LLM_MODEL_ID: Intel/neural-chat-7b-v3-3
100+
99101
CUDA_GRAPHS: "0"
100102
VLLM_CPU_KVCACHE_SPACE: 50
101103
HABANA_VISIBLE_DEVICES: all
@@ -107,8 +109,6 @@ global:
107109
no_proxy: ""
108110
HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
109111

110-
LLM_MODEL_ID: Intel/neural-chat-7b-v3-3
111-
112112
# Choose where to save your downloaded models
113113
# Set modelUseHostPath for local directory, this is good for one node test. Example:
114114
# modelUseHostPath: /mnt/opea-models

0 commit comments

Comments
 (0)