-
Notifications
You must be signed in to change notification settings - Fork 216
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
Add chatglm #1478
Add chatglm #1478
Conversation
d81bab4
to
615f749
Compare
@mengker33 , Don't you also need to add a test for the language modeling part? Does this PR need to be included in this release or can it wait for the next release? |
Hi, I am trying to use Guadi card do some inference work on Chatglm3-6b , but I continue to have with the following problem although I use the PR 1478. GLM=3 python3 run_generation.py \
--model_name_or_path /data/ZhipuAI/chatglm3-6b \
--use_hpu_graphs \
--use_kv_cache \
--do_sample \
--bf16 \
--trim_logits \
--batch_size 1 \
--max_input_tokens 1024 \
--max_new_tokens 512 \
--reuse_cache \
--use_flash_attention however , I still got the following errors:
As I understand this PR is exactly for chatglm3-6b,but I don't understand why this happens after tried a lots of times. So please help to give some suggestion! |
615f749
to
5664f08
Compare
Hi, I have tried with fast_tests.sh and test_text_generation_example.py, and no errors occurred. |
Hi, I didn't see any inference/pretraining error from my local test, please check if your test goes through the correct glm modeling path in optimum-habana. |
5664f08
to
7e1c410
Compare
Thanks for you reply, I download the chatglm3-6b from the modelscope, I don't know what's your mean by "go throught the correct glm modeling path in optimum-habana", could you kindly expain this? |
7e1c410
to
0b9f898
Compare
You need to check if the model is initialized correctly by going through optimum/habana/transformers/models/chatglm/modeling_chatglm.py instead of the one in your downloaded modeling codes. |
7e06281
to
6374a63
Compare
I tried to run this test and got an error. __________________________________________________________ ERROR collecting tests/test_text_generation_example.py __________________________________________________________ |
I think you are using the old version of this PR, please rebase to the latest and try again, thanks! |
cb23dfe
to
dede6fe
Compare
dede6fe
to
6fe3dfa
Compare
Yes. This was the case. I am able to run the examples in the readme successfully after rebasing. Is that file required? |
ok, thx for your reply and will give a try |
6fe3dfa
to
61a53dd
Compare
Sorry, my bad... I had this baselines/chatglm3_6b.json file locally but forgot to push it to this PR. Really appreciate your test! |
9fe9e0c
to
90ea98b
Compare
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.
Please add this model to the table in the README and in the doc:
Line 192 in 899b364
| Architecture | Training | Inference | <center>Tasks</center> | optimum-habana/docs/source/index.mdx
Line 59 in 899b364
| Architecture | Training | Inference | Tasks |
("THUDM/chatglm2-6b", 1, True, 150, False), | ||
("THUDM/chatglm3-6b", 1, True, 150, False), |
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.
What's the difference between ChatGLM-2 and ChatGLM-3 exactly? To know if we really need to test both
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 don't think there is modeling functional difference, the only difference lies in some customized tokenizer methods' implementation. I removed the test for chatglm2.
90ea98b
to
5715a5d
Compare
Done, thanks! |
Including chatglm2-6b and chatglm3-6b. Co-authored-by: Wei Lin <[email protected]> Co-authored-by: Jianqian Zhou <[email protected]> Co-authored-by: Leo Zhao <[email protected]>
5715a5d
to
862bdfb
Compare
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Co-authored-by: Wei Lin <[email protected]> Co-authored-by: Jianqian Zhou <[email protected]> Co-authored-by: Leo Zhao <[email protected]>
Co-authored-by: Wei Lin <[email protected]> Co-authored-by: Jianqian Zhou <[email protected]> Co-authored-by: Leo Zhao <[email protected]>
What does this PR do?
This PR adds the chatglm model (a custom model), including chatglm2-6b, chatglm3-6b.
The inference test and pretrain example/test are also available.
Fixes # (issue)
Before submitting