]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
make : add train-text-from-scratch (#1850)
authordaboe01 <redacted>
Thu, 15 Jun 2023 17:42:48 +0000 (19:42 +0200)
committerGitHub <redacted>
Thu, 15 Jun 2023 17:42:48 +0000 (20:42 +0300)
* make finetuning example accessible

* fixed: targed was in wrong line

* fixed: name of executable was wrong

* fixed: naming of binary

* fixed: model path was wrong

* fixed clean target

* Update examples/train-text-from-scratch/README.md

---------

Co-authored-by: Georgi Gerganov <redacted>
.gitignore
Makefile

index 9b6905ed4ef0c30943123048a9d2b07cba299213..4b0422cd9ca0762ce69fd4b91569e209fc983b49 100644 (file)
@@ -32,6 +32,7 @@ models/*
 /result
 /perplexity
 /embedding
+/train-text-from-scratch
 /benchmark-matmult
 /vdot
 /Pipfile
index 66509cc337fded3b8898172cdbae0172a3c5a517..09c8834f5830d9cfe716ab0a49ad96c50bccae92 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 # Define the default target now so that it is always the first target
-BUILD_TARGETS = main quantize quantize-stats perplexity embedding vdot
+BUILD_TARGETS = main quantize quantize-stats perplexity embedding vdot train-text-from-scratch
 
 ifdef LLAMA_BUILD_SERVER
        BUILD_TARGETS += server
@@ -259,7 +259,7 @@ libllama.so: llama.o ggml.o $(OBJS)
        $(CXX) $(CXXFLAGS) -shared -fPIC -o $@ $^ $(LDFLAGS)
 
 clean:
-       rm -vf *.o *.so main quantize quantize-stats perplexity embedding benchmark-matmult save-load-state server vdot build-info.h
+       rm -vf *.o *.so main quantize quantize-stats perplexity embedding benchmark-matmult save-load-state server vdot train-text-from-scratch build-info.h
 
 #
 # Examples
@@ -289,6 +289,9 @@ save-load-state: examples/save-load-state/save-load-state.cpp build-info.h ggml.
 server: examples/server/server.cpp examples/server/httplib.h examples/server/json.hpp build-info.h ggml.o llama.o common.o $(OBJS)
        $(CXX) $(CXXFLAGS) -Iexamples/server $(filter-out %.h,$(filter-out %.hpp,$^)) -o $@ $(LDFLAGS)
 
+train-text-from-scratch: examples/train-text-from-scratch/train-text-from-scratch.cpp    build-info.h ggml.o llama.o $(OBJS)
+       $(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
+
 build-info.h: $(wildcard .git/index) scripts/build-info.sh
        @sh scripts/build-info.sh > $@.tmp
        @if ! cmp -s $@.tmp $@; then \