Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
zhaoyu6
sglang
Commits
7d1ebc2d
"vscode:/vscode.git/clone" did not exist on "d77d1901ad0c33f0dbfc74e118442a3cade0cbc2"
Unverified
Commit
7d1ebc2d
authored
Jun 01, 2024
by
Yuanhan Zhang
Committed by
GitHub
May 31, 2024
Browse files
update the script: examples/usage/llava_video/srt_example_llava_v.sh (#491)
parent
83525a1d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
examples/usage/llava_video/srt_example_llava_v.sh
examples/usage/llava_video/srt_example_llava_v.sh
+7
-6
No files found.
examples/usage/llava_video/srt_example_llava_v.sh
View file @
7d1ebc2d
...
@@ -3,20 +3,21 @@
...
@@ -3,20 +3,21 @@
##### USAGE #####
##### USAGE #####
# - First node:
# - First node:
# ```sh
# ```sh
# bash examples/
quick_start
/srt_example_llava_v.sh K 0 YOUR_VIDEO_PATH YOUR_MODEL_PATH FRAMES_PER_VIDEO
# bash examples/
usage/llava_video
/srt_example_llava_v.sh K 0 YOUR_VIDEO_PATH YOUR_MODEL_PATH FRAMES_PER_VIDEO
# ```
# ```
# - Second node:
# - Second node:
# ```sh
# ```sh
# bash examples/
quick_start
/srt_example_llava_v.sh K 1 YOUR_VIDEO_PATH YOUR_MODEL_PATH FRAMES_PER_VIDEO
# bash examples/
usage/llava_video
/srt_example_llava_v.sh K 1 YOUR_VIDEO_PATH YOUR_MODEL_PATH FRAMES_PER_VIDEO
# ```
# ```
# - The K node:
# - The K node:
# ```sh
# ```sh
# bash examples/
quick_start
/srt_example_llava_v.sh K K-1 YOUR_VIDEO_PATH YOUR_MODEL_PATH FRAMES_PER_VIDEO
# bash examples/
usage/llava_video
/srt_example_llava_v.sh K K-1 YOUR_VIDEO_PATH YOUR_MODEL_PATH FRAMES_PER_VIDEO
# ```
# ```
# Replace `K`, `YOUR_VIDEO_PATH`, `YOUR_MODEL_PATH`, and `FRAMES_PER_VIDEO` with your specific details.
# Replace `K`, `YOUR_VIDEO_PATH`, `YOUR_MODEL_PATH`, and `FRAMES_PER_VIDEO` with your specific details.
CURRENT_ROOT
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
# CURRENT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CURRENT_ROOT
=
$(
dirname
"
$0
"
)
echo
${
CURRENT_ROOT
}
echo
${
CURRENT_ROOT
}
...
@@ -64,7 +65,7 @@ echo "Number of GPUs in GPULIST: $LOCAL_CHUNKS"
...
@@ -64,7 +65,7 @@ echo "Number of GPUs in GPULIST: $LOCAL_CHUNKS"
ALL_CHUNKS
=
$((
NUM_NODES
*
LOCAL_CHUNKS
))
ALL_CHUNKS
=
$((
NUM_NODES
*
LOCAL_CHUNKS
))
# Calculate GPUs per chunk
# Calculate GPUs per chunk
GPUS_PER_CHUNK
=
8
GPUS_PER_CHUNK
=
1
echo
$GPUS_PER_CHUNK
echo
$GPUS_PER_CHUNK
...
@@ -93,7 +94,7 @@ for IDX in $(seq 1 $LOCAL_CHUNKS); do
...
@@ -93,7 +94,7 @@ for IDX in $(seq 1 $LOCAL_CHUNKS); do
echo
"Running chunk
$((
$LOCAL_IDX
-
1
))
on GPUs
$CHUNK_GPUS_STR
with port
$PORT
. Attempt
$((
$RETRY_COUNT
+
1
))
"
echo
"Running chunk
$((
$LOCAL_IDX
-
1
))
on GPUs
$CHUNK_GPUS_STR
with port
$PORT
. Attempt
$((
$RETRY_COUNT
+
1
))
"
#!/bin/bash
#!/bin/bash
CUDA_VISIBLE_DEVICES
=
$CHUNK_GPUS_STR
python3
examples/usage/llava_video/
srt_example_llava_v.py
\
CUDA_VISIBLE_DEVICES
=
$CHUNK_GPUS_STR
python3 srt_example_llava_v.py
\
--port
$PORT
\
--port
$PORT
\
--num-chunks
$ALL_CHUNKS
\
--num-chunks
$ALL_CHUNKS
\
--chunk-idx
$((
$LOCAL_IDX
-
1
))
\
--chunk-idx
$((
$LOCAL_IDX
-
1
))
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment