Skip to content

Commit cf267d1

Browse files
daboe01ggerganov
andauthored
make : add train-text-from-scratch (ggml-org#1850)
* 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 <[email protected]>
1 parent 9dda13e commit cf267d1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ models/*
3232
/result
3333
/perplexity
3434
/embedding
35+
/train-text-from-scratch
3536
/benchmark-matmult
3637
/vdot
3738
/Pipfile

Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Define the default target now so that it is always the first target
2-
BUILD_TARGETS = main quantize quantize-stats perplexity embedding vdot
2+
BUILD_TARGETS = main quantize quantize-stats perplexity embedding vdot train-text-from-scratch
33

44
ifdef LLAMA_BUILD_SERVER
55
BUILD_TARGETS += server
@@ -259,7 +259,7 @@ libllama.so: llama.o ggml.o $(OBJS)
259259
$(CXX) $(CXXFLAGS) -shared -fPIC -o $@ $^ $(LDFLAGS)
260260

261261
clean:
262-
rm -vf *.o *.so main quantize quantize-stats perplexity embedding benchmark-matmult save-load-state server vdot build-info.h
262+
rm -vf *.o *.so main quantize quantize-stats perplexity embedding benchmark-matmult save-load-state server vdot train-text-from-scratch build-info.h
263263

264264
#
265265
# Examples
@@ -289,6 +289,9 @@ save-load-state: examples/save-load-state/save-load-state.cpp build-info.h ggml.
289289
server: examples/server/server.cpp examples/server/httplib.h examples/server/json.hpp build-info.h ggml.o llama.o common.o $(OBJS)
290290
$(CXX) $(CXXFLAGS) -Iexamples/server $(filter-out %.h,$(filter-out %.hpp,$^)) -o $@ $(LDFLAGS)
291291

292+
train-text-from-scratch: examples/train-text-from-scratch/train-text-from-scratch.cpp build-info.h ggml.o llama.o $(OBJS)
293+
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
294+
292295
build-info.h: $(wildcard .git/index) scripts/build-info.sh
293296
@sh scripts/build-info.sh > $@.tmp
294297
@if ! cmp -s $@.tmp $@; then \

0 commit comments

Comments
 (0)