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

Chat templates by @maiqingqiang #104

Merged
merged 9 commits into from
Sep 1, 2024
Merged

Chat templates by @maiqingqiang #104

merged 9 commits into from
Sep 1, 2024

Conversation

pcuenca
Copy link
Member

@pcuenca pcuenca commented Jul 14, 2024

Continuation of #77 by @maiqingqiang, with support for addSpecialTokens to mimic the reference tokenizers implementation.

@johnmai-dev johnmai-dev mentioned this pull request Jul 14, 2024
@johnmai-dev
Copy link
Contributor

Nice 👍

@johnmai-dev
Copy link
Contributor

Hi @pcuenca! Can you help review https://github.com/maiqingqiang/Jinja? This repo already meets most of the Jinja Chat Templates. Also, you're invited to be a Jinja Collaborator.🤝🏻

@johnmai-dev
Copy link
Contributor

Hi @pcuenca! Can you help review https://github.com/maiqingqiang/Jinja? This repo already meets most of the Jinja Chat Templates. Also, you're invited to be a Jinja Collaborator.🤝🏻

https://github.com/maiqingqiang/Jinja/invitations

@pcuenca
Copy link
Member Author

pcuenca commented Jul 16, 2024

Hi @pcuenca! Can you help review https://github.com/maiqingqiang/Jinja? This repo already meets most of the Jinja Chat Templates. Also, you're invited to be a Jinja Collaborator.🤝🏻

Thank you @maiqingqiang! I'm travelling and a bit slow to respond, I'll be happy to take a look next week!

@johnmai-dev
Copy link
Contributor

Hi @pcuenca! Can you help review https://github.com/maiqingqiang/Jinja? This repo already meets most of the Jinja Chat Templates. Also, you're invited to be a Jinja Collaborator.🤝🏻

Thank you @maiqingqiang! I'm travelling and a bit slow to respond, I'll be happy to take a look next week!

Thank you @pcuenca !🍻

@pcuenca
Copy link
Member Author

pcuenca commented Jul 18, 2024

Thoughts on merging this @FL33TW00D, @Vaibhavs10 ?

When I'm back at my desk I'm planning to take a closer look at the template engine that @maiqingqiang created, but it works fine already. Some potential changes we would want to do before merging are:

  • Add some additional tests, currently we are just testing Mistral without a system prompt.
  • Remove the padding logic, as we are not using it anywhere else in the project. It might make more sense to address it as another PR globally for the project. But we can still keep it there if that's easier.

Any other thoughts or details?

@mzbac
Copy link
Contributor

mzbac commented Aug 9, 2024

Looking forward to this feature, thanks for the great work 🚀

Copy link
Member

@Vaibhavs10 Vaibhavs10 left a comment

Choose a reason for hiding this comment

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

Sorry I missed this earlier:

Add some additional tests, currently we are just testing Mistral without a system prompt.
Remove the padding logic, as we are not using it anywhere else in the project. It might make more sense to address it as another PR globally for the project. But we can still keep it there if that's easier.

Nicely done (from my very limited swift knowledge! I think a few tests and we should merge it and follow up all other updates to a new PR.

@johnmai-dev
Copy link
Contributor

johnmai-dev commented Aug 31, 2024

Currently, I am developing a MacOS App - ChatMLX based on this PR. Looking forward to the merge of this PR.
https://github.com/maiqingqiang/ChatMLX/releases/tag/beta

@pcuenca

@pcuenca
Copy link
Member Author

pcuenca commented Aug 31, 2024

Hi @maiqingqiang! I'm going to try to merge to unblock you, sorry for the delay! Do you need the padding logic? There are some conflicts that would be easier to resolve if we can remove it and add in a different PR.

@johnmai-dev
Copy link
Contributor

Hi @maiqingqiang! I'm going to try to merge to unblock you, sorry for the delay! Do you need the padding logic? There are some conflicts that would be easier to resolve if we can remove it and add in a different PR.

Hi @pcuenca . Thank! I don't need the padding logic. You can remove it.

@pcuenca
Copy link
Member Author

pcuenca commented Sep 1, 2024

Tests pass, merging now!

Thanks a lot for this amazing contribution, @maiqingqiang, and also for your patience! 🙌 We can add tests and get back to supporting padding in a future PR :)

@pcuenca pcuenca merged commit 5d89b5d into main Sep 1, 2024
1 check passed
@pcuenca pcuenca deleted the chat-templates branch September 1, 2024 14:58
@johnmai-dev
Copy link
Contributor

Thank you very much 🤝🏻🤝🏻 @pcuenca

@johnmai-dev
Copy link
Contributor

Hi @pcuenca, could you please tag a new release for swift-transformers?

@pcuenca
Copy link
Member Author

pcuenca commented Sep 4, 2024

https://github.com/huggingface/swift-transformers/releases/tag/0.1.10

@johnmai-dev
Copy link
Contributor

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.

4 participants