Skip to content

Commit a880be2

Browse files
committed
llama : absorb llama_grammar in llama_sampling
ggml-ci
1 parent a37748d commit a880be2

40 files changed

+1199
-1200
lines changed

Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,6 @@ OBJ_COMMON = \
886886
common/ngram-cache.o \
887887
common/sampling.o \
888888
common/train.o \
889-
common/grammar-parser.o \
890889
common/build-info.o \
891890
common/json-schema-to-grammar.o
892891

@@ -1124,11 +1123,6 @@ common/console.o: \
11241123
common/console.h
11251124
$(CXX) $(CXXFLAGS) -c $< -o $@
11261125

1127-
common/grammar-parser.o: \
1128-
common/grammar-parser.cpp \
1129-
common/grammar-parser.h
1130-
$(CXX) $(CXXFLAGS) -c $< -o $@
1131-
11321126
common/json-schema-to-grammar.o: \
11331127
common/json-schema-to-grammar.cpp \
11341128
common/json-schema-to-grammar.h

common/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ add_library(${TARGET} STATIC
5858
sampling.cpp
5959
console.h
6060
console.cpp
61-
grammar-parser.h
62-
grammar-parser.cpp
6361
json.hpp
6462
json-schema-to-grammar.cpp
6563
train.h

common/common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2127,7 +2127,7 @@ std::tuple<struct llama_model *, struct llama_context *> llama_init_from_gpt_par
21272127
llama_decode(lctx, llama_batch_get_one(tmp.data(), std::min(tmp.size(), (size_t) params.n_batch), 0, 0));
21282128
llama_kv_cache_clear(lctx);
21292129
llama_synchronize(lctx);
2130-
llama_reset_timings(lctx, nullptr, nullptr);
2130+
llama_reset_timings(lctx, nullptr);
21312131
}
21322132

21332133
return std::make_tuple(model, lctx);

0 commit comments

Comments
 (0)