Skip to content

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed
 

‎.github/workflows/causal_lm_cpp.yml

+27-27
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232
python -m pip install ./thirdparty/openvino_tokenizers/[transformers]
3333
sudo apt-get install libtbb-dev
3434
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model openlm-research/open_llama_3b_v2 open_llama_3b_v2
35-
cmake -DCMAKE_BUILD_TYPE=Release -S ./text_generation/causal_lm/cpp/ -B ./build/
35+
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
3636
cmake --build ./build/ --config Release -j
3737
- name: greedy_causal_lm
3838
run: |
3939
source ./ov/setupvars.sh
40-
./build/greedy_causal_lm ./open_llama_3b_v2/ "return 0"
40+
./build/text_generation/causal_lm/cpp/greedy_causal_lm ./open_llama_3b_v2/ "return 0"
4141
4242
cpp-beam_search_causal_lm-ubuntu:
4343
runs-on: ubuntu-20.04
@@ -60,13 +60,13 @@ jobs:
6060
python -m pip install ./thirdparty/openvino_tokenizers/[transformers]
6161
sudo apt-get install libtbb-dev
6262
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
63-
cmake -DCMAKE_BUILD_TYPE=Release -S ./text_generation/causal_lm/cpp/ -B ./build/
63+
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
6464
cmake --build ./build/ --config Release -j
6565
- name: Compare
6666
run: |
6767
source ./ov/setupvars.sh
6868
69-
timeout 25s ./build/beam_search_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "Why is the Sun yellow?" > ./pred.txt
69+
timeout 25s ./build/text_generation/causal_lm/cpp/beam_search_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "Why is the Sun yellow?" > ./pred.txt
7070
python -c "
7171
import transformers
7272
with open('pred.txt', 'r') as file:
@@ -82,7 +82,7 @@ jobs:
8282
"
8383
echo "Why is the Sun yellow?" passed
8484
85-
timeout 25s ./build/beam_search_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ 69 > ./pred.txt
85+
timeout 25s ./build/text_generation/causal_lm/cpp/beam_search_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ 69 > ./pred.txt
8686
python -c "
8787
import transformers
8888
with open('pred.txt', 'r') as file:
@@ -98,7 +98,7 @@ jobs:
9898
"
9999
echo "69" passed
100100
101-
timeout 25s ./build/beam_search_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ Hi > ./pred.txt
101+
timeout 25s ./build/text_generation/causal_lm/cpp/beam_search_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ Hi > ./pred.txt
102102
python -c "
103103
import transformers
104104
with open('pred.txt', 'r') as file:
@@ -114,7 +114,7 @@ jobs:
114114
"
115115
echo "Hi" passed
116116
117-
timeout 25s ./build/beam_search_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "return 0" > ./pred.txt
117+
timeout 25s ./build/text_generation/causal_lm/cpp/beam_search_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "return 0" > ./pred.txt
118118
python -c "
119119
import transformers
120120
with open('pred.txt', 'r') as file:
@@ -130,7 +130,7 @@ jobs:
130130
"
131131
echo "return 0" passed
132132
133-
./build/beam_search_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "你好! 你好嗎?" > ./pred.txt
133+
./build/text_generation/causal_lm/cpp/beam_search_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "你好! 你好嗎?" > ./pred.txt
134134
python -c "
135135
import transformers
136136
with open('pred.txt', 'r') as file:
@@ -146,7 +146,7 @@ jobs:
146146
"
147147
echo "你好! 你好嗎?" passed
148148
149-
timeout 1m ./build/beam_search_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "Alan Turing was a" "return 0" "你好! 你好嗎?" > ./pred.txt
149+
timeout 1m ./build/text_generation/causal_lm/cpp/beam_search_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "Alan Turing was a" "return 0" "你好! 你好嗎?" > ./pred.txt
150150
python -c "
151151
import transformers
152152
with open('pred.txt', 'r') as file:
@@ -188,7 +188,7 @@ jobs:
188188
python -m pip install --upgrade-strategy eager -r text_generation/causal_lm/cpp/requirements.txt
189189
python -m pip install ./thirdparty/openvino_tokenizers/[transformers]
190190
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
191-
cmake -DCMAKE_BUILD_TYPE=Release -S ./text_generation/causal_lm/cpp/ -B ./build/
191+
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
192192
cmake --build ./build/ --config Release -j
193193
- name: Compare
194194
shell: cmd
@@ -229,12 +229,12 @@ jobs:
229229
python -m pip install ./thirdparty/openvino_tokenizers/[transformers]
230230
sudo apt-get install libtbb-dev
231231
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model Qwen/Qwen-7B-Chat Qwen-7B-Chat
232-
cmake -DCMAKE_BUILD_TYPE=Release -S ./text_generation/causal_lm/cpp/ -B ./build/
232+
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
233233
cmake --build ./build/ --config Release -j
234234
- name: Compare
235235
run: |
236236
source ./ov/setupvars.sh
237-
timeout 50s ./build/beam_search_causal_lm ./Qwen-7B-Chat/ 69 > ./pred.txt
237+
timeout 50s ./build/text_generation/causal_lm/cpp/beam_search_causal_lm ./Qwen-7B-Chat/ 69 > ./pred.txt
238238
239239
cpp-beam_search_causal_lm-Qwen1_5-7B-Chat:
240240
runs-on: ubuntu-20.04-16-cores
@@ -257,12 +257,12 @@ jobs:
257257
python -m pip install ./thirdparty/openvino_tokenizers/[transformers]
258258
sudo apt-get install libtbb-dev
259259
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model Qwen/Qwen1.5-7B-Chat Qwen1.5-7B-Chat
260-
cmake -DCMAKE_BUILD_TYPE=Release -S ./text_generation/causal_lm/cpp/ -B ./build/
260+
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
261261
cmake --build ./build/ --config Release -j
262262
- name: Run
263263
run: |
264264
source ./ov/setupvars.sh
265-
timeout 50s ./build/beam_search_causal_lm ./Qwen1.5-7B-Chat/ "你好!" > ./pred_qwen15.txt
265+
timeout 50s ./build/text_generation/causal_lm/cpp/beam_search_causal_lm ./Qwen1.5-7B-Chat/ "你好!" > ./pred_qwen15.txt
266266
267267
cpp-beam_search_causal_lm-Phi-2:
268268
runs-on: ubuntu-20.04-16-cores
@@ -285,12 +285,12 @@ jobs:
285285
python -m pip install ./thirdparty/openvino_tokenizers/[transformers]
286286
sudo apt-get install libtbb-dev
287287
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model microsoft/phi-2 phi-2
288-
cmake -DCMAKE_BUILD_TYPE=Release -S ./text_generation/causal_lm/cpp/ -B ./build/
288+
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
289289
cmake --build ./build/ --config Release -j 15
290290
- name: Compare
291291
run: |
292292
source ./ov/setupvars.sh
293-
timeout 50s ./build/beam_search_causal_lm ./phi-2/ 69 > ./pred.txt
293+
timeout 50s ./build/text_generation/causal_lm/cpp/beam_search_causal_lm ./phi-2/ 69 > ./pred.txt
294294
295295
cpp-beam_search_causal_lm-notus-7b-v1:
296296
runs-on: ubuntu-20.04-16-cores
@@ -313,12 +313,12 @@ jobs:
313313
python -m pip install ./thirdparty/openvino_tokenizers/[transformers]
314314
sudo apt-get install libtbb-dev
315315
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model argilla/notus-7b-v1 notus-7b-v1
316-
cmake -DCMAKE_BUILD_TYPE=Release -S ./text_generation/causal_lm/cpp/ -B ./build/
316+
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
317317
cmake --build ./build/ --config Release -j
318318
- name: Compare
319319
run: |
320320
source ./ov/setupvars.sh
321-
timeout 50s ./build/beam_search_causal_lm ./notus-7b-v1/ 69 > ./pred.txt
321+
timeout 50s ./build/text_generation/causal_lm/cpp/beam_search_causal_lm ./notus-7b-v1/ 69 > ./pred.txt
322322
323323
cpp-speculative_decoding_lm-ubuntu:
324324
runs-on: ubuntu-20.04-16-cores
@@ -342,13 +342,13 @@ jobs:
342342
sudo apt-get install libtbb-dev
343343
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model databricks/dolly-v2-3b dolly-v2-3b
344344
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model databricks/dolly-v2-7b dolly-v2-7b
345-
cmake -DCMAKE_BUILD_TYPE=Release -S ./text_generation/causal_lm/cpp/ -B ./build/
345+
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
346346
cmake --build ./build/ --config Release -j
347347
- name: run and compare
348348
run: |
349349
source ./ov/setupvars.sh
350350
./build/speculative_decoding_lm ./dolly-v2-3b/ ./dolly-v2-7b/ "Alan Turing was a" > predictions_speculative.txt
351-
./build/greedy_causal_lm ./dolly-v2-7b/ "Alan Turing was a" > predictions_greedy.txt
351+
./build/text_generation/causal_lm/cpp/greedy_causal_lm ./dolly-v2-7b/ "Alan Turing was a" > predictions_greedy.txt
352352
python -c "
353353
with open('predictions_greedy.txt', 'r') as f:
354354
predicted_greedy = f.readline()
@@ -380,7 +380,7 @@ jobs:
380380
python -m pip install ./thirdparty/openvino_tokenizers/[transformers]
381381
sudo apt-get install libtbb-dev
382382
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
383-
cmake -DCMAKE_BUILD_TYPE=Release -S ./text_generation/causal_lm/cpp/ -B ./build/
383+
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
384384
cmake --build ./build/ --config Release -j
385385
- name: run and compare
386386
run: |
@@ -394,7 +394,7 @@ jobs:
394394
A:' > ./prompt.txt
395395
396396
./build/prompt_lookup_decoding_lm ./TinyLlama-1.1B-Chat-v1.0/ "$(<prompt.txt)" > predictions_prompt_lookup.txt
397-
./build/greedy_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "$(<prompt.txt)" > predictions_greedy.txt
397+
./build/text_generation/causal_lm/cpp/greedy_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "$(<prompt.txt)" > predictions_greedy.txt
398398
python -c "
399399
with open('predictions_greedy.txt', 'r') as f:
400400
predicted_greedy = f.readline()
@@ -425,13 +425,13 @@ jobs:
425425
python -m pip install ./thirdparty/openvino_tokenizers/[transformers]
426426
sudo apt-get install libtbb-dev
427427
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model microsoft/phi-1_5 phi-1_5
428-
cmake -DCMAKE_BUILD_TYPE=Release -S ./text_generation/causal_lm/cpp/ -B ./build/
428+
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
429429
cmake --build ./build/ --config Release -j 15
430430
- name: Run Generation
431431
run: |
432432
source ./ov/setupvars.sh
433-
timeout 50s ./build/greedy_causal_lm ./phi-1_5/ "Alan Turing was a" > ./pred_greedy.txt
434-
timeout 50s ./build/beam_search_causal_lm ./phi-1_5/ "Alan Turing was a" > ./pred_beam.txt
433+
timeout 50s ./build/text_generation/causal_lm/cpp/greedy_causal_lm ./phi-1_5/ "Alan Turing was a" > ./pred_greedy.txt
434+
timeout 50s ./build/text_generation/causal_lm/cpp/beam_search_causal_lm ./phi-1_5/ "Alan Turing was a" > ./pred_beam.txt
435435
- name: Compare
436436
run: |
437437
python -c "
@@ -470,13 +470,13 @@ jobs:
470470
python -m pip install ./thirdparty/openvino_tokenizers/[transformers]
471471
sudo apt-get install libtbb-dev
472472
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model ikala/redpajama-3b-chat redpajama-3b-chat
473-
cmake -DCMAKE_BUILD_TYPE=Release -S ./text_generation/causal_lm/cpp/ -B ./build/
473+
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
474474
cmake --build ./build/ --config Release -j
475475
- run: source ./ov/setupvars.sh && convert_tokenizer ./redpajama-3b-chat/ --output ./redpajama-3b-chat/ --with-detokenizer --trust-remote-code
476476
- name: Run Generation
477477
run: |
478478
source ./ov/setupvars.sh
479-
timeout 50s ./build/greedy_causal_lm ./redpajama-3b-chat/ "Alan Turing was a" > ./pred_greedy.txt
479+
timeout 50s ./build/text_generation/causal_lm/cpp/greedy_causal_lm ./redpajama-3b-chat/ "Alan Turing was a" > ./pred_greedy.txt
480480
- name: Compare
481481
run: |
482482
python -c "

0 commit comments

Comments
 (0)
Please sign in to comment.