-
Notifications
You must be signed in to change notification settings - Fork 23
Support call/endcall blocks
#81
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
Conversation
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.
This is awesome, thanks @yatarkan !
| prithivMLmods/Qwen2.5-7B-DeepSeek-R1-1M | ||
| prithivMLmods/QwQ-Math-IO-500M | ||
| prithivMLmods/Triangulum-v2-10B | ||
| qingy2024/Falcon3-2x10B-MoE-Instruct |
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.
Is this removal accidental?
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.
This model is removed from HF
https://huggingface.co/qingy2024/Falcon3-2x10B-MoE-Instruct
| EXPECT_THAT([]() { render("{% if 1 %}{% else %}{% elif 1 %}{% endif %}", {}, {}); }, ThrowsWithSubstr("Unterminated if")); | ||
| EXPECT_THAT([]() { render("{% filter trim %}", {}, {}); }, ThrowsWithSubstr("Unterminated filter")); | ||
| EXPECT_THAT([]() { render("{# ", {}, {}); }, ThrowsWithSubstr("Missing end of comment tag")); | ||
|
|
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.
Could you please also add an unterminated call test:
EXPECT_THAT([]() { render("{%- call test -%}", {}, {}); }, ThrowsWithSubstr("Missing end of call tag"));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.
Tests for call and macro added
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.
Thanks again @yatarkan !
I've just lost write access to this repo (left Google over 3 months ago 🤪), @matthewchan-g @Ferev could one of you please merge this one?
|
@ochafik I'm happy to help with merging the PR. There are currently 8 failing checks. Should the PR still be merged or should these failing checks be fixed first? |
|
It looks like the tests are failing because they are attempting to get gated files from HF. |
|
Seems this introduces a memory leak: |
Some models (e.g.
openbmb/MiniCPM3-4B) have macro in their chat templates and execute them with call blocks.This PR:
call/endcallfor calling macro (w/ macro arguments andcaller()syntax) and passing a macro to another macroopenbmb/MiniCPM3-4Bto test modelsFixes #73