1
1
# Define the default target now so that it is always the first target
2
- default : main main-gptneox main-oasst quantize quantize-gptneox quantize-stats update-llama update-gptneox perplexity embedding vdot
2
+ default : main main-gptneox main-oasst main-rwkv quantize quantize-gptneox quantize-rwkv quantize- stats update-llama update-gptneox update-rwkv perplexity embedding vdot
3
3
4
4
ifndef UNAME_S
5
5
UNAME_S := $(shell uname -s)
@@ -187,20 +187,26 @@ ggml.o: ggml.c ggml.h ggml-cuda.h
187
187
llama.o : llama.cpp ggml.h ggml-cuda.h llama.h llama-util.h
188
188
$(CXX ) $(CXXFLAGS ) -c $< -o $@
189
189
190
- gptneox.o : gptneox/gptneox.cpp ggml.h gptneox/gptneox.h gptneox/gptneox-util.h
190
+ gptneox.o : arch/gptneox/gptneox.cpp ggml.h arch/gptneox/gptneox.h arch/gptneox/gptneox-util.h
191
+ $(CXX ) $(CXXFLAGS ) -c $< -o $@
192
+
193
+ rwkv.o : arch/rwkv/rwkv.cpp ggml.h arch/rwkv/rwkv.h arch/arch-util.h
191
194
$(CXX ) $(CXXFLAGS ) -c $< -o $@
192
195
193
196
common.o : examples/common.cpp examples/common.h
194
197
$(CXX ) $(CXXFLAGS ) -c $< -o $@
195
198
196
- common-gptneox.o : gptneox/common-gptneox.cpp gptneox/common-gptneox.h
199
+ common-gptneox.o : arch/gptneox/common-gptneox.cpp arch/gptneox/common-gptneox.h
200
+ $(CXX ) $(CXXFLAGS ) -c $< -o $@
201
+
202
+ common-rwkv.o : arch/rwkv/common-rwkv.cpp arch/rwkv/common-rwkv.h
197
203
$(CXX ) $(CXXFLAGS ) -c $< -o $@
198
204
199
205
libllama.so : llama.o ggml.o $(OBJS )
200
206
$(CXX ) $(CXXFLAGS ) -shared -fPIC -o $@ $^ $(LDFLAGS )
201
207
202
208
clean :
203
- rm -vf * .o main main-oasst main-gptneox quantize quantize-gptneox quantize-stats update-llama update-gptneox perplexity embedding benchmark-matmult save-load-state build-info.h
209
+ rm -vf * .o main main-oasst main-gptneox main-rwkv quantize quantize-gptneox quantize-rwkv quantize- stats update-llama update-gptneox update-rwkv perplexity embedding benchmark-matmult save-load-state build-info.h
204
210
205
211
#
206
212
# Examples
@@ -212,13 +218,19 @@ main: examples/main/main.cpp build-info.h ggml.o llama.o common.o $(OBJS)
212
218
@echo ' ==== Run ./main -h for help. ===='
213
219
@echo
214
220
215
- main-gptneox : gptneox/main-gptneox.cpp build-info.h ggml.o gptneox.o common-gptneox.o $(OBJS )
221
+ main-gptneox : arch/ gptneox/main-gptneox.cpp build-info.h ggml.o gptneox.o common-gptneox.o $(OBJS )
216
222
$(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
217
223
@echo
218
224
@echo ' ==== Run ./main -h for help. ===='
219
225
@echo
220
226
221
- main-oasst : gptneox/main-oasst.cpp build-info.h ggml.o gptneox.o common-gptneox.o $(OBJS )
227
+ main-oasst : arch/gptneox/main-oasst.cpp build-info.h ggml.o gptneox.o common-gptneox.o $(OBJS )
228
+ $(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
229
+ @echo
230
+ @echo ' ==== Run ./main -h for help. ===='
231
+ @echo
232
+
233
+ main-rwkv : arch/rwkv/main-rwkv.cpp build-info.h ggml.o rwkv.o common-rwkv.o $(OBJS )
222
234
$(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
223
235
@echo
224
236
@echo ' ==== Run ./main -h for help. ===='
@@ -227,7 +239,10 @@ main-oasst: gptneox/main-oasst.cpp build-info.h ggml.o gptneox.o common-gptneox.
227
239
quantize : examples/quantize/quantize.cpp build-info.h ggml.o llama.o $(OBJS )
228
240
$(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
229
241
230
- quantize-gptneox : gptneox/quantize-gptneox.cpp build-info.h ggml.o gptneox.o $(OBJS )
242
+ quantize-gptneox : arch/gptneox/quantize-gptneox.cpp build-info.h ggml.o gptneox.o $(OBJS )
243
+ $(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
244
+
245
+ quantize-rwkv : arch/rwkv/quantize-rwkv.cpp build-info.h ggml.o rwkv.o $(OBJS )
231
246
$(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
232
247
233
248
quantize-stats : examples/quantize-stats/quantize-stats.cpp build-info.h ggml.o llama.o $(OBJS )
@@ -236,7 +251,10 @@ quantize-stats: examples/quantize-stats/quantize-stats.cpp build-info.h ggml.o l
236
251
update-llama : update-llama.cpp build-info.h ggml.o llama.o $(OBJS )
237
252
$(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
238
253
239
- update-gptneox : gptneox/update-gptneox.cpp build-info.h ggml.o gptneox.o $(OBJS )
254
+ update-gptneox : arch/gptneox/update-gptneox.cpp build-info.h ggml.o gptneox.o $(OBJS )
255
+ $(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
256
+
257
+ update-rwkv : arch/rwkv/update-rwkv.cpp build-info.h ggml.o rwkv.o $(OBJS )
240
258
$(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
241
259
242
260
perplexity : examples/perplexity/perplexity.cpp build-info.h ggml.o llama.o common.o $(OBJS )
0 commit comments