generate_windows.go 1.6 KB

123456789101112131415161718192021222324
  1. package llm
  2. //go:generate git submodule init
  3. //go:generate git submodule update --force ggml
  4. //go:generate git -C ggml apply ../patches/0001-add-detokenize-endpoint.patch
  5. //go:generate git -C ggml apply ../patches/0002-34B-model-support.patch
  6. //go:generate cmake -S ggml -B ggml/build/cpu -DLLAMA_K_QUANTS=on
  7. //go:generate cmake --build ggml/build/cpu --target server --config Release
  8. //go:generate cmd /c move ggml\build\cpu\bin\Release\server.exe ggml\build\cpu\bin\Release\ollama-runner.exe
  9. //go:generate git submodule update --force gguf
  10. //go:generate git -C gguf apply ../patches/0001-update-default-log-target.patch
  11. //go:generate cmake -S gguf -B gguf/build/cpu -DLLAMA_K_QUANTS=on -DLLAMA_NATIVE=off -DLLAMA_AVX=on -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off
  12. //go:generate cmake --build gguf/build/cpu --target server --config Release
  13. //go:generate cmd /c move gguf\build\cpu\bin\Release\server.exe gguf\build\cpu\bin\Release\ollama-runner.exe
  14. //go:generate cmake -S ggml -B ggml/build/cuda -DLLAMA_CUBLAS=on -DLLAMA_ACCELERATE=on -DLLAMA_K_QUANTS=on
  15. //go:generate cmake --build ggml/build/cuda --target server --config Release
  16. //go:generate cmd /c move ggml\build\cuda\bin\Release\server.exe ggml\build\cuda\bin\Release\ollama-runner.exe
  17. //go:generate cmake -S gguf -B gguf/build/cuda -DLLAMA_CUBLAS=on -DLLAMA_ACCELERATE=on -DLLAMA_K_QUANTS=on -DLLAMA_NATIVE=off -DLLAMA_AVX=on -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off
  18. //go:generate cmake --build gguf/build/cuda --target server --config Release
  19. //go:generate cmd /c move gguf\build\cuda\bin\Release\server.exe gguf\build\cuda\bin\Release\ollama-runner.exe