-
Notifications
You must be signed in to change notification settings - Fork 193
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
base: master
Are you sure you want to change the base?
Verify chatglm3 6b #1119
Conversation
…tu-Chatglm3-6b-and-merged-in-cpp-prompt_lookup_decoding_lm-ubuntu
….genai into verify_chatglm3-6b updating_local_directory
@Wovchena can you please guide me that what possibly gone wrong for |
…-Chatglm3-6b incausal_lm_cpp.yml
….genai into verify_chatglm3-6b merged branch
You need to find out why C++ and Python greedy produce different outputs and fix it. Other model runs are aligned, that means the problem is not about the samples themselves. This PR diff shows that you've modified |
@Wovchena |
Something got broken in one of dependencies. All new PRs fail the same way. This is not your fault. |
@Wovchena |
.github/workflows/causal_lm_cpp.yml
Outdated
samples/python/greedy_causal_lm/greedy_causal_lm.py ./chatglm3-6b/ "$(<prompt.txt)"| tee py.txt | ||
echo '-----------------------------------------------------------------------------------------------' | ||
diff cpp.txt py.txt | ||
echo "Why sun is yellow?" passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo "Why sun is yellow?" passed |
It's the last command in this step and there are no other tests in this step anyway. So completing it already signals that the test passed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
.github/workflows/causal_lm_cpp.yml
Outdated
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 | ||
print('Passes') | ||
" | ||
echo "Prompt lookup" passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 | |
print('Passes') | |
" | |
echo "Prompt lookup" passed | |
diff predictions_greedy.txt predictions_prompt_lookup.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I too tried with the same approach earlier but it end up giving error because diff predictions_greedy.txt predictions_prompt_lookup.txt
is comparing the whole contain of the file which are not same as you can see
-------------------------------Prompt lookup Generated-----------------------------------------
Yes, I can add 2 and 3
B: The sum of 2 and 3 is 5
Answer: B
Explanation: The function `add` takes two arguments `a` and `b` and returns their sum. When we call the-------------------------------Greedy Generated------------------------------------------------
Yes, I can add 2 and 3
B: The sum of 2 and 3 is 5
Answer: B
Explanation: The function `add` takes two arguments `a` and `b` and returns their sum. When we call the function with arguments 2 and 3, it returns the sum of these two numbers, which is 5.
-----------------------------------------------------------------------------------------------
if I use diff predictions_greedy.txt predictions_prompt_lookup.txt
command then the error will look like
6c6
< Explanation: The function `add` takes two arguments `a` and `b` and returns their sum. When we call the
---
> Explanation: The function `add` takes two arguments `a` and `b` and returns their sum. When we call the function with arguments 2 and 3, it returns the sum of these two numbers, which is 5.
Which is obvious since both are not same, but it passes in the assertion portion because predicted_prompt_lookup = Yes, I can add 2 and 3 #first line of the generated text using prompt decoding
and predicted_greedy = Yes, I can add 2 and 3 #first line of the generated text using greedy decoding
Any suggestion from your side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to come up with an explanation why the generated text is different and probably fix it.
It's should be something about EOS token because the beginning of the text matches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iefode said that she encountered similar issue. So maybe it will be fixed
@@ -25,6 +25,7 @@ def get_models_list(): | |||
"microsoft/phi-1_5", | |||
"microsoft/phi-2", | |||
"THUDM/chatglm2-6b", | |||
"THUDM/chatglm3-6b", # no beam_search |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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
….genai into verify_chatglm3-6b Merging remote and local
I proceed as mentioned in the task #259 with the following changes.
1) Extended the nightly_model in the file openvino.genai/tests/python_tests/ov_genai_test_utils.py
2) Added model to
openvino.genai/.github/workflows/causal_lm_cpp.yml
Line 62 in 8470250
run: |
cpp-greedy_causal_lm-Chatglm3-6b and cpp-prompt_lookup_decoding_lm-ubuntu-Chatglm3-6b
3) Extended the supported_model_list and added note
Note
The
beam_search_causal_lm
is not supported in theChatGLM3-6B model
.