Skip to content

chat: replace Jinja2Cpp with minja #3433

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 3 commits into from
Jan 30, 2025
Merged

chat: replace Jinja2Cpp with minja #3433

merged 3 commits into from
Jan 30, 2025

Conversation

cebtenzzre
Copy link
Member

@cebtenzzre cebtenzzre commented Jan 29, 2025

https://github.com/google/minja

This is a much more actively maintained, LLM-specific replacement for Jinja2Cpp. It seems to work much better - slicing and namespaces are supported, and the parser is less strict in places that matter (such as missing spaces around quotes).

We shoudn't need jinja_replacements.cpp anymore, besides aesthetic reasons and DeepSeek compatibility (split -> regex_replace).

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
@cebtenzzre cebtenzzre changed the title chat: try minja instead of Jinja2Cpp chat: replace Jinja2Cpp with minja Jan 30, 2025
@cebtenzzre cebtenzzre marked this pull request as ready for review January 30, 2025 20:07
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
@cebtenzzre cebtenzzre requested a review from manyoso January 30, 2025 20:21
@cebtenzzre cebtenzzre merged commit f914ee5 into main Jan 30, 2025
8 of 17 checks passed
@cebtenzzre cebtenzzre deleted the minja branch January 30, 2025 21:01
cgivre pushed a commit to cgivre/gpt4all that referenced this pull request Feb 4, 2025
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
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.

2 participants