export-docs --> gen-docs

This commit is contained in:
Xuan Son Nguyen 2024-09-07 19:20:56 +02:00
parent 65b736f9fd
commit 4b96c69a08
5 changed files with 6 additions and 12 deletions

View file

@ -39,7 +39,7 @@ BUILD_TARGETS = \
llama-tokenize \
llama-vdot \
llama-cvector-generator \
llama-export-docs \
llama-gen-docs \
tests/test-c.o
# Binaries only useful for tests
@ -1444,11 +1444,11 @@ examples/server/%.hpp: examples/server/public/% Makefile
echo "unsigned int $${NAME}_len = $(shell cat $< | wc -c );" \
) > $@
llama-export-docs: examples/export-docs/export-docs.cpp \
llama-gen-docs: examples/gen-docs/gen-docs.cpp \
$(OBJ_ALL)
$(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<)
$(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS)
./llama-export-docs
./llama-gen-docs
libllava.a: examples/llava/llava.cpp \
examples/llava/llava.h \

View file

@ -298,7 +298,7 @@ static std::string format(const char * fmt, ...) {
return std::string(buf.data(), size);
}
void gpt_params_handle_model_default(gpt_params & params) {
static void gpt_params_handle_model_default(gpt_params & params) {
if (!params.hf_repo.empty()) {
// short-hand to avoid specifying --hf-file -> default it to --model
if (params.hf_file.empty()) {

View file

@ -386,8 +386,6 @@ bool gpt_params_parse_ex(int argc, char ** argv, gpt_params & params, std::vecto
// print full usage message; it will be called internally by gpt_params_parse() if "-h" is set
void gpt_params_print_usage(gpt_params & params, std::vector<llama_arg> & options);
void gpt_params_handle_model_default(gpt_params & params);
std::string gpt_params_get_system_info(const gpt_params & params);
bool parse_cpu_range(const std::string& range, bool(&boolmask)[GGML_MAX_N_THREADS]);

View file

@ -1,5 +1,5 @@
set(TARGET llama-export-docs)
add_executable(${TARGET} export-docs.cpp)
set(TARGET llama-gen-docs)
add_executable(${TARGET} gen-docs.cpp)
install(TARGETS ${TARGET} RUNTIME)
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
target_compile_features(${TARGET} PRIVATE cxx_std_11)

View file

@ -1,11 +1,7 @@
#include "common.h"
#include "llama.h"
#include <cmath>
#include <cstdio>
#include <fstream>
#include <string>
#include <vector>
// Export usage message (-h) to markdown format