Spaces:
Paused
Paused
add parameter
Browse files- entrypoint.sh +18 -8
entrypoint.sh
CHANGED
@@ -25,16 +25,26 @@ if [[ ! -z "${MAX_MODEL_LEN}" ]]; then
|
|
25 |
additional_args="${additional_args} --max-model-len ${MAX_MODEL_LEN}"
|
26 |
fi
|
27 |
|
28 |
-
if [[ ! -z "${
|
29 |
-
additional_args="${additional_args} --
|
30 |
fi
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
exec python3 -u api_server.py \
|
40 |
--model "${HF_MODEL}" \
|
|
|
25 |
additional_args="${additional_args} --max-model-len ${MAX_MODEL_LEN}"
|
26 |
fi
|
27 |
|
28 |
+
if [[ ! -z "${TENSOR_PARALLEL_SIZE}" ]]; then
|
29 |
+
additional_args="${additional_args} --tensor-parallel-size ${TENSOR_PARALLEL_SIZE}"
|
30 |
fi
|
31 |
|
32 |
+
if [[ ! -z "${DOWNLAD_DIR}" ]]; then
|
33 |
+
additional_args="${additional_args} --download-dir ${DOWNLAD_DIR}"
|
34 |
+
fi
|
35 |
+
|
36 |
+
if [[ ! -z "${ENFORCE_EAGER}" ]]; then
|
37 |
+
additional_args="${additional_args} --enforce-eager"
|
38 |
+
fi
|
39 |
+
|
40 |
+
if [[ ! -z "${SERVED_MODEL_NAME}" ]]; then
|
41 |
+
additional_args="${additional_args} --served-model-name ${SERVED_MODEL_NAME}"
|
42 |
+
fi
|
43 |
+
|
44 |
+
# PATH_MODEL="/data/models--${HF_MODEL/\//--}"
|
45 |
+
# if [ -d "$PATH_MODEL" ]; then
|
46 |
+
# HF_MODEL=$PATH_MODEL
|
47 |
+
# fi
|
48 |
|
49 |
exec python3 -u api_server.py \
|
50 |
--model "${HF_MODEL}" \
|