llama.cpp
Add Jinja template support
#11016
Merged

Add Jinja template support #11016

ochafik merged 47 commits into ggml-org:master from ochafik:jinja
ochafik
github-actions github-actions added script
github-actions github-actions added examples
github-actions github-actions added python
github-actions github-actions added server
Copy minja from https://github.com/google/minja/commit/58f0ca6dd74bcb…
abd274a4
Add --jinja and --chat-template-file flags
e5113e8d
ochafik ochafik force pushed from 4ec61511 to e5113e8d 309 days ago
Add missing <optional> include
80138d90
Avoid print in get_hf_chat_template.py
06b51595
No designated initializers yet
ce48584f
Try and work around msvc++ non-macro max resolution quirk
389d79b6
ochafik ochafik force pushed from c3b07a85 to 389d79b6 309 days ago
Update test_chat_completion.py
238b9689
ericcurtin
Merge remote-tracking branch 'origin/master' into jinja
cb72cf1f
Wire LLM_KV_TOKENIZER_CHAT_TEMPLATE_N in llama_model_chat_template
78861a3e
Refactor test-chat-template
1aac99ad
Test templates w/ minja
7c84ebc2
github-actions github-actions added testing
Fix deprecation
18f257bf
Add --jinja to llama-run
8dd4f334
Merge remote-tracking branch 'origin/master' into jinja
c04c50e4
Update common_chat_format_example to use minja template wrapper
a6afb273
Test chat_template in e2e test
b4083e41
Update utils.py
b7e21710
Update test_chat_completion.py
a57bb94e
Update run.cpp
4daae0bf
ochafik ochafik marked this pull request as ready for review 295 days ago
ochafik ochafik requested a review from ngxson ngxson 295 days ago
ochafik Update arg.cpp
1b3bb7ee
Merge remote-tracking branch 'origin/master' into jinja
3ed670b6
ericcurtin
ericcurtin approved these changes on 2025-01-14
ngxson
Refactor common_chat_* functions to accept minja template + use_jinja…
b75d0622
Merge remote-tracking branch 'origin/master' into jinja
40db7896
ochafik
Attempt to fix linkage of LLAMA_CHATML_TEMPLATE
81c0d437
Revert LLAMA_CHATML_TEMPLATE refactor
d5fa351a
Normalize newlines in test-chat-templates for windows tests
ee1e10e2
ggerganov
ggerganov commented on 2025-01-18
Forward decl minja::chat_template to avoid eager json dep
e63520f3
Flush stdout in chat template before potential crash
33322e82
Fix copy elision warning
5074e6fe
Rm unused optional include
fc60802b
ericcurtin
Add missing optional include to server.cpp
0e74c9da
ochafik
ericcurtin
ericcurtin
ericcurtin
Disable jinja test that has a cryptic windows failure
e3c475cd
slaren
slaren
minja: fix vigogne (https://github.com/google/minja/pull/22)
cc503564
ochafik
ericcurtin
ericcurtin
ochafik
ericcurtin
ochafik
ggerganov
ggerganov commented on 2025-01-20
ngxson
ngxson commented on 2025-01-20
ochafik Apply suggestions from code review
153e8524
Finish suggested renamings
db9dd0c1
Move chat_templates inside server_context + remove mutex
c9e8fdd7
ngxson
ngxson commented on 2025-01-20
ngxson
ngxson commented on 2025-01-20
Update --chat-template-file w/ recent change to --chat-template
8c84aefd
ngxson
ngxson commented on 2025-01-20
Refactor chat template validation
154bfaaa
Merge remote-tracking branch 'origin/master' into jinja
099f9839
ngxson
ngxson approved these changes on 2025-01-20
Guard against missing eos/bos tokens (null token otherwise throws in …
54a669e0
Warn against missing eos / bos tokens when jinja template references …
8348c605
rename: common_chat_template[s]
ee475d2f
reinstate assert on chat_templates.template_default
8a7c89e6
Update minja to https://github.com/google/minja/commit/b8437df626ac6c…
8347da90
Update minja to https://github.com/google/minja/pull/25
ff2cce57
slaren
slaren commented on 2025-01-21
Update minja from https://github.com/google/minja/pull/27
9d8ebd62
ggerganov
ggerganov approved these changes on 2025-01-21
ngxson
ochafik ochafik force pushed from cec1ad7a to 9d8ebd62 287 days ago
rm unused optional header
cbb9b819
ochafik ochafik merged 6171c9d2 into master 287 days ago
ochafik
fairydreaming
ochafik
fairydreaming
ochafik
ggerganov
ochafik
whoreson

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone