@@ -491,7 +491,6 @@ jobs:
491
491
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
492
492
python -m pip install -r ./samples/requirements.txt
493
493
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
494
- optimum-cli export openvino --trust-remote-code --weight-format fp16 --model Qwen/Qwen-7B-Chat Qwen-7B-Chat --task text-generation-with-past
495
494
- name : run and compare
496
495
run : |
497
496
source ./ov/setupvars.sh
@@ -505,36 +504,22 @@ jobs:
505
504
506
505
./build/samples/cpp/prompt_lookup_decoding_lm/prompt_lookup_decoding_lm ./TinyLlama-1.1B-Chat-v1.0/ "$(<prompt.txt)" > predictions_prompt_lookup.txt
507
506
./build/samples/cpp/text_generation/greedy_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "$(<prompt.txt)" > predictions_greedy.txt
507
+ python ./samples/python/prompt_lookup_decoding_lm/prompt_lookup_decoding_lm.py ./TinyLlama-1.1B-Chat-v1.0/ "$(<prompt.txt)" > predictions_py.txt
508
508
python -c "
509
509
with open('predictions_greedy.txt', 'r') as f:
510
510
predicted_greedy = f.readline()
511
511
with open('predictions_prompt_lookup.txt', 'r') as f:
512
512
predicted_prompt_lookup = f.readline()
513
+ with open('predictions_py.txt', 'r') as f:
514
+ predicted_prompt_lookup_py = f.readline()
513
515
assert predicted_greedy == predicted_prompt_lookup
516
+ assert predicted_greedy == predicted_prompt_lookup_py
517
+ assert predicted_prompt_lookup == predicted_prompt_lookup_py
514
518
"
515
519
echo "Prompt lookup" passed
516
- - name : run and compare (model with seq_length_axis = 1)
517
- run : |
518
- source ./ov/setupvars.sh
519
-
520
- echo 'Code:```python
521
- def add(a, b):
522
- return a + b
523
- ```
524
- Question: Can you please add 2 and 3
525
- A:' > ./prompt.txt
526
-
527
- ./build/samples/cpp/prompt_lookup_decoding_lm/prompt_lookup_decoding_lm ./Qwen-7B-Chat/ "$(<prompt.txt)" > predictions_prompt_lookup.txt
528
- ./build/samples/cpp/text_generation/greedy_causal_lm ./Qwen-7B-Chat/ "$(<prompt.txt)" > predictions_greedy.txt
529
- python -c "
530
- with open('predictions_greedy.txt', 'r') as f:
531
- predicted_greedy = f.readline()
532
- with open('predictions_prompt_lookup.txt', 'r') as f:
533
- predicted_prompt_lookup = f.readline()
534
- assert predicted_greedy == predicted_prompt_lookup
535
- "
536
- echo "Prompt lookup" passed
537
-
520
+ env :
521
+ PYTHONPATH : " ./build/:$PYTHONPATH"
522
+ LD_LIBRARY_PATH : " ./build/openvino_genai/:$LD_LIBRARY_PATH"
538
523
cpp-Phi-1_5 :
539
524
runs-on : ubuntu-20.04-16-cores
540
525
defaults :
0 commit comments