Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
update go to 1.22 in other places (#2975)
Jeffrey Morgand481fb3cc87c
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yamlindex 051a0f821..51be919d1 100644--- a/.github/workflows/test.yaml+++ b/.github/workflows/test.yaml@@ -21,7 +21,7 @@ jobs:- uses: actions/checkout@v4- uses: actions/setup-go@v5with:- go-version: '1.21'+ go-version: '1.22'cache: true- run: go get ./...- run: go generate -x ./...@@ -46,7 +46,7 @@ jobs:- uses: actions/checkout@v4- uses: actions/setup-go@v4with:- go-version: '1.21'+ go-version: '1.22'cache: true- run: go get ./...- run: |@@ -76,7 +76,7 @@ jobs:- uses: actions/checkout@v4- uses: actions/setup-go@v4with:- go-version: '1.21'+ go-version: '1.22'cache: true- run: go get ./...- run: |@@ -103,14 +103,14 @@ jobs:runs-on: ${{ matrix.os }}env:GOARCH: ${{ matrix.arch }}- CGO_ENABLED: "1"+ CGO_ENABLED: '1'steps:- uses: actions/checkout@v4with:submodules: recursive- uses: actions/setup-go@v5with:- go-version: '1.21'+ go-version: '1.22'cache: false- run: |mkdir -p llm/llama.cpp/build/linux/${{ matrix.arch }}/stub/lib/@@ -140,14 +140,14 @@ jobs:runs-on: ${{ matrix.os }}env:GOARCH: ${{ matrix.arch }}- CGO_ENABLED: "1"+ CGO_ENABLED: '1'steps:- uses: actions/checkout@v4with:submodules: recursive- uses: actions/setup-go@v5with:- go-version: '1.21'+ go-version: '1.22'cache: true- run: go get- uses: actions/download-artifact@v4diff --git a/Dockerfile b/Dockerfileindex 8f29eb7c9..f996bba0f 100644--- a/Dockerfile+++ b/Dockerfile@@ -1,4 +1,4 @@-ARG GOLANG_VERSION=1.21.3+ARG GOLANG_VERSION=1.22.1ARG CMAKE_VERSION=3.22.1ARG CUDA_VERSION=11.3.1diff --git a/docs/development.md b/docs/development.mdindex b986aa17b..33110e01f 100644--- a/docs/development.md+++ b/docs/development.md@@ -3,7 +3,7 @@Install required tools:- cmake version 3.24 or higher-- go version 1.21 or higher+- go version 1.22 or higher- gcc version 11.4.0 or higher```bash@@ -42,15 +42,15 @@ Now you can run `ollama`:#### Linux CUDA (NVIDIA)-*Your operating system distribution may already have packages for NVIDIA CUDA. Distro packages are often preferable, but instructions are distro-specific. Please consult distro-specific docs for dependencies if available!*+_Your operating system distribution may already have packages for NVIDIA CUDA. Distro packages are often preferable, but instructions are distro-specific. Please consult distro-specific docs for dependencies if available!_Install `cmake` and `golang` as well as [NVIDIA CUDA](https://developer.nvidia.com/cuda-downloads)-development and runtime packages.+development and runtime packages.Typically the build scripts will auto-detect CUDA, however, if your Linux distroor installation approach uses unusual paths, you can specify the location byspecifying an environment variable `CUDA_LIB_DIR` to the location of the shared-libraries, and `CUDACXX` to the location of the nvcc compiler. You can customize+libraries, and `CUDACXX` to the location of the nvcc compiler. You can customizeset set of target CUDA architectues by setting `CMAKE_CUDA_ARCHITECTURES` (e.g. "50;60;70")Then generate dependencies:@@ -67,7 +67,7 @@ go build .#### Linux ROCm (AMD)-*Your operating system distribution may already have packages for AMD ROCm and CLBlast. Distro packages are often preferable, but instructions are distro-specific. Please consult distro-specific docs for dependencies if available!*+_Your operating system distribution may already have packages for AMD ROCm and CLBlast. Distro packages are often preferable, but instructions are distro-specific. Please consult distro-specific docs for dependencies if available!_Install [CLBlast](https://github.com/CNugteren/CLBlast/blob/master/doc/installation.md) and [ROCm](https://rocm.docs.amd.com/en/latest/deploy/linux/quick_start.html) development packages first, as well as `cmake` and `golang`.@@ -75,7 +75,7 @@ Typically the build scripts will auto-detect ROCm, however, if your Linux distroor installation approach uses unusual paths, you can specify the location byspecifying an environment variable `ROCM_PATH` to the location of the ROCminstall (typically `/opt/rocm`), and `CLBlast_DIR` to the location of the-CLBlast install (typically `/usr/lib/cmake/CLBlast`). You can also customize+CLBlast install (typically `/usr/lib/cmake/CLBlast`). You can also customizethe AMD GPU targets by setting AMDGPU_TARGETS (e.g. `AMDGPU_TARGETS="gfx1101;gfx1102"`)```@@ -88,17 +88,17 @@ Then build the binary:go build .```-ROCm requires elevated privileges to access the GPU at runtime. On most distros you can add your user account to the `render` group, or run as root.+ROCm requires elevated privileges to access the GPU at runtime. On most distros you can add your user account to the `render` group, or run as root.#### Advanced CPU SettingsBy default, running `go generate ./...` will compile a few different variationsof the LLM library based on common CPU families and vector math capabilities,including a lowest-common-denominator which should run on almost any 64 bit CPU-somewhat slowly. At runtime, Ollama will auto-detect the optimal variation to-load. If you would like to build a CPU-based build customized for your+somewhat slowly. At runtime, Ollama will auto-detect the optimal variation to+load. If you would like to build a CPU-based build customized for yourprocessor, you can set `OLLAMA_CUSTOM_CPU_DEFS` to the llama.cpp flags you would-like to use. For example, to compile an optimized binary for an Intel i9-9880H,+like to use. For example, to compile an optimized binary for an Intel i9-9880H,you might use:```@@ -108,8 +108,7 @@ go build .#### Containerized Linux Build-If you have Docker available, you can build linux binaries with `./scripts/build_linux.sh` which has the CUDA and ROCm dependencies included. The resulting binary is placed in `./dist`-+If you have Docker available, you can build linux binaries with `./scripts/build_linux.sh` which has the CUDA and ROCm dependencies included. The resulting binary is placed in `./dist`### Windows@@ -118,7 +117,7 @@ Note: The windows build for Ollama is still under development.Install required tools:- MSVC toolchain - C/C++ and cmake as minimal requirements-- go version 1.21 or higher+- go version 1.22 or higher- MinGW (pick one variant) with GCC.- <https://www.mingw-w64.org/>- <https://www.msys2.org/>