Skip to content

Commit 97ab664

Browse files
committed
llama : add llama_sampling and combine it with llama_grammar
ggml-ci
1 parent 911b437 commit 97ab664

Some content is hidden

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

45 files changed

+1611
-1554
lines changed

Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,6 @@ OBJ_COMMON = \
923923
common/ngram-cache.o \
924924
common/sampling.o \
925925
common/train.o \
926-
common/grammar-parser.o \
927926
common/build-info.o \
928927
common/json-schema-to-grammar.o
929928

@@ -1163,11 +1162,6 @@ common/console.o: \
11631162
common/console.h
11641163
$(CXX) $(CXXFLAGS) -c $< -o $@
11651164

1166-
common/grammar-parser.o: \
1167-
common/grammar-parser.cpp \
1168-
common/grammar-parser.h
1169-
$(CXX) $(CXXFLAGS) -c $< -o $@
1170-
11711165
common/json-schema-to-grammar.o: \
11721166
common/json-schema-to-grammar.cpp \
11731167
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
@@ -2159,7 +2159,7 @@ struct llama_init_result llama_init_from_gpt_params(gpt_params & params) {
21592159
llama_decode(lctx, llama_batch_get_one(tmp.data(), std::min(tmp.size(), (size_t) params.n_batch), 0, 0));
21602160
llama_kv_cache_clear(lctx);
21612161
llama_synchronize(lctx);
2162-
llama_reset_timings(lctx);
2162+
llama_reset_timings(lctx, nullptr);
21632163
}
21642164

21652165
iparams.model = model;

0 commit comments

Comments
 (0)