NeonBohdan commited on
Commit
4fe16fe
1 Parent(s): 43b8dd7

Added advanced vllm deploy

Browse files
Files changed (1) hide show
  1. vllm.sh +45 -1
vllm.sh CHANGED
@@ -1,2 +1,46 @@
1
  #!/bin/bash
2
- python -m vllm.entrypoints.openai.api_server --model neongeckocom/NeonLLM --max-model-len 8000 --port 5000 --api-key [...]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  #!/bin/bash
2
+
3
+ # Initialize variables with default values
4
+ model=""
5
+ revision="main"
6
+ port=5000
7
+ api_key=""
8
+
9
+ # Function to display help message
10
+ usage() {
11
+ echo "Usage: $0 --name <model_name> --api-key <api_key> [--revision <revision>] [--port <port>]"
12
+ exit 1
13
+ }
14
+
15
+ # Parse command-line arguments
16
+ while [[ $# -gt 0 ]]; do
17
+ case $1 in
18
+ --name)
19
+ model="$2"
20
+ shift 2
21
+ ;;
22
+ --api-key)
23
+ api_key="$2"
24
+ shift 2
25
+ ;;
26
+ --revision)
27
+ revision="$2"
28
+ shift 2
29
+ ;;
30
+ --port)
31
+ port="$2"
32
+ shift 2
33
+ ;;
34
+ *)
35
+ usage
36
+ ;;
37
+ esac
38
+ done
39
+
40
+ # Check if mandatory arguments are provided
41
+ if [[ -z "$model" || -z "$api_key" ]]; then
42
+ usage
43
+ fi
44
+
45
+ # Run the Python command with the provided arguments
46
+ python -m vllm.entrypoints.openai.api_server --model "$model" --revision "$revision" --port "$port" --api-key "$api_key"