Skip to content

Commit

Permalink
common : move arg parser code to arg.cpp (ggerganov#9388)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
ngxson and ggerganov authored Sep 9, 2024
1 parent 293bebe commit bfe76d4
Show file tree
Hide file tree
Showing 36 changed files with 2,281 additions and 2,210 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,7 @@ OBJ_LLAMA = \

OBJ_COMMON = \
common/common.o \
common/arg.o \
common/console.o \
common/ngram-cache.o \
common/sampling.o \
Expand Down Expand Up @@ -1157,6 +1158,11 @@ common/common.o: \
include/llama.h
$(CXX) $(CXXFLAGS) -c $< -o $@

common/arg.o: \
common/arg.cpp \
common/arg.h
$(CXX) $(CXXFLAGS) -c $< -o $@

common/sampling.o: \
common/sampling.cpp \
common/sampling.h \
Expand Down
2 changes: 2 additions & 0 deletions common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ add_library(${TARGET} STATIC
base64.hpp
common.h
common.cpp
arg.h
arg.cpp
sampling.h
sampling.cpp
console.h
Expand Down
Loading

0 comments on commit bfe76d4

Please sign in to comment.