Skip to content

Commit eaca756

Browse files
author
ochafik
committed
minja: minimalist Jinja templating engine for LLM chat templates
1 parent 5b6d504 commit eaca756

File tree

60 files changed

+4959
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+4959
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ TEST_TARGETS = \
5454
tests/test-grammar-integration \
5555
tests/test-grammar-parser \
5656
tests/test-json-schema-to-grammar \
57+
tests/test-minja \
5758
tests/test-llama-grammar \
5859
tests/test-log \
5960
tests/test-model-load-cancel \
@@ -1573,6 +1574,11 @@ tests/test-antiprompts: tests/test-antiprompts.cpp \
15731574
$(CXX) $(CXXFLAGS) -Iexamples/server -c $< -o $(call GET_OBJ_FILE, $<)
15741575
$(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS)
15751576

1577+
tests/test-minja: tests/test-minja.cpp \
1578+
$(OBJ_ALL)
1579+
$(CXX) $(CXXFLAGS) -Iexamples/server -c $< -o $(call GET_OBJ_FILE, $<)
1580+
$(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS)
1581+
15761582
tests/test-grad0: tests/test-grad0.cpp \
15771583
$(OBJ_GGML)
15781584
$(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<)

common/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ add_library(${TARGET} STATIC
6262
json.hpp
6363
log.cpp
6464
log.h
65+
minja.hpp
6566
ngram-cache.cpp
6667
ngram-cache.h
6768
sampling.cpp

0 commit comments

Comments
 (0)