Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify chatglm3 6b #1119

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
f51bf94
THUDM/chatglm3-6b_added_in_nightly_models
Aniruddha521 Oct 29, 2024
064d8ad
checked
Aniruddha521 Oct 30, 2024
6122d99
Merge branch 'openvinotoolkit:master' into verify_chatglm3-6b
Aniruddha521 Oct 30, 2024
a3a01ee
extended SUPPORTED_MODELS
Aniruddha521 Oct 31, 2024
bdfb5b4
Merge branch 'openvinotoolkit:master' into verify_chatglm3-6b
Aniruddha521 Oct 31, 2024
53711c5
updated -causal_lm_cpp.yml-removed-cpp-prompt_lookup_decoding_lm-ubun…
Aniruddha521 Nov 1, 2024
4532c96
updated_supported_model.md_as_asked
Aniruddha521 Nov 1, 2024
13c1d97
Merge branch 'verify_chatglm3-6b' of github.com:Aniruddha521/openvino…
Aniruddha521 Nov 1, 2024
e2c73b8
Update SUPPORTED_MODELS.md
Aniruddha521 Nov 1, 2024
c190798
updated-causal-lm
Aniruddha521 Nov 1, 2024
2e2b293
Update causal_lm_cpp.yml
Aniruddha521 Nov 4, 2024
c4619a8
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Nov 5, 2024
9292757
updating branch
Aniruddha521 Nov 5, 2024
4028323
Updated cpp-prompt_lookup_decoding_lm-ubuntu and cpp-greedy_causal_lm…
Aniruddha521 Nov 5, 2024
b70302c
Update causal_lm_cpp.yml
Aniruddha521 Nov 5, 2024
f251985
Update causal_lm_cpp.yml
Aniruddha521 Nov 5, 2024
08d7701
Merge branch 'verify_chatglm3-6b' of github.com:Aniruddha521/openvino…
Aniruddha521 Nov 5, 2024
87db456
updated causal_lm_cpp.yml
Aniruddha521 Nov 5, 2024
2e12370
Updated
Aniruddha521 Nov 6, 2024
53c9a80
Merge branch 'master' into verify_chatglm3-6b
Wovchena Nov 7, 2024
65b7891
Update causal_lm_cpp.yml
Aniruddha521 Nov 7, 2024
f99f6f6
Merge remote-tracking branch 'upstream/master' into verify_chatglm3-6b
Aniruddha521 Nov 7, 2024
996fe65
Merge branch 'verify_chatglm3-6b' of github.com:Aniruddha521/openvino…
Aniruddha521 Nov 7, 2024
83ab7c4
Sync_and_Merged
Aniruddha521 Nov 11, 2024
30133b9
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Nov 11, 2024
93d8ca0
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Nov 12, 2024
ccd9ba9
tokenizers
Aniruddha521 Nov 12, 2024
d302833
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Nov 12, 2024
cca410a
slight modification
Aniruddha521 Nov 12, 2024
6a8c40b
Merge branch 'verify_chatglm3-6b' of github.com:Aniruddha521/openvino…
Aniruddha521 Nov 12, 2024
bdd716c
Update causal_lm_cpp.yml
Aniruddha521 Nov 5, 2024
35fd401
checking
Aniruddha521 Nov 12, 2024
55f493b
usual check
Aniruddha521 Nov 12, 2024
c2c2726
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Nov 12, 2024
c3e0ec0
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Nov 13, 2024
cafa42a
Update causal_lm_cpp.yml
Aniruddha521 Nov 13, 2024
506a895
usual check
Aniruddha521 Nov 12, 2024
50c4aec
Merge branch 'verify_chatglm3-6b' of github.com:Aniruddha521/openvino…
Aniruddha521 Nov 13, 2024
0d6e58e
minor changes
Aniruddha521 Nov 13, 2024
0f39e8c
few modification
Aniruddha521 Nov 22, 2024
1541e17
Merge branch 'openvinotoolkit:master' into verify_chatglm3-6b
Aniruddha521 Nov 23, 2024
a58887f
Update causal_lm_cpp.yml
Aniruddha521 Nov 23, 2024
05033a1
Merge branch 'openvinotoolkit:master' into verify_chatglm3-6b
Aniruddha521 Nov 25, 2024
3abadc6
Update causal_lm_cpp.yml
Aniruddha521 Nov 26, 2024
1341022
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Nov 26, 2024
b5435a4
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Nov 28, 2024
ebcf18e
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Nov 29, 2024
2dde652
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Nov 29, 2024
e02036c
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Nov 29, 2024
9fa72e6
modification in github workflow(casual_lm_cpp)
Aniruddha521 Nov 29, 2024
96d4538
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Dec 3, 2024
d55b6f7
Suggested changes
Aniruddha521 Dec 4, 2024
a0565e6
Merge branch 'verify_chatglm3-6b' of github.com:Aniruddha521/openvino…
Aniruddha521 Dec 4, 2024
5ed5a63
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Dec 4, 2024
e7c77b0
Merge branch 'openvinotoolkit:master' into verify_chatglm3-6b
Aniruddha521 Dec 6, 2024
bad9759
tokenizers
Aniruddha521 Dec 6, 2024
0ba2718
cpp-prompt_lookup_decoding_lm-ubuntu
Aniruddha521 Dec 6, 2024
a7ee29e
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Dec 13, 2024
c62bc60
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Dec 19, 2024
63f694a
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Dec 20, 2024
446e153
Merge branch 'openvinotoolkit:master' into verify_chatglm3-6b
Aniruddha521 Dec 30, 2024
13d57e2
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Dec 30, 2024
fee5629
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Dec 31, 2024
f80515d
Merge branch 'master' into verify_chatglm3-6b
Aniruddha521 Dec 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 59 additions & 1 deletion .github/workflows/causal_lm_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,41 @@ jobs:
&& call .\ov\setupvars.bat
&& python samples\python\greedy_causal_lm\lora.py .\TinyLlama\TinyLlama-1.1B-intermediate-step-1431k-3T\ adapter_model.safetensors "How to create a table with two columns, one of them has type float, another one has type int?"

cpp-greedy_causal_lm-Chatglm3-6b:
runs-on: ubuntu-20.04-16-cores
Wovchena marked this conversation as resolved.
Show resolved Hide resolved
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install OpenVINO
run: |
mkdir ./ov/
curl ${{ env.l_ov_link }} | tar --directory ./ov/ --strip-components 1 -xz
sudo ./ov/install_dependencies/install_openvino_dependencies.sh
- name: Build app
run: |
source ./ov/setupvars.sh
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release -j
- name: Download and convert and model
run: |
source ./ov/setupvars.sh
python -m pip install --upgrade-strategy eager -r ./samples/requirements.txt
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model THUDM/chatglm3-6b chatglm3-6b --task text-generation-with-past
- run: >
. ./ov/setupvars.sh
&& timeout 2m ./build/samples/cpp/greedy_causal_lm/greedy_causal_lm ./chatglm3-6b/ 69 | diff <(timeout 2m samples/python/greedy_causal_lm/greedy_causal_lm.py ./chatglm3-6b/ 69) -
Wovchena marked this conversation as resolved.
Show resolved Hide resolved
env:
PYTHONPATH: "./build"


cpp-greedy_causal_lm-Qwen-7B-Chat:
runs-on: ubuntu-20.04-16-cores
defaults:
Expand Down Expand Up @@ -463,6 +498,7 @@ jobs:
env:
PYTHONPATH: "./build/:$PYTHONPATH"
LD_LIBRARY_PATH: "./build/openvino_genai/:$LD_LIBRARY_PATH"

cpp-prompt_lookup_decoding_lm-ubuntu:
runs-on: ubuntu-20.04-16-cores
defaults:
Expand Down Expand Up @@ -492,6 +528,7 @@ jobs:
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model Qwen/Qwen-7B-Chat Qwen-7B-Chat --task text-generation-with-past
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model THUDM/chatglm3-6b chatglm3-6b --task text-generation-with-past
- name: run and compare
run: |
source ./ov/setupvars.sh
Expand Down Expand Up @@ -534,6 +571,27 @@ jobs:
assert predicted_greedy == predicted_prompt_lookup
"
echo "Prompt lookup" passed
- name: run and compare
run: |
source ./ov/setupvars.sh

echo 'Code:```python
def add(a, b):
return a + b
```
Question: Can you please add 2 and 3
A:' > ./prompt.txt

./build/samples/cpp/prompt_lookup_decoding_lm/prompt_lookup_decoding_lm ./chatglm3-6b/ "$(<prompt.txt)" > predictions_prompt_lookup.txt
./build/samples/cpp/greedy_causal_lm/greedy_causal_lm ./chatglm3-6b/ "$(<prompt.txt)" > predictions_greedy.txt
python -c "
with open('predictions_greedy.txt', 'r') as f:
predicted_greedy = f.readline()
with open('predictions_prompt_lookup.txt', 'r') as f:
predicted_prompt_lookup = f.readline()
assert predicted_greedy == predicted_prompt_lookup
"
echo "Prompt lookup" passed

cpp-Phi-1_5:
runs-on: ubuntu-20.04-16-cores
Expand Down Expand Up @@ -970,7 +1028,7 @@ jobs:

Overall_Status:
name: ci/gha_overall_status_causal_lm
needs: [cpp-multinomial-greedy_causal_lm-ubuntu, cpp-beam_search_causal_lm-ubuntu, cpp-greedy_causal_lm-windows,
needs: [cpp-multinomial-greedy_causal_lm-ubuntu, cpp-beam_search_causal_lm-ubuntu, cpp-greedy_causal_lm-windows,cpp-greedy_causal_lm-Chatglm3-6b,
cpp-greedy_causal_lm-Qwen-7B-Chat, cpp-beam_search_causal_lm-Qwen1_5-7B-Chat, cpp-beam_search_causal_lm-Phi-2,
cpp-beam_search_causal_lm-notus-7b-v1, cpp-speculative_decoding_lm-ubuntu, cpp-prompt_lookup_decoding_lm-ubuntu,
cpp-Phi-1_5, cpp-greedy_causal_lm-redpajama-3b-chat, cpp-chat_sample-ubuntu, cpp-continuous-batching-ubuntu,
Expand Down
4 changes: 3 additions & 1 deletion src/docs/SUPPORTED_MODELS.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ The pipeline can work with other similar topologies produced by `optimum-intel`
4. `position_ids` (optional) encodes a position of currently generating token in the sequence and a single `logits` output.

> [!NOTE]
> Models should belong to the same family and have the same tokenizers.
>* Models should belong to the same family and have the same tokenizers.
>* `optimum-cli` requires the `--task text-generation-with-past` argument for the `THUDM/chatglm3-6b` model
>* The **beam search** is not supported for `ChatGLM3-6B model`.
Wovchena marked this conversation as resolved.
Show resolved Hide resolved

## Text 2 image models

Expand Down
1 change: 1 addition & 0 deletions tests/python_tests/ov_genai_test_utils.py
Wovchena marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def get_models_list():
"microsoft/phi-1_5",
"microsoft/phi-2",
"THUDM/chatglm2-6b",
"THUDM/chatglm3-6b", # no beam_search
Wovchena marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

@Wovchena Wovchena Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does every python test pass with THUDM/chatglm3-6b? If not, please, mark the failing tests to be skipped. Skips must happen only for that particular model.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For for python tests(including beam search) the output is showing Killed may be due to resource constraints.

image
image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I refer to python tests, not python samples

"Qwen/Qwen2-0.5B-Instruct",
"Qwen/Qwen-7B-Chat",
"Qwen/Qwen1.5-7B-Chat",
Expand Down
Loading