Skip to content

Commit bfe76d4

Browse files
ngxsonggerganov
andauthored
common : move arg parser code to arg.cpp (ggml-org#9388)
* common : move arg parser to arg.cpp * better categorize args * add cmake * missing climits * missing cstdarg * common : more explicit includes * fix build * refactor gpt_params_parse * update server readme * fix test --------- Co-authored-by: Georgi Gerganov <[email protected]>
1 parent 293bebe commit bfe76d4

File tree

36 files changed

+2281
-2210
lines changed

36 files changed

+2281
-2210
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,7 @@ OBJ_LLAMA = \
925925

926926
OBJ_COMMON = \
927927
common/common.o \
928+
common/arg.o \
928929
common/console.o \
929930
common/ngram-cache.o \
930931
common/sampling.o \
@@ -1157,6 +1158,11 @@ common/common.o: \
11571158
include/llama.h
11581159
$(CXX) $(CXXFLAGS) -c $< -o $@
11591160

1161+
common/arg.o: \
1162+
common/arg.cpp \
1163+
common/arg.h
1164+
$(CXX) $(CXXFLAGS) -c $< -o $@
1165+
11601166
common/sampling.o: \
11611167
common/sampling.cpp \
11621168
common/sampling.h \

common/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ add_library(${TARGET} STATIC
5454
base64.hpp
5555
common.h
5656
common.cpp
57+
arg.h
58+
arg.cpp
5759
sampling.h
5860
sampling.cpp
5961
console.h

0 commit comments

Comments
 (0)