Skip to content

Add tilde operator By @DePasqualeOrg #18 #19

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

Merged
merged 9 commits into from
Jul 10, 2025
Merged

Conversation

johnmai-dev
Copy link
Owner

@johnmai-dev johnmai-dev commented Jul 10, 2025

Modified based on the PR contributed by @DePasqualeOrg.
#18

  • Directly add the tilde operator and set it as additiveBinaryOperator.
  • SmolLM3 ChatTemplate requires the use of raw strings because escape characters are included in the template.

@johnmai-dev johnmai-dev linked an issue Jul 10, 2025 that may be closed by this pull request
@johnmai-dev
Copy link
Owner Author

@johnmai-dev
Copy link
Owner Author

Support for replace is still needed.

{%- set custom_instructions = system_message.replace("/no_think", "").replace("/think", "").rstrip() -%}

@johnmai-dev johnmai-dev merged commit fc1233d into main Jul 10, 2025
2 checks passed
@johnmai-dev
Copy link
Owner Author

Hi @pcuenca !
Can you help add the latest tag to swift-transformers? swift-transformers 0.1.21 does not support Jinja 1.2.1.
Thank you very much.
https://github.com/huggingface/swift-transformers/blob/0.1.21/Package.swift#L16

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.

Parse error on SmolLM3 chat template
2 participants