removed llama from common

This commit is contained in:
mike dupont 2023-11-30 06:59:10 -05:00
parent b0024a6be2
commit cd5e1901d9
28 changed files with 56 additions and 29 deletions

View file

@ -513,7 +513,7 @@ override CFLAGS := $(MK_CPPFLAGS) $(CPPFLAGS) $(MK_CFLAGS) $(CFLAGS)
override CXXFLAGS := $(MK_CPPFLAGS) $(CPPFLAGS) $(MK_CXXFLAGS) $(CXXFLAGS) override CXXFLAGS := $(MK_CPPFLAGS) $(CPPFLAGS) $(MK_CXXFLAGS) $(CXXFLAGS)
override CUDA_CXXFLAGS := $(MK_CUDA_CXXFLAGS) $(CUDA_CXXFLAGS) override CUDA_CXXFLAGS := $(MK_CUDA_CXXFLAGS) $(CUDA_CXXFLAGS)
override HOST_CXXFLAGS := $(MK_HOST_CXXFLAGS) $(HOST_CXXFLAGS) override HOST_CXXFLAGS := $(MK_HOST_CXXFLAGS) $(HOST_CXXFLAGS)
override LDFLAGS := $(MK_LDFLAGS) $(LDFLAGS) override LDFLAGS := $(MK_LDFLAGS) $(LDFLAGS) -ldynet
# save CXXFLAGS before we add host-only options # save CXXFLAGS before we add host-only options
NVCCFLAGS := $(NVCCFLAGS) $(CXXFLAGS) $(CUDA_CXXFLAGS) -Wno-pedantic -Xcompiler "$(HOST_CXXFLAGS)" NVCCFLAGS := $(NVCCFLAGS) $(CXXFLAGS) $(CUDA_CXXFLAGS) -Wno-pedantic -Xcompiler "$(HOST_CXXFLAGS)"
@ -587,7 +587,7 @@ clean:
# #
main: examples/main/main.cpp ggml.o llama.o $(COMMON_DEPS) console.o grammar-parser.o $(OBJS) main: examples/main/main.cpp ggml.o llama.o $(COMMON_DEPS) console.o grammar-parser.o $(OBJS)
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS) -ldynet $(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
@echo @echo
@echo '==== Run ./main -h for help. ====' @echo '==== Run ./main -h for help. ===='
@echo @echo
@ -740,3 +740,5 @@ tests/test-tokenizer-1-llama: tests/test-tokenizer-1-llama.cpp ggml.o llama.o $(
tests/test-c.o: tests/test-c.cpp llama.h tests/test-c.o: tests/test-c.cpp llama.h
$(CXX) $(CXXFLAGS) -c $(filter-out %.h,$^) -o $@ $(CXX) $(CXXFLAGS) -c $(filter-out %.h,$^) -o $@
testclang:
clang -std=c++20 libdynet.cpp

View file

@ -14,7 +14,8 @@ llvmLibPath = "/usr/lib/llvm-15/lib/"
cxxClientRoot = "/home/mdupont/experiments/llama.cpp/" cxxClientRoot = "/home/mdupont/experiments/llama.cpp/"
fileList = [ fileList = [
"ggml.cpp", "libdynet.cpp",
# "ggml.cpp",
# "llama.cpp", # "llama.cpp",
# "examples/server/server.cpp", # "examples/server/server.cpp",
] ]
@ -34,7 +35,9 @@ def list_headers_in_dir(path):
# list all the files in the folder # list all the files in the folder
files = os.listdir(path) files = os.listdir(path)
# only include .hxx files # only include .hxx files
files = list(filter(lambda x: x.endswith('.hxx'), files)) files = list(filter(lambda x:
x.endswith('.hpp') or x.endswith('.h')
, files))
# add the folder path back on # add the folder path back on
files = list(map(lambda x: path + x, files)) files = list(map(lambda x: path + x, files))
return files return files

View file

@ -1,5 +1,6 @@
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>

View file

@ -2,7 +2,7 @@
#pragma once #pragma once
#include "llama.h" //#include "llama.h"
#include "sampling.h" #include "sampling.h"

View file

@ -1,3 +1,4 @@
#include "llama.h"
#include "grammar-parser.h" #include "grammar-parser.h"
#include <cstdint> #include <cstdint>
#include <cwchar> #include <cwchar>

View file

@ -10,7 +10,7 @@
// space ::= [ \t\n]* // space ::= [ \t\n]*
#pragma once #pragma once
#include "llama.h" //#include "llama.h"
#include <vector> #include <vector>
#include <map> #include <map>
#include <cstdint> #include <cstdint>

View file

@ -1,3 +1,4 @@
#include "llama.h"
#include "sampling.h" #include "sampling.h"
struct llama_sampling_context * llama_sampling_init(const struct llama_sampling_params & params) { struct llama_sampling_context * llama_sampling_init(const struct llama_sampling_params & params) {

View file

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "llama.h" //#include "llama.h"
#include "grammar-parser.h" #include "grammar-parser.h"

View file

@ -1,5 +1,6 @@
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>

View file

@ -1,5 +1,6 @@
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>

View file

@ -1,5 +1,6 @@
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include <cassert> #include <cassert>
#include <cinttypes> #include <cinttypes>

View file

@ -1,3 +1,4 @@
#include "llama.h"
#include "common.h" #include "common.h"
#include "ggml.h" #include "ggml.h"

View file

@ -1,5 +1,6 @@
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include <ctime> #include <ctime>

View file

@ -1,4 +1,4 @@
#include "llama.h"
#include "common.h" #include "common.h"
#include "ggml.h" #include "ggml.h"
#include "ggml-alloc.h" #include "ggml-alloc.h"

View file

@ -1,7 +1,8 @@
#include "llama.h"
#include "common.h" #include "common.h"
#include "console.h" #include "console.h"
#include "llama.h"
#include "grammar-parser.h" #include "grammar-parser.h"
#include <cassert> #include <cassert>

View file

@ -1,8 +1,10 @@
#include "ggml.h" #include "ggml.h"
#include "llama.h"
#include "llava.h"
#include "common.h" #include "common.h"
#include "clip.h" #include "clip.h"
#include "llava.h"
#include "llama.h"
#include "base64.hpp" #include "base64.hpp"

View file

@ -1,6 +1,7 @@
#include "clip.h" #include "clip.h"
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include "llava.h" #include "llava.h"
#include <cstdio> #include <cstdio>

View file

@ -1,7 +1,8 @@
#include "llama.h"
#include "common.h" #include "common.h"
#include "console.h" #include "console.h"
#include "llama.h"
#include <cassert> #include <cassert>
#include <cinttypes> #include <cinttypes>

View file

@ -1,8 +1,8 @@
// A basic application simulating a server with multiple clients. // A basic application simulating a server with multiple clients.
// The clients submit requests to the server and they are processed in parallel. // The clients submit requests to the server and they are processed in parallel.
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include <cmath> #include <cmath>
#include <cstdio> #include <cstdio>

View file

@ -1,5 +1,6 @@
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include <cmath> #include <cmath>
#include <cstdio> #include <cstdio>

View file

@ -1,7 +1,8 @@
#define LLAMA_API_INTERNAL #define LLAMA_API_INTERNAL
#include "llama.h"
#include "common.h" #include "common.h"
#include "ggml.h" #include "ggml.h"
#include "llama.h"
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>

View file

@ -1,5 +1,6 @@
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>

View file

@ -1,5 +1,6 @@
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include <vector> #include <vector>
#include <cstdio> #include <cstdio>

View file

@ -1,5 +1,6 @@
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include "grammar-parser.h" #include "grammar-parser.h"
#include "../llava/clip.h" #include "../llava/clip.h"

View file

@ -1,5 +1,6 @@
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include <cmath> #include <cmath>
#include <cstdio> #include <cstdio>

View file

@ -1,5 +1,6 @@
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include <cmath> #include <cmath>
#include <cstdio> #include <cstdio>

View file

@ -1,5 +1,6 @@
#include "common.h"
#include "llama.h" #include "llama.h"
#include "common.h"
#include <cmath> #include <cmath>
#include <cstdio> #include <cstdio>

View file

@ -1,8 +1,9 @@
#include "ggml.h" #include "ggml.h"
#include "ggml-alloc.h" #include "ggml-alloc.h"
#include "llama.h"
#include "common.h" #include "common.h"
#include "train.h" #include "train.h"
#include "llama.h"
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include <cassert> #include <cassert>