-
Notifications
You must be signed in to change notification settings - Fork 9
343 lines (304 loc) · 13.1 KB
/
rbln_optimum_ci.yaml
File metadata and controls
343 lines (304 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
name: CI / PR / vllm-rbln with optimum
on:
workflow_dispatch:
inputs:
ref:
description: "ref to checkout"
required: false
type: string
pr_number:
description: "PR number to checkout (optional)"
required: false
type: string
rebel_compiler_version:
description: "Version of rebel-compiler to use (optional, will fetch latest if not provided)"
required: false
type: string
optimum_rbln_version:
description: "Version of optimum-rbln to use (optional)"
required: false
type: string
workflow_call:
inputs:
ref:
description: "ref to checkout"
required: false
type: string
pr_number:
description: "PR number to checkout (optional)"
required: false
type: string
rebel_compiler_version:
description: "Version of rebel-compiler to use"
required: false
type: string
optimum_rbln_version:
description: "Version of optimum-rbln to use (optional)"
required: false
type: string
env:
REBEL_VLLM_PRE_COMPILED_DIR: ${{ secrets.VLLM_PRE_COMPILED_DIR }}
jobs:
get-compiler-version:
if: ${{ !inputs.rebel_compiler_version }}
uses: ./.github/workflows/rbln_utils_get_compiler_version_ci.yaml
secrets: inherit
test_vllm_rbln_rsd1:
needs: [get-compiler-version]
if: ${{ always() && !cancelled() }}
name: Optimum Test CI RSD 1
runs-on: rbln-sw-k8s-ca22-1
container:
image: mcr.microsoft.com/devcontainers/python:3.12
defaults:
run:
shell: bash
env:
NUM_INPUT_PROMPT: 1
RBLN_VERBOSE: 6
VLLM_LOGGING_LEVEL: DEBUG
steps:
- name: Install uv CLI
run: |
pip install uv
- name: Install rebel-compiler
run: |
for i in {1..3}; do
apt-get update && break || sleep 10
done
apt-get install -y build-essential
export CXX=$(which g++)
uv pip uninstall --system rebel-compiler
VERSION=${{ inputs.rebel_compiler_version || needs.get-compiler-version.outputs.compiler_version }}
uv pip install --system --extra-index-url ${{ secrets.DEV_PKG_URL }} rebel-compiler==${VERSION}
- name: Checkout current repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.sha }}
submodules: recursive
fetch-depth: 0
- name: Fix git ownership
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Uninstall existing vllm-rbln
run: |
uv pip uninstall --system vllm-rbln
- name: Build vllm-rbln wheel
run: |
uv pip install --system build
python -m build --wheel
- name: Install local vllm-rbln package and dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 3
retry_wait_seconds: 30
retry_on: any
shell: bash
command: |
uv pip install --system packaging setuptools wheel simphile pynvml huggingface_hub setuptools_scm fire pytest pytest-asyncio
VERSION=${{ inputs.optimum_rbln_version }}
if [ -n "${{ inputs.optimum_rbln_version }}" ]; then
uv pip install --system --force-reinstall --no-cache-dir dist/vllm_rbln*.whl --constraint <(echo "optimum-rbln==${{ inputs.optimum_rbln_version }}") --index-url http://pypi-cache.devpi.svc.cluster.local/root/pypi/+simple/ --extra-index-url https://pypi.org/simple
echo "optimum-rbln ${{ inputs.optimum_rbln_version }}"
else
uv pip install --system --force-reinstall --no-cache-dir dist/vllm_rbln*.whl --index-url http://pypi-cache.devpi.svc.cluster.local/root/pypi/+simple/ --extra-index-url https://pypi.org/simple
fi
- name: Run gemma2 model (hybrid attention) (V1)
run: >
python3 examples/optimum/run_basic.py
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/gemma-2-2b-8k_batch4
- name : Run encoder-decoder (V1)
run: >
python3 examples/optimum/run_encoder_decoder.py
--num_input_prompt ${{ env.NUM_INPUT_PROMPT }}
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/rbln_bart-small_batch2
- name : Run text embedding model (V1)
run: >
python3 examples/optimum/run_encoder_only.py
--num_input_prompt ${{ env.NUM_INPUT_PROMPT }}
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/bge-m3-1k-batch4
--q_prompt_txt ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/prompts/q_prompts.txt
--p_prompt_txt ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/prompts/p_prompts.txt
--golden_json ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/golden/golden_bge_m3_result_qp_prompts.json
test_vllm_rbln_rsd4:
needs: [get-compiler-version]
if: ${{ always() && !cancelled() }}
name: Optimum Test CI RSD 4
runs-on: rbln-sw-k8s-ca22-4
container:
image: mcr.microsoft.com/devcontainers/python:3.12
defaults:
run:
shell: bash
env:
NUM_INPUT_PROMPT: 1
RBLN_VERBOSE: 6
VLLM_LOGGING_LEVEL: DEBUG
steps:
- name: Install uv CLI
run: |
pip install uv
- name: Install rebel-compiler
run: |
for i in {1..3}; do
apt-get update && break || sleep 10
done
apt-get install -y build-essential
export CXX=$(which g++)
uv pip uninstall --system rebel-compiler
VERSION=${{ inputs.rebel_compiler_version || needs.get-compiler-version.outputs.compiler_version }}
uv pip install --system --extra-index-url ${{ secrets.DEV_PKG_URL }} rebel-compiler==${VERSION}
- name: Checkout current repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.sha }}
submodules: recursive
fetch-depth: 0
- name: Fix git ownership
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Uninstall existing vllm-rbln
run: |
uv pip uninstall --system vllm-rbln
- name: Build vllm-rbln wheel
run: |
uv pip install --system build
python -m build --wheel
- name: Install local vllm-rbln package and dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 3
retry_wait_seconds: 30
retry_on: any
shell: bash
command: |
uv pip install --system packaging setuptools wheel simphile pynvml huggingface_hub setuptools_scm fire pytest pytest-asyncio
VERSION=${{ inputs.optimum_rbln_version }}
if [ -n "${{ inputs.optimum_rbln_version }}" ]; then
uv pip install --system --force-reinstall --no-cache-dir dist/vllm_rbln*.whl --constraint <(echo "optimum-rbln==${{ inputs.optimum_rbln_version }}") --index-url http://pypi-cache.devpi.svc.cluster.local/root/pypi/+simple/ --extra-index-url https://pypi.org/simple
echo "optimum-rbln ${{ inputs.optimum_rbln_version }}"
else
uv pip install --system --force-reinstall --no-cache-dir dist/vllm_rbln*.whl --index-url http://pypi-cache.devpi.svc.cluster.local/root/pypi/+simple/ --extra-index-url https://pypi.org/simple
fi
- name: Run decoder-only test (eager attn) (V1)
run: >
python3 examples/optimum/run_decoder_only.py
--num_input_prompt ${{ env.NUM_INPUT_PROMPT }}
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/llama2-7b_batch2
--prompt_txt ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/prompts/copy_prompts.txt
--golden_json ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/golden/golden_llama7b_result_copy_prompts.json
- name: Run decoder-only test (Flash-attention mode) (V1)
run: >
python3 examples/optimum/run_decoder_only.py
--num_input_prompt ${{ env.NUM_INPUT_PROMPT }}
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/llama3_2-3b-128k_kv16k_batch4
--prompt_txt ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/prompts/copy_prompts.txt
--golden_json ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/golden/golden_llama3_2_3b_instruct_128k_copy_prompts.json
- name : Run Llava-next (Eager mode) (V1)
run: >
python3 examples/optimum/run_llava.py
--num_input_prompt ${{ env.NUM_INPUT_PROMPT }}
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/llava-v1.6-mistral-7b-hf-32k-b4/
- name : Run Llava-next (Eager mode) (V0)
run: >
VLLM_USE_V1=0 python3 examples/optimum/run_llava.py
--num_input_prompt ${{ env.NUM_INPUT_PROMPT }}
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/llava-v1.6-mistral-7b-hf-32k-b4/
- name : Run Llava-next (Flash-attention mode) (V1)
run: >
python3 examples/optimum/run_llava.py
--num_input_prompt ${{ env.NUM_INPUT_PROMPT }}
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/llava-v1.6-mistral-7b-hf-32k-b4-kv16k
- name : Run Llava-next (Flash-attention mode) (V0)
run: >
VLLM_USE_V1=0 python3 examples/optimum/run_llava.py
--num_input_prompt ${{ env.NUM_INPUT_PROMPT }}
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/llava-v1.6-mistral-7b-hf-32k-b4-kv16k
- name : Run Idefics3 (Eager mode) (V1)
run: >
python3 examples/optimum/run_idefics3.py
--num_input_prompt ${{ env.NUM_INPUT_PROMPT }}
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/idefics3-8b-llama3-32k-b4
- name : Run Idefics3 (Flash-attention mode) (V1)
run: >
python3 examples/optimum/run_idefics3.py
--num_input_prompt ${{ env.NUM_INPUT_PROMPT }}
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/idefics3-8b-llama3-32k-b4-kv16k
- name : Run Blip2 (V1)
run: >
python3 examples/optimum/run_blip2.py
--num_input_prompt ${{ env.NUM_INPUT_PROMPT }}
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/blip2-opt-2.7b-2k-b4
- name : Run PaliGemma (Eager mode) (V1)
run: >
python3 examples/optimum/run_paligemma.py
--num_input_prompt ${{ env.NUM_INPUT_PROMPT }}
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/paligemma-3b-8k-b4
test_vllm_rbln_rsd8:
needs: [get-compiler-version]
if: ${{ always() && !cancelled() }}
name: Optimum Test CI RSD 8
runs-on: rbln-sw-k8s-ca22-8
container:
image: mcr.microsoft.com/devcontainers/python:3.12
defaults:
run:
shell: bash
env:
NUM_INPUT_PROMPT: 1
RBLN_VERBOSE: 6
VLLM_LOGGING_LEVEL: DEBUG
steps:
- name: Install uv CLI
run: |
pip install uv
- name: Install rebel-compiler
run: |
for i in {1..3}; do
apt-get update && break || sleep 10
done
apt-get install -y build-essential
export CXX=$(which g++)
uv pip uninstall --system rebel-compiler
VERSION=${{ inputs.rebel_compiler_version || needs.get-compiler-version.outputs.compiler_version }}
uv pip install --system --extra-index-url ${{ secrets.DEV_PKG_URL }} rebel-compiler==${VERSION}
- name: Checkout current repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.sha }}
submodules: recursive
fetch-depth: 0
- name: Fix git ownership
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Uninstall existing vllm-rbln
run: |
uv pip uninstall --system vllm-rbln
- name: Build vllm-rbln wheel
run: |
uv pip install --system build
python -m build --wheel
- name: Install local vllm-rbln package and dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 3
retry_wait_seconds: 30
retry_on: any
shell: bash
command: |
uv pip install --system packaging setuptools wheel simphile pynvml huggingface_hub setuptools_scm fire pytest pytest-asyncio
VERSION=${{ inputs.optimum_rbln_version }}
if [ -n "${{ inputs.optimum_rbln_version }}" ]; then
uv pip install --system --force-reinstall --no-cache-dir dist/vllm_rbln*.whl --constraint <(echo "optimum-rbln==${{ inputs.optimum_rbln_version }}") --index-url http://pypi-cache.devpi.svc.cluster.local/root/pypi/+simple/ --extra-index-url https://pypi.org/simple
echo "optimum-rbln ${{ inputs.optimum_rbln_version }}"
else
uv pip install --system --force-reinstall --no-cache-dir dist/vllm_rbln*.whl --index-url http://pypi-cache.devpi.svc.cluster.local/root/pypi/+simple/ --extra-index-url https://pypi.org/simple
fi
- name : Run Qwen2.5_VL (V1)
run: >
python3 examples/optimum/run_qwen_vl.py
--num_input_prompt ${{ env.NUM_INPUT_PROMPT }}
--model_id ${{ env.REBEL_VLLM_PRE_COMPILED_DIR }}/qwen2_5-vl-7b-32k-b4-kv16k