mirror of
https://github.com/ollama/ollama.git
synced 2025-11-10 11:27:15 +01:00
* feat: Bump llama.cpp to df1b612 Branch: LlamaCPPBump-GraniteDocling Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> * fix(mtmd): Correctly encode text chunks during mtmd tokenization There can be text chunks that appear interspersed with the image embeddings that contain template delimiter tokens for some models. These need to be correctly translated to text tokens. Branch: LlamaCPPBump-GraniteDocling Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> * tests: Use MtmdChunk in image_test Branch: LlamaCPPBump-GraniteDocling Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> * style: Fix unnecessary conversion linting Branch: LlamaCPPBump-GraniteDocling Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> * fix(ggml): Revert changes to ggml_hip.cpp These changes were done largely by our code assistant and are likely wrong Branch: LlamaCPPBump-GraniteDocling Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> * fix: Revert changes in mem_nvml.cpp Branch: LlamaCPPBump-GraniteDocling Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> * feat: Update sync point to 1deee0 This brings in several more optimization commits and model support for EmbeddingGemma Branch: LlamaCPPBump-GraniteDocling Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> * feat: Update patches for 1deee0 Branch: LlamaCPPBump-GraniteDocling Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> * feat: sync for bump to 1deee0 Branch: LlamaCPPBump-GraniteDocling Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> * fix: Bad patch updates with errant `+` Branch: LlamaCPPBump-GraniteDocling Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> * feat: Bump llama.cpp/ggml to 7049736 Branch: LlamaCPPBump-GraniteDocling Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> * fix: format-patches after latest bump Branch: LlamaCPPBump-GraniteDocling Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> --------- Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
73 lines
2.6 KiB
Makefile
73 lines
2.6 KiB
Makefile
UPSTREAM=https://github.com/ggml-org/llama.cpp.git
|
|
WORKDIR=llama/vendor
|
|
FETCH_HEAD=7049736b2dd9011bf819e298b844ebbc4b5afdc9
|
|
|
|
.PHONY: help
|
|
help:
|
|
@echo "Available targets:"
|
|
@echo " sync Sync with upstream repositories"
|
|
@echo " checkout Checkout upstream repository"
|
|
@echo " apply-patches Apply patches to local repository"
|
|
@echo " format-patches Format patches from local repository"
|
|
@echo " clean Clean local repository"
|
|
@echo
|
|
@echo "Example:"
|
|
@echo " make -f $(lastword $(MAKEFILE_LIST)) clean apply-patches sync"
|
|
|
|
.PHONY: sync
|
|
sync: llama/build-info.cpp ml/backend/ggml/ggml/src/ggml-metal/ggml-metal-embed.metal
|
|
|
|
llama/build-info.cpp: llama/build-info.cpp.in llama/llama.cpp
|
|
sed -e 's|@FETCH_HEAD@|$(FETCH_HEAD)|' <$< >$@
|
|
|
|
ml/backend/ggml/ggml/src/ggml-metal/ggml-metal-embed.metal: ml/backend/ggml/ggml
|
|
go generate ./$(@D)
|
|
|
|
.PHONY: llama/llama.cpp
|
|
llama/llama.cpp: llama/vendor
|
|
rsync -arvzc --delete -f "include LICENSE" -f "merge $@/.rsync-filter" $(addprefix $<,/LICENSE /) $@
|
|
|
|
.PHONY: ml/backend/ggml/ggml
|
|
ml/backend/ggml/ggml: llama/vendor
|
|
rsync -arvzc --delete -f "include LICENSE" -f "merge $@/.rsync-filter" $(addprefix $<,/LICENSE /ggml/) $@
|
|
|
|
PATCHES=$(wildcard llama/patches/*.patch)
|
|
PATCHED=$(join $(dir $(PATCHES)), $(addsuffix ed, $(addprefix ., $(notdir $(PATCHES)))))
|
|
|
|
.PHONY: apply-patches
|
|
.NOTPARALLEL:
|
|
apply-patches: $(PATCHED)
|
|
|
|
llama/patches/.%.patched: llama/patches/%.patch
|
|
@if git -c user.name=nobody -c 'user.email=<>' -C $(WORKDIR) am -3 $(realpath $<); then \
|
|
touch $@; \
|
|
else \
|
|
echo "Patch failed. Resolve any conflicts then continue."; \
|
|
echo "1. Run 'git -C $(WORKDIR) am --continue'"; \
|
|
echo "2. Run 'make -f $(lastword $(MAKEFILE_LIST)) format-patches'"; \
|
|
echo "3. Run 'make -f $(lastword $(MAKEFILE_LIST)) clean apply-patches'"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
.PHONY: checkout
|
|
checkout: $(WORKDIR)
|
|
git -C $(WORKDIR) fetch
|
|
git -C $(WORKDIR) checkout -f $(FETCH_HEAD)
|
|
|
|
$(WORKDIR):
|
|
git clone $(UPSTREAM) $(WORKDIR)
|
|
|
|
.PHONE: format-patches
|
|
format-patches: llama/patches
|
|
git -C $(WORKDIR) format-patch \
|
|
--no-signature \
|
|
--no-numbered \
|
|
--zero-commit \
|
|
-o $(realpath $<) \
|
|
$(FETCH_HEAD)
|
|
|
|
.PHONE: clean
|
|
clean: checkout
|
|
@git -C $(WORKDIR) am --abort || true
|
|
$(RM) llama/patches/.*.patched
|