SHA256
1
0
forked from pool/ollama
ollama/enable-lto.patch

31 lines
1.8 KiB
Diff
Raw Permalink Normal View History

Accepting request 1169791 from home:rrahl0:branches:science:machinelearning - Update to version 0.1.32: * scale graph based on gpu count * Support unicode characters in model path (#3681) * darwin: no partial offloading if required memory greater than system * update llama.cpp submodule to `7593639` (#3665) * fix padding in decode * Revert "cmd: provide feedback if OLLAMA_MODELS is set on non-serve command (#3470)" (#3662) * Added Solar example at README.md (#3610) * Update langchainjs.md (#2030) * Added MindsDB information (#3595) * examples: add more Go examples using the API (#3599) * Update modelfile.md * Add llama2 / torch models for `ollama create` (#3607) * Terminate subprocess if receiving `SIGINT` or `SIGTERM` signals while model is loading (#3653) * app: gracefully shut down `ollama serve` on windows (#3641) * types/model: add path helpers (#3619) * update llama.cpp submodule to `4bd0f93` (#3627) * types/model: make ParseName variants less confusing (#3617) * types/model: remove (*Digest).Scan and Digest.Value (#3605) * Fix rocm deps with new subprocess paths * mixtral mem * Revert "types/model: remove (*Digest).Scan and Digest.Value (#3589)" * types/model: remove (*Digest).Scan and Digest.Value (#3589) * types/model: remove DisplayLong (#3587) * types/model: remove MarshalText/UnmarshalText from Digest (#3586) * types/model: init with Name and Digest types (#3541) * server: provide helpful workaround hint when stalling on pull (#3584) * partial offloading * refactor tensor query * api: start adding documentation to package api (#2878) OBS-URL: https://build.opensuse.org/request/show/1169791 OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/ollama?expand=0&rev=9
2024-04-23 14:00:24 +02:00
diff -rub ollama/llm/generate/gen_linux.sh ollama-patched/llm/generate/gen_linux.sh
--- ollama/llm/generate/gen_linux.sh 2024-04-23 04:40:58.246062467 +0200
+++ ollama-patched/llm/generate/gen_linux.sh 2024-04-23 04:37:36.432294889 +0200
@@ -51,7 +51,7 @@
export CUDACXX=$(command -v nvcc)
fi
fi
-COMMON_CMAKE_DEFS="-DCMAKE_POSITION_INDEPENDENT_CODE=on -DLLAMA_NATIVE=off -DLLAMA_AVX=on -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off"
+COMMON_CMAKE_DEFS="-DCMAKE_POSITION_INDEPENDENT_CODE=on -DLLAMA_LTO=on -DCMAKE_BUILD_TYPE=Release -DLLAMA_NATIVE=off -DLLAMA_AVX=on -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off"
source $(dirname $0)/gen_common.sh
init_vars
git_module_setup
Accepting request 1169791 from home:rrahl0:branches:science:machinelearning - Update to version 0.1.32: * scale graph based on gpu count * Support unicode characters in model path (#3681) * darwin: no partial offloading if required memory greater than system * update llama.cpp submodule to `7593639` (#3665) * fix padding in decode * Revert "cmd: provide feedback if OLLAMA_MODELS is set on non-serve command (#3470)" (#3662) * Added Solar example at README.md (#3610) * Update langchainjs.md (#2030) * Added MindsDB information (#3595) * examples: add more Go examples using the API (#3599) * Update modelfile.md * Add llama2 / torch models for `ollama create` (#3607) * Terminate subprocess if receiving `SIGINT` or `SIGTERM` signals while model is loading (#3653) * app: gracefully shut down `ollama serve` on windows (#3641) * types/model: add path helpers (#3619) * update llama.cpp submodule to `4bd0f93` (#3627) * types/model: make ParseName variants less confusing (#3617) * types/model: remove (*Digest).Scan and Digest.Value (#3605) * Fix rocm deps with new subprocess paths * mixtral mem * Revert "types/model: remove (*Digest).Scan and Digest.Value (#3589)" * types/model: remove (*Digest).Scan and Digest.Value (#3589) * types/model: remove DisplayLong (#3587) * types/model: remove MarshalText/UnmarshalText from Digest (#3586) * types/model: init with Name and Digest types (#3541) * server: provide helpful workaround hint when stalling on pull (#3584) * partial offloading * refactor tensor query * api: start adding documentation to package api (#2878) OBS-URL: https://build.opensuse.org/request/show/1169791 OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/ollama?expand=0&rev=9
2024-04-23 14:00:24 +02:00
@@ -77,7 +77,7 @@
if [ -n "${OLLAMA_CUSTOM_CPU_DEFS}" ]; then
Accepting request 1169791 from home:rrahl0:branches:science:machinelearning - Update to version 0.1.32: * scale graph based on gpu count * Support unicode characters in model path (#3681) * darwin: no partial offloading if required memory greater than system * update llama.cpp submodule to `7593639` (#3665) * fix padding in decode * Revert "cmd: provide feedback if OLLAMA_MODELS is set on non-serve command (#3470)" (#3662) * Added Solar example at README.md (#3610) * Update langchainjs.md (#2030) * Added MindsDB information (#3595) * examples: add more Go examples using the API (#3599) * Update modelfile.md * Add llama2 / torch models for `ollama create` (#3607) * Terminate subprocess if receiving `SIGINT` or `SIGTERM` signals while model is loading (#3653) * app: gracefully shut down `ollama serve` on windows (#3641) * types/model: add path helpers (#3619) * update llama.cpp submodule to `4bd0f93` (#3627) * types/model: make ParseName variants less confusing (#3617) * types/model: remove (*Digest).Scan and Digest.Value (#3605) * Fix rocm deps with new subprocess paths * mixtral mem * Revert "types/model: remove (*Digest).Scan and Digest.Value (#3589)" * types/model: remove (*Digest).Scan and Digest.Value (#3589) * types/model: remove DisplayLong (#3587) * types/model: remove MarshalText/UnmarshalText from Digest (#3586) * types/model: init with Name and Digest types (#3541) * server: provide helpful workaround hint when stalling on pull (#3584) * partial offloading * refactor tensor query * api: start adding documentation to package api (#2878) OBS-URL: https://build.opensuse.org/request/show/1169791 OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/ollama?expand=0&rev=9
2024-04-23 14:00:24 +02:00
init_vars
echo "OLLAMA_CUSTOM_CPU_DEFS=\"${OLLAMA_CUSTOM_CPU_DEFS}\""
- CMAKE_DEFS="${OLLAMA_CUSTOM_CPU_DEFS} -DCMAKE_POSITION_INDEPENDENT_CODE=on ${CMAKE_DEFS}"
+ CMAKE_DEFS="${OLLAMA_CUSTOM_CPU_DEFS} -DCMAKE_POSITION_INDEPENDENT_CODE=on -DLLAMA_LTO=on -DCMAKE_BUILD_TYPE=Release ${CMAKE_DEFS}"
Accepting request 1169791 from home:rrahl0:branches:science:machinelearning - Update to version 0.1.32: * scale graph based on gpu count * Support unicode characters in model path (#3681) * darwin: no partial offloading if required memory greater than system * update llama.cpp submodule to `7593639` (#3665) * fix padding in decode * Revert "cmd: provide feedback if OLLAMA_MODELS is set on non-serve command (#3470)" (#3662) * Added Solar example at README.md (#3610) * Update langchainjs.md (#2030) * Added MindsDB information (#3595) * examples: add more Go examples using the API (#3599) * Update modelfile.md * Add llama2 / torch models for `ollama create` (#3607) * Terminate subprocess if receiving `SIGINT` or `SIGTERM` signals while model is loading (#3653) * app: gracefully shut down `ollama serve` on windows (#3641) * types/model: add path helpers (#3619) * update llama.cpp submodule to `4bd0f93` (#3627) * types/model: make ParseName variants less confusing (#3617) * types/model: remove (*Digest).Scan and Digest.Value (#3605) * Fix rocm deps with new subprocess paths * mixtral mem * Revert "types/model: remove (*Digest).Scan and Digest.Value (#3589)" * types/model: remove (*Digest).Scan and Digest.Value (#3589) * types/model: remove DisplayLong (#3587) * types/model: remove MarshalText/UnmarshalText from Digest (#3586) * types/model: init with Name and Digest types (#3541) * server: provide helpful workaround hint when stalling on pull (#3584) * partial offloading * refactor tensor query * api: start adding documentation to package api (#2878) OBS-URL: https://build.opensuse.org/request/show/1169791 OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/ollama?expand=0&rev=9
2024-04-23 14:00:24 +02:00
BUILD_DIR="../build/linux/${ARCH}/cpu"
echo "Building custom CPU"
build
Accepting request 1169791 from home:rrahl0:branches:science:machinelearning - Update to version 0.1.32: * scale graph based on gpu count * Support unicode characters in model path (#3681) * darwin: no partial offloading if required memory greater than system * update llama.cpp submodule to `7593639` (#3665) * fix padding in decode * Revert "cmd: provide feedback if OLLAMA_MODELS is set on non-serve command (#3470)" (#3662) * Added Solar example at README.md (#3610) * Update langchainjs.md (#2030) * Added MindsDB information (#3595) * examples: add more Go examples using the API (#3599) * Update modelfile.md * Add llama2 / torch models for `ollama create` (#3607) * Terminate subprocess if receiving `SIGINT` or `SIGTERM` signals while model is loading (#3653) * app: gracefully shut down `ollama serve` on windows (#3641) * types/model: add path helpers (#3619) * update llama.cpp submodule to `4bd0f93` (#3627) * types/model: make ParseName variants less confusing (#3617) * types/model: remove (*Digest).Scan and Digest.Value (#3605) * Fix rocm deps with new subprocess paths * mixtral mem * Revert "types/model: remove (*Digest).Scan and Digest.Value (#3589)" * types/model: remove (*Digest).Scan and Digest.Value (#3589) * types/model: remove DisplayLong (#3587) * types/model: remove MarshalText/UnmarshalText from Digest (#3586) * types/model: init with Name and Digest types (#3541) * server: provide helpful workaround hint when stalling on pull (#3584) * partial offloading * refactor tensor query * api: start adding documentation to package api (#2878) OBS-URL: https://build.opensuse.org/request/show/1169791 OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/ollama?expand=0&rev=9
2024-04-23 14:00:24 +02:00
@@ -93,7 +93,7 @@
# -DLLAMA_AVX512_VBMI -- 2018 Intel Cannon Lake
# -DLLAMA_AVX512_VNNI -- 2021 Intel Alder Lake
Accepting request 1169791 from home:rrahl0:branches:science:machinelearning - Update to version 0.1.32: * scale graph based on gpu count * Support unicode characters in model path (#3681) * darwin: no partial offloading if required memory greater than system * update llama.cpp submodule to `7593639` (#3665) * fix padding in decode * Revert "cmd: provide feedback if OLLAMA_MODELS is set on non-serve command (#3470)" (#3662) * Added Solar example at README.md (#3610) * Update langchainjs.md (#2030) * Added MindsDB information (#3595) * examples: add more Go examples using the API (#3599) * Update modelfile.md * Add llama2 / torch models for `ollama create` (#3607) * Terminate subprocess if receiving `SIGINT` or `SIGTERM` signals while model is loading (#3653) * app: gracefully shut down `ollama serve` on windows (#3641) * types/model: add path helpers (#3619) * update llama.cpp submodule to `4bd0f93` (#3627) * types/model: make ParseName variants less confusing (#3617) * types/model: remove (*Digest).Scan and Digest.Value (#3605) * Fix rocm deps with new subprocess paths * mixtral mem * Revert "types/model: remove (*Digest).Scan and Digest.Value (#3589)" * types/model: remove (*Digest).Scan and Digest.Value (#3589) * types/model: remove DisplayLong (#3587) * types/model: remove MarshalText/UnmarshalText from Digest (#3586) * types/model: init with Name and Digest types (#3541) * server: provide helpful workaround hint when stalling on pull (#3584) * partial offloading * refactor tensor query * api: start adding documentation to package api (#2878) OBS-URL: https://build.opensuse.org/request/show/1169791 OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/ollama?expand=0&rev=9
2024-04-23 14:00:24 +02:00
- COMMON_CPU_DEFS="-DCMAKE_POSITION_INDEPENDENT_CODE=on -DLLAMA_NATIVE=off"
+ COMMON_CPU_DEFS="-DCMAKE_POSITION_INDEPENDENT_CODE=on -DLLAMA_LTO=on -DCMAKE_BUILD_TYPE=Release -DLLAMA_NATIVE=off"
if [ -z "${OLLAMA_CPU_TARGET}" -o "${OLLAMA_CPU_TARGET}" = "cpu" ]; then
#
# CPU first for the default library, set up as lowest common denominator for maximum compatibility (including Rosetta)