-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Add Jinja template support #11016
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
Add Jinja template support #11016
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
abd274a
Copy minja from https://github.com/google/minja/commit/58f0ca6dd74bcb…
e5113e8
Add --jinja and --chat-template-file flags
80138d9
Add missing <optional> include
06b5159
Avoid pr
8000
int in get_hf_chat_template.py
ce48584
No designated initializers yet
389d79b
Try and work around msvc++ non-macro max resolution quirk
238b968
Update test_chat_completion.py
cb72cf1
Merge remote-tracking branch 'origin/master' into jinja
78861a3
Wire LLM_KV_TOKENIZER_CHAT_TEMPLATE_N in llama_model_chat_template
1aac99a
Refactor test-chat-template
7c84ebc
Test templates w/ minja
18f257b
Fix deprecation
8dd4f33
Add --jinja to llama-run
c04c50e
Merge remote-tracking branch 'origin/master' into jinja
a6afb27
Update common_chat_format_example to use minja template wrapper
b4083e4
Test chat_template in e2e test
b7e2171
Update utils.py
a57bb94
Update test_chat_completion.py
4daae0b
Update run.cpp
1b3bb7e
Update arg.cpp
ochafik 3ed670b
Merge remote-tracking branch 'origin/master' into jinja
b75d062
Refactor common_chat_* functions to accept minja template + use_jinja…
40db789
Merge remote-tracking branch 'origin/master' into jinja
81c0d43
Attempt to fix linkage of LLAMA_CHATML_TEMPLATE
d5fa351
Revert LLAMA_CHATML_TEMPLATE refactor
ee1e10e
Normalize newlines in test-chat-templates for windows tests
e63520f
Forward decl minja::chat_template to avoid eager json dep
33322e8
Flush stdout in chat template before potential crash
5074e6f
Fix copy elision warning
fc60802
Rm unused optional include
0e74c9d
Add missing optional include to server.cpp
e3c475c
Disable jinja test that has a cryptic windows failure
cc50356
minja: fix vigogne (https://github.com/google/minja/pull/22)
153e852
Apply suggestions from code review
ochafik db9dd0c
Finish suggested renamings
c9e8fdd
Move chat_templates inside server_context + remove mutex
8c84aef
Update --chat-template-file w/ recent change to --chat-template
154bfaa
Refactor chat template validation
099f983
Merge remote-tracking branch 'origin/master' into jinja
54a669e
Guard against missing eos/bos tokens (null token otherwise throws in …
8348c60
Warn against missing eos / bos tokens when jinja template references …
ee475d2
rename: common_chat_template[s]
8a7c89e
reinstate assert on chat_templates.template_default
8347da9
Update minja to https://github.com/google/minja/commit/b8437df626ac6c…
ff2cce5
Update minja to https://github.com/google/minja/pull/25
9d8ebd6
Update minja from https://github.com/google/minja/pull/27
8000
cbb9b81
rm unused optional header
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Wire LLM_KV_TOKENIZER_CHAT_TEMPLATE_N in llama_model_chat_template
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.