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

[MODEL] Add Telechat2 (China Telecom) #1106

Merged
merged 3 commits into from
Jan 20, 2025
Merged

Conversation

1096125073
Copy link
Contributor

Add support for the Telechat model (VLLM now supports the Telechat model).

@Qubitium
Copy link
Collaborator

@1096125073 Do you have HF model url for this model? We need to download this model and ci test

@1096125073
Copy link
Contributor Author

1096125073 commented Jan 20, 2025

@1096125073 Do you have HF model url for this model? We need to download this model and ci test

Yes, you can try this one
https://huggingface.co/Tele-AI/TeleChat2-7B

gptqmodel/models/auto.py Outdated Show resolved Hide resolved
gptqmodel/models/definitions/telechat2.py Outdated Show resolved Hide resolved
gptqmodel/models/definitions/telechat2.py Show resolved Hide resolved
@Qubitium
Copy link
Collaborator

@1096125073 Thank you for the PR. I will have @LRL-ModelCloud take over the PR changes from here. He will fix this PR so it can run correctly in GPTQModel with CI tests. Right now, this code will not run since gptqmodel uses different structure on how to define models.

@1096125073
Copy link
Contributor Author

@1096125073 Thank you for the PR. I will have @LRL-ModelCloud take over the PR changes from here. He will fix this PR so it can run correctly in GPTQModel with CI tests. Right now, this code will not run since gptqmodel uses different structure on how to define models.

Sorry, I just discovered that the properties of this library are different from AutoGPTQ and have been updated

@Qubitium Qubitium changed the title add support for telechat2 [MODEL] Add Telechat2 (China Telecom) Jan 20, 2025
@Qubitium
Copy link
Collaborator

@1096125073 Thank you for the PR. I will have @LRL-ModelCloud take over the PR changes from here. He will fix this PR so it can run correctly in GPTQModel with CI tests. Right now, this code will not run since gptqmodel uses different structure on how to define models.

Sorry, I just discovered that the properties of this library are different from AutoGPTQ and have been updated

No problem. We wil fix this. But stop force-pushing so we can fix this PR.

@1096125073 1096125073 requested a review from Qubitium January 20, 2025 02:52
@Qubitium
Copy link
Collaborator

Qubitium commented Jan 20, 2025

@1096125073 We are testing.

  1. If you are with telechat2 team, please ask manager to add torch_dtype to config.json

https://huggingface.co/Tele-AI/TeleChat2-7B/blob/main/modeling_telechat2.py#L186

The assert codes here are strange. Why is it forcing (asserting) cuda? GPTQModel supports inference on multiple devices and does not require cuda.

@1096125073
Copy link
Contributor Author

@1096125073 We are testing.

  1. If you are with telechat2 team, please ask manager to add torch_dtype to config.json

https://huggingface.co/Tele-AI/TeleChat2-7B/blob/main/modeling_telechat2.py#L186

The assert codes here are strange. Why is it forcing (asserting) cuda? GPTQModel supports inference on multiple devices and does not require cuda.

Sorry, this is being handled by another team, but we are currently organizing the code and submitting the PR to the transformer library. I believe this will be resolved soon.

@Qubitium
Copy link
Collaborator

@1096125073 We are running into dtype assert bugs in forward if we load the original model as bfloat16. float16 can run. Can you confirm the model .bin files are native bfloat16 or float16?

@1096125073
Copy link
Contributor Author

@1096125073 We are running into dtype assert bugs in forward if we load the original model as bfloat16. float16 can run. Can you confirm the model .bin files are native bfloat16 or float16?

yes, 7b run as float16

@Qubitium Qubitium merged commit 23603f6 into ModelCloud:main Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants