Skip to content

Commit b901e01

Browse files
authored
Merge pull request #2128 from menloresearch/s/feat/spawn-llama-cpp
feat: use llama.cpp server
2 parents f7f21e4 + 300f368 commit b901e01

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1656
-476
lines changed

.github/patches/windows/msvcp140.dll

-13.7 KB
Binary file not shown.
20.8 KB
Binary file not shown.
5.3 KB
Binary file not shown.

.github/workflows/beta-build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
get-update-version:
1010
uses: ./.github/workflows/template-get-update-version.yml
1111

12-
get-cortex-llamacpp-latest-version:
12+
get-llamacpp-latest-version:
1313
uses: ./.github/workflows/template-cortex-llamacpp-latest-version.yml
1414

1515
create-draft-release:
@@ -39,7 +39,7 @@ jobs:
3939

4040
build-macos:
4141
uses: ./.github/workflows/template-build-macos.yml
42-
needs: [get-update-version, create-draft-release, get-cortex-llamacpp-latest-version]
42+
needs: [get-update-version, create-draft-release, get-llamacpp-latest-version]
4343
secrets: inherit
4444
with:
4545
ref: ${{ github.ref }}
@@ -48,12 +48,12 @@ jobs:
4848
cmake-flags: "-DCORTEX_VARIANT=beta -DCORTEX_CPP_VERSION='v${{ needs.get-update-version.outputs.new_version }}' -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
4949
channel: beta
5050
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
51-
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
51+
llamacpp-version: ${{ needs.get-llamacpp-latest-version.outputs.llamacpp_latest_version }}
5252

5353
build-windows-x64:
5454
uses: ./.github/workflows/template-build-windows-x64.yml
5555
secrets: inherit
56-
needs: [get-update-version, create-draft-release, get-cortex-llamacpp-latest-version]
56+
needs: [get-update-version, create-draft-release, get-llamacpp-latest-version]
5757
with:
5858
ref: ${{ github.ref }}
5959
public_provider: github
@@ -64,12 +64,12 @@ jobs:
6464
ccache-dir: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
6565
channel: beta
6666
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
67-
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
67+
llamacpp-version: ${{ needs.get-llamacpp-latest-version.outputs.llamacpp_latest_version }}
6868

6969
build-linux-x64:
7070
uses: ./.github/workflows/template-build-linux.yml
7171
secrets: inherit
72-
needs: [get-update-version, create-draft-release, get-cortex-llamacpp-latest-version]
72+
needs: [get-update-version, create-draft-release, get-llamacpp-latest-version]
7373
with:
7474
ref: ${{ github.ref }}
7575
public_provider: github
@@ -78,13 +78,13 @@ jobs:
7878
cmake-flags: "-DCORTEX_VARIANT=beta -DCORTEX_CPP_VERSION='v${{ needs.get-update-version.outputs.new_version }}' -DCMAKE_TOOLCHAIN_FILE=/home/runner/actions-runner/_work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
7979
channel: beta
8080
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
81-
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
81+
llamacpp-version: ${{ needs.get-llamacpp-latest-version.outputs.llamacpp_latest_version }}
8282
arch: amd64
8383

8484
build-linux-arm64:
8585
uses: ./.github/workflows/template-build-linux.yml
8686
secrets: inherit
87-
needs: [get-update-version, create-draft-release, get-cortex-llamacpp-latest-version]
87+
needs: [get-update-version, create-draft-release, get-llamacpp-latest-version]
8888
with:
8989
ref: ${{ github.ref }}
9090
public_provider: github
@@ -93,13 +93,13 @@ jobs:
9393
cmake-flags: "-DCORTEX_VARIANT=beta -DCORTEX_CPP_VERSION='v${{ needs.get-update-version.outputs.new_version }}' -DCMAKE_TOOLCHAIN_FILE=/home/runner/actions-runner/_work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
9494
channel: beta
9595
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
96-
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
96+
llamacpp-version: ${{ needs.get-llamacpp-latest-version.outputs.llamacpp_latest_version }}
9797
arch: arm64
9898

9999
build-docker-x64:
100100
uses: ./.github/workflows/template-build-docker-x64.yml
101101
secrets: inherit
102-
needs: [get-update-version, get-cortex-llamacpp-latest-version]
102+
needs: [get-update-version, get-llamacpp-latest-version]
103103
with:
104104
ref: ${{ github.ref }}
105105
new_version: ${{ needs.get-update-version.outputs.new_version }}

.github/workflows/nightly-build.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,25 @@ jobs:
4343
get-update-version:
4444
uses: ./.github/workflows/template-get-update-version.yml
4545

46-
get-cortex-llamacpp-latest-version:
46+
get-llamacpp-latest-version:
4747
uses: ./.github/workflows/template-cortex-llamacpp-latest-version.yml
4848

4949
build-macos:
5050
uses: ./.github/workflows/template-build-macos.yml
51-
needs: [get-update-version, set-public-provider, get-cortex-llamacpp-latest-version]
51+
needs: [get-update-version, set-public-provider, get-llamacpp-latest-version]
5252
secrets: inherit
5353
with:
5454
ref: ${{ needs.set-public-provider.outputs.ref }}
5555
public_provider: ${{ needs.set-public-provider.outputs.public_provider }}
5656
new_version: ${{ needs.get-update-version.outputs.new_version }}
5757
cmake-flags: "-DCORTEX_VARIANT=nightly -DCORTEX_CPP_VERSION='v${{ needs.get-update-version.outputs.new_version }}' -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
5858
channel: nightly
59-
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
59+
llamacpp-version: ${{ needs.get-llamacpp-latest-version.outputs.llamacpp_latest_version }}
6060

6161
build-windows-x64:
6262
uses: ./.github/workflows/template-build-windows-x64.yml
6363
secrets: inherit
64-
needs: [get-update-version, set-public-provider, get-cortex-llamacpp-latest-version]
64+
needs: [get-update-version, set-public-provider, get-llamacpp-latest-version]
6565
with:
6666
ref: ${{ needs.set-public-provider.outputs.ref }}
6767
public_provider: ${{ needs.set-public-provider.outputs.public_provider }}
@@ -71,40 +71,40 @@ jobs:
7171
build-deps-cmake-flags: "-DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
7272
ccache-dir: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
7373
channel: nightly
74-
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
74+
llamacpp-version: ${{ needs.get-llamacpp-latest-version.outputs.llamacpp_latest_version }}
7575

7676
build-linux-x64:
7777
uses: ./.github/workflows/template-build-linux.yml
7878
secrets: inherit
79-
needs: [get-update-version, set-public-provider, get-cortex-llamacpp-latest-version]
79+
needs: [get-update-version, set-public-provider, get-llamacpp-latest-version]
8080
with:
8181
ref: ${{ needs.set-public-provider.outputs.ref }}
8282
public_provider: ${{ needs.set-public-provider.outputs.public_provider }}
8383
new_version: ${{ needs.get-update-version.outputs.new_version }}
8484
runs-on: ubuntu-20-04
8585
cmake-flags: "-DCORTEX_VARIANT=nightly -DCORTEX_CPP_VERSION='v${{ needs.get-update-version.outputs.new_version }}' -DCMAKE_TOOLCHAIN_FILE=/home/runner/actions-runner/_work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
8686
channel: nightly
87-
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
87+
llamacpp-version: ${{ needs.get-llamacpp-latest-version.outputs.llamacpp_latest_version }}
8888
arch: amd64
8989

9090
build-linux-arm64:
9191
uses: ./.github/workflows/template-build-linux.yml
9292
secrets: inherit
93-
needs: [get-update-version, set-public-provider, get-cortex-llamacpp-latest-version]
93+
needs: [get-update-version, set-public-provider, get-llamacpp-latest-version]
9494
with:
9595
ref: ${{ needs.set-public-provider.outputs.ref }}
9696
public_provider: ${{ needs.set-public-provider.outputs.public_provider }}
9797
new_version: ${{ needs.get-update-version.outputs.new_version }}
9898
runs-on: ubuntu-2004-arm64
9999
cmake-flags: "-DCORTEX_VARIANT=nightly -DCORTEX_CPP_VERSION='v${{ needs.get-update-version.outputs.new_version }}' -DCMAKE_TOOLCHAIN_FILE=/home/runner/actions-runner/_work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
100100
channel: nightly
101-
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
101+
llamacpp-version: ${{ needs.get-llamacpp-latest-version.outputs.llamacpp_latest_version }}
102102
arch: arm64
103103

104104
update-latest-version:
105105
runs-on: ubuntu-latest
106106
if: needs.set-public-provider.outputs.public_provider == 'aws-s3'
107-
needs: [get-update-version, set-public-provider, build-linux-x64, build-linux-arm64, build-macos, build-windows-x64, get-cortex-llamacpp-latest-version]
107+
needs: [get-update-version, set-public-provider, build-linux-x64, build-linux-arm64, build-macos, build-windows-x64, get-llamacpp-latest-version]
108108
steps:
109109
- name: Update latest version
110110
id: update-latest-version
@@ -132,7 +132,7 @@ jobs:
132132
if: needs.set-public-provider.outputs.public_provider == 'aws-s3'
133133
uses: ./.github/workflows/template-build-docker-x64.yml
134134
secrets: inherit
135-
needs: [get-update-version, set-public-provider, get-cortex-llamacpp-latest-version, update-latest-version]
135+
needs: [get-update-version, set-public-provider, get-llamacpp-latest-version, update-latest-version]
136136
with:
137137
ref: ${{ needs.set-public-provider.outputs.ref }}
138138
new_version: nightly-${{ needs.get-update-version.outputs.new_version }}
@@ -141,7 +141,7 @@ jobs:
141141
tags: menloltd/cortex:nightly-${{ needs.get-update-version.outputs.new_version }}
142142

143143
noti-discord-nightly-and-update-url-readme:
144-
needs: [build-macos, build-windows-x64, build-linux-x64, get-update-version, set-public-provider, get-cortex-llamacpp-latest-version, update-latest-version, build-docker-x64]
144+
needs: [build-macos, build-windows-x64, build-linux-x64, get-update-version, set-public-provider, get-llamacpp-latest-version, update-latest-version, build-docker-x64]
145145
secrets: inherit
146146
if: github.event_name == 'schedule'
147147
uses: ./.github/workflows/template-noti-discord.yaml
@@ -150,7 +150,7 @@ jobs:
150150
new_version: ${{ needs.get-update-version.outputs.new_version }}
151151

152152
noti-discord-manual:
153-
needs: [build-macos, build-windows-x64, build-linux-x64, get-update-version, set-public-provider, get-cortex-llamacpp-latest-version, build-docker-x64]
153+
needs: [build-macos, build-windows-x64, build-linux-x64, get-update-version, set-public-provider, get-llamacpp-latest-version, build-docker-x64]
154154
secrets: inherit
155155
if: github.event_name == 'workflow_dispatch' && github.event.inputs.public_provider == 'aws-s3'
156156
uses: ./.github/workflows/template-noti-discord.yaml

.github/workflows/stable-build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
get-update-version:
1010
uses: ./.github/workflows/template-get-update-version.yml
1111

12-
get-cortex-llamacpp-latest-version:
12+
get-llamacpp-latest-version:
1313
uses: ./.github/workflows/template-cortex-llamacpp-latest-version.yml
1414

1515
create-draft-release:
@@ -39,7 +39,7 @@ jobs:
3939

4040
build-macos:
4141
uses: ./.github/workflows/template-build-macos.yml
42-
needs: [get-update-version, create-draft-release, get-cortex-llamacpp-latest-version]
42+
needs: [get-update-version, create-draft-release, get-llamacpp-latest-version]
4343
secrets: inherit
4444
with:
4545
ref: ${{ github.ref }}
@@ -48,12 +48,12 @@ jobs:
4848
cmake-flags: "-DCORTEX_VARIANT=prod -DCORTEX_CPP_VERSION='v${{ needs.get-update-version.outputs.new_version }}' -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
4949
channel: stable
5050
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
51-
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
51+
llamacpp-version: ${{ needs.get-llamacpp-latest-version.outputs.llamacpp_latest_version }}
5252

5353
build-windows-x64:
5454
uses: ./.github/workflows/template-build-windows-x64.yml
5555
secrets: inherit
56-
needs: [get-update-version, create-draft-release, get-cortex-llamacpp-latest-version]
56+
needs: [get-update-version, create-draft-release, get-llamacpp-latest-version]
5757
with:
5858
ref: ${{ github.ref }}
5959
public_provider: github
@@ -64,12 +64,12 @@ jobs:
6464
ccache-dir: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
6565
channel: stable
6666
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
67-
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
67+
llamacpp-version: ${{ needs.get-llamacpp-latest-version.outputs.llamacpp_latest_version }}
6868

6969
build-linux-x64:
7070
uses: ./.github/workflows/template-build-linux.yml
7171
secrets: inherit
72-
needs: [get-update-version, create-draft-release, get-cortex-llamacpp-latest-version]
72+
needs: [get-update-version, create-draft-release, get-llamacpp-latest-version]
7373
with:
7474
ref: ${{ github.ref }}
7575
public_provider: github
@@ -78,13 +78,13 @@ jobs:
7878
cmake-flags: "-DCORTEX_VARIANT=prod -DCORTEX_CPP_VERSION='v${{ needs.get-update-version.outputs.new_version }}' -DCMAKE_TOOLCHAIN_FILE=/home/runner/actions-runner/_work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
7979
channel: stable
8080
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
81-
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
81+
llamacpp-version: ${{ needs.get-llamacpp-latest-version.outputs.llamacpp_latest_version }}
8282
arch: amd64
8383

8484
build-linux-arm64:
8585
uses: ./.github/workflows/template-build-linux.yml
8686
secrets: inherit
87-
needs: [get-update-version, create-draft-release, get-cortex-llamacpp-latest-version]
87+
needs: [get-update-version, create-draft-release, get-llamacpp-latest-version]
8888
with:
8989
ref: ${{ github.ref }}
9090
public_provider: github
@@ -93,13 +93,13 @@ jobs:
9393
cmake-flags: "-DCORTEX_VARIANT=prod -DCORTEX_CPP_VERSION='v${{ needs.get-update-version.outputs.new_version }}' -DCMAKE_TOOLCHAIN_FILE=/home/runner/actions-runner/_work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
9494
channel: stable
9595
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
96-
cortex-llamacpp-version: ${{ needs.get-cortex-llamacpp-latest-version.outputs.cortex_llamacpp_latest_version }}
96+
llamacpp-version: ${{ needs.get-llamacpp-latest-version.outputs.llamacpp_latest_version }}
9797
arch: arm64
9898

9999
build-docker-x64:
100100
uses: ./.github/workflows/template-build-docker-x64.yml
101101
secrets: inherit
102-
needs: [get-update-version, get-cortex-llamacpp-latest-version]
102+
needs: [get-update-version, get-llamacpp-latest-version]
103103
with:
104104
ref: ${{ github.ref }}
105105
new_version: ${{ needs.get-update-version.outputs.new_version }}

0 commit comments

Comments
 (0)