Spaces:
Paused
Paused
feat(runner.sh): using MODEL_ID only
Browse files
runner.sh
CHANGED
@@ -1,27 +1,30 @@
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
-
#
|
4 |
-
if [[ -z "$
|
5 |
-
echo "Error:
|
6 |
exit 1
|
7 |
fi
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
21 |
|
22 |
printf "Running %s using vLLM OpenAI compatible API Server at port %s\n" $MODEL_NAME "7860"
|
23 |
|
24 |
-
# Run the Python script with the
|
25 |
python -u /app/openai_compatible_api_server.py \
|
26 |
--model "${MODEL_NAME}" \
|
27 |
--revision "${MODEL_REV}" \
|
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
+
# Validate MODEL_ID
|
4 |
+
if [[ -z "$MODEL_ID" ]]; then
|
5 |
+
echo "Error: MODEL_ID is not set."
|
6 |
exit 1
|
7 |
fi
|
8 |
|
9 |
+
# Assign MODEL_NAME and MODEL_REV based on MODEL_ID
|
10 |
+
case "$MODEL_ID" in
|
11 |
+
1)
|
12 |
+
MODEL_NAME="meta-llama/Llama-3.2-3B-Instruct"
|
13 |
+
MODEL_REV="0cb88a4f764b7a12671c53f0838cd831a0843b95"
|
14 |
+
;;
|
15 |
+
2)
|
16 |
+
MODEL_NAME="sail/Sailor-4B-Chat"
|
17 |
+
MODEL_REV="89a866a7041e6ec023dd462adeca8e28dd53c83e"
|
18 |
+
;;
|
19 |
+
*)
|
20 |
+
echo "Error: Invalid MODEL_ID. Valid values are 1 or 2."
|
21 |
+
exit 1
|
22 |
+
;;
|
23 |
+
esac
|
24 |
|
25 |
printf "Running %s using vLLM OpenAI compatible API Server at port %s\n" $MODEL_NAME "7860"
|
26 |
|
27 |
+
# Run the Python script with the determined values
|
28 |
python -u /app/openai_compatible_api_server.py \
|
29 |
--model "${MODEL_NAME}" \
|
30 |
--revision "${MODEL_REV}" \
|