Skip to content

Commit 99204eb

Browse files
committed
Merge branch 'cpu_refactor_removed' into crokeso
2 parents 418cdb4 + 9dae1dc commit 99204eb

File tree

182 files changed

+31533
-34016
lines changed

Some content is hidden

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

182 files changed

+31533
-34016
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ charset = unset
4949
trim_trailing_whitespace = unset
5050
insert_final_newline = unset
5151

52-
[tools/mtmd/miniaudio.h]
52+
[vendor/miniaudio/miniaudio.h]
5353
trim_trailing_whitespace = unset
5454
insert_final_newline = unset

.github/workflows/kcpp-build-release-arm64.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ jobs:
7878
--add-data './kcpp_adapters:./kcpp_adapters' \
7979
--add-data './koboldcpp.py:.' \
8080
--add-data './json_to_gbnf.py:.' \
81-
--add-data './launch.cmd:.' \
82-
--add-data './requirements_minimal.txt:.' \
8381
--add-data './LICENSE.md:.' \
8482
--add-data './MIT_LICENSE_GGML_SDCPP_LLAMACPP_ONLY.md:.' \
8583
--add-data './klite.embd:.' \

.github/workflows/kcpp-build-release-linux-cuda12.yaml renamed to .github/workflows/kcpp-build-release-linux-oldpc.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Koboldcpp Linux CUDA12
1+
name: Koboldcpp Linux OldPC
22

33
on:
44
workflow_dispatch:
@@ -10,8 +10,9 @@ on:
1010

1111
env:
1212
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
13-
KCPP_CUDA: 12.1.0
14-
ARCHES_CU12: 1
13+
NOAVX2: 1
14+
ARCHES_CU11: 1
15+
KCPP_CUDA: 11.5.0
1516

1617
jobs:
1718
linux:
@@ -54,6 +55,9 @@ jobs:
5455
run: |
5556
./koboldcpp.sh dist
5657
58+
- name: Rename file before upload
59+
run: mv dist/koboldcpp-linux-x64-cuda1150 dist/koboldcpp-linux-x64-oldpc
60+
5761
- name: Save artifact
5862
uses: actions/upload-artifact@v4
5963
with:

.github/workflows/kcpp-build-release-linux-rocm.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ env:
1616
jobs:
1717
linux:
1818
runs-on: ubuntu-22.04
19-
steps:
19+
permissions: write-all
20+
steps:
2021
- name: Free Disk Space (Ubuntu)
2122
uses: jlumbroso/free-disk-space@main
2223
with:
2324
# this might remove tools that are actually needed,
2425
# if set to "true" but frees about 6 GB
2526
tool-cache: true
26-
27+
2728
# all of these default to true, but feel free to set to
2829
# "false" if necessary for your workflow
2930
android: true
@@ -32,7 +33,7 @@ jobs:
3233
large-packages: true
3334
docker-images: true
3435
swap-storage: true
35-
36+
3637
- name: Clone
3738
id: checkout
3839
uses: actions/checkout@v3
@@ -70,3 +71,9 @@ jobs:
7071
with:
7172
name: kcpp_linux_binary
7273
path: dist/
74+
75+
- name: Upload to GitHub Release
76+
env:
77+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
run: |
79+
gh release upload rocm-rolling dist/koboldcpp-linux-x64-rocm --clobber

.github/workflows/kcpp-build-release-linux.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ on:
1010

1111
env:
1212
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
13-
NOAVX2: 1
14-
ARCHES_CU11: 1
15-
KCPP_CUDA: 11.5.0
13+
KCPP_CUDA: 12.1.0
14+
ARCHES_CU12: 1
1615

1716
jobs:
1817
linux:
@@ -52,6 +51,9 @@ jobs:
5251
run: |
5352
./koboldcpp.sh dist
5453
54+
- name: Rename file before upload
55+
run: mv dist/koboldcpp-linux-x64-cuda1210 dist/koboldcpp-linux-x64
56+
5557
- name: Save artifact
5658
uses: actions/upload-artifact@v4
5759
with:

.github/workflows/kcpp-build-release-osx.yaml renamed to .github/workflows/kcpp-build-release-macos.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
make LLAMA_METAL=1 LLAMA_PORTABLE=1
3737
chmod +x './create_ver_file.sh'
3838
. create_ver_file.sh
39-
pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --collect-all pdfplumber --collect-all PyMuPdf --collect-all tqdm --add-data './koboldcpp_default.so:.' --add-data './ggml-metal-merged.metal:.' --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --add-data './json_to_gbnf.py:.' --add-data './launch.cmd:.' --add-data './requirements_minimal.txt:.' --add-data './LICENSE.md:.' --add-data './MIT_LICENSE_GGML_SDCPP_LLAMACPP_ONLY.md:.' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './taesd_f.embd:.' --add-data './taesd_3.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --version-file './version.txt' --clean --console koboldcpp.py -n "koboldcpp-mac-arm64"
39+
pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_default.so:.' --add-data './ggml-metal-merged.metal:.' --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --add-data './json_to_gbnf.py:.' --add-data './LICENSE.md:.' --add-data './MIT_LICENSE_GGML_SDCPP_LLAMACPP_ONLY.md:.' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './taesd_f.embd:.' --add-data './taesd_3.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --version-file './version.txt' --clean --console koboldcpp.py -n "koboldcpp-mac-arm64"
4040
4141
- name: Test
4242
id: test

.github/workflows/kcpp-build-release-win-oldcpu-full.yaml renamed to .github/workflows/kcpp-build-release-win-oldpc.yaml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Koboldcpp Windows Full OldCPU Binaries
1+
name: Koboldcpp Windows OldPC
22

33
on:
44
workflow_dispatch:
@@ -13,7 +13,7 @@ env:
1313

1414
jobs:
1515
windows:
16-
runs-on: windows-2019
16+
runs-on: windows-2022
1717
steps:
1818
- name: Clone
1919
id: checkout
@@ -35,6 +35,39 @@ jobs:
3535
python -m pip install --upgrade pip
3636
pip install customtkinter==5.2.0 pyinstaller==5.11.0 psutil==5.9.5 pdfplumber PyMuPdf tqdm
3737
38+
- name: Display full Visual Studio info Before
39+
run: |
40+
& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -all -products * -format json
41+
shell: pwsh
42+
43+
- name: Visual Studio 2019 Reinstall
44+
shell: cmd
45+
run: |
46+
@echo off
47+
echo Preparing setup
48+
curl -fLO https://download.visualstudio.microsoft.com/download/pr/1fbe074b-8ae1-4e9b-8e83-d1ce4200c9d1/61098e228df7ba3a6a8b4e920a415ad8878d386de6dd0f23f194fe1a55db189a/vs_Enterprise.exe
49+
vs_Enterprise.exe --quiet --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.CLI.Support --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --add Microsoft.VisualStudio.Workload.UniversalBuildTools --add Microsoft.VisualStudio.Component.VC.CMake.Project
50+
echo Waiting for VS2019 setup
51+
set "ProcessName=setup.exe"
52+
:CheckProcess
53+
tasklist /FI "IMAGENAME eq %ProcessName%" | find /I "%ProcessName%" >nul
54+
if %errorlevel%==0 (
55+
ping 127.0.0.1 /n 5 >nul
56+
goto CheckProcess
57+
)
58+
echo VS2019 Setup completed
59+
exit /b 0
60+
61+
- name: Disable Visual Studio 2022 by Renaming
62+
run: |
63+
Rename-Item "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" "Enterprise_DISABLED"
64+
shell: pwsh
65+
66+
- name: Display full Visual Studio info After
67+
run: |
68+
& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -all -products * -format json
69+
shell: pwsh
70+
3871
- name: Download and install win64devkit
3972
run: |
4073
curl -L https://github.com/skeeto/w64devkit/releases/download/v1.22.0/w64devkit-1.22.0.zip --output w64devkit.zip
@@ -88,7 +121,7 @@ jobs:
88121
- name: Package PyInstallers
89122
id: make_pyinstaller
90123
run: |
91-
./make_pyinstaller_cuda_oldcpu.bat
124+
./make_pyinstaller_cuda_oldpc.bat
92125
93126
- name: Save artifact
94127
uses: actions/upload-artifact@v4

.github/workflows/kcpp-build-release-win-full-cu12.yaml renamed to .github/workflows/kcpp-build-release-win.yaml

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Koboldcpp Windows Full Binaries CUDA 12
1+
name: Koboldcpp Windows
22

33
on:
44
workflow_dispatch:
@@ -13,7 +13,7 @@ env:
1313

1414
jobs:
1515
windows:
16-
runs-on: windows-2019
16+
runs-on: windows-2022
1717
steps:
1818
- name: Clone
1919
id: checkout
@@ -35,6 +35,45 @@ jobs:
3535
python -m pip install --upgrade pip
3636
pip install customtkinter==5.2.0 pyinstaller==5.11.0 psutil==5.9.5 pdfplumber PyMuPdf tqdm
3737
38+
- name: Display full Visual Studio info Before
39+
run: |
40+
& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -all -products * -format json
41+
shell: pwsh
42+
43+
- name: Visual Studio 2019 Reinstall
44+
shell: cmd
45+
run: |
46+
@echo off
47+
echo Preparing setup
48+
curl -fLO https://download.visualstudio.microsoft.com/download/pr/1fbe074b-8ae1-4e9b-8e83-d1ce4200c9d1/61098e228df7ba3a6a8b4e920a415ad8878d386de6dd0f23f194fe1a55db189a/vs_Enterprise.exe
49+
vs_Enterprise.exe --quiet --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.CLI.Support --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --add Microsoft.VisualStudio.Workload.UniversalBuildTools --add Microsoft.VisualStudio.Component.VC.CMake.Project
50+
echo Waiting for VS2019 setup
51+
set "ProcessName=setup.exe"
52+
:CheckProcess
53+
tasklist /FI "IMAGENAME eq %ProcessName%" | find /I "%ProcessName%" >nul
54+
if %errorlevel%==0 (
55+
ping 127.0.0.1 /n 5 >nul
56+
goto CheckProcess
57+
)
58+
echo VS2019 Setup completed
59+
exit /b 0
60+
61+
- uses: Jimver/cuda-toolkit@v0.2.24
62+
id: cuda-toolkit
63+
with:
64+
cuda: '12.1.0'
65+
use-github-cache: false
66+
67+
- name: Disable Visual Studio 2022 by Renaming
68+
run: |
69+
Rename-Item "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" "Enterprise_DISABLED"
70+
shell: pwsh
71+
72+
- name: Display full Visual Studio info After
73+
run: |
74+
& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -all -products * -format json
75+
shell: pwsh
76+
3877
- name: Download and install win64devkit
3978
run: |
4079
curl -L https://github.com/skeeto/w64devkit/releases/download/v1.22.0/w64devkit-1.22.0.zip --output w64devkit.zip
@@ -57,13 +96,6 @@ jobs:
5796
id: make_build
5897
run: |
5998
make LLAMA_CLBLAST=1 LLAMA_VULKAN=1 LLAMA_PORTABLE=1 -j ${env:NUMBER_OF_PROCESSORS}
60-
echo "Vulkan Shaders Rebuilt"
61-
62-
- uses: Jimver/cuda-toolkit@v0.2.15
63-
id: cuda-toolkit
64-
with:
65-
cuda: '12.1.0'
66-
use-github-cache: false
6799
68100
- name: Build CUDA
69101
id: cmake_build
@@ -89,7 +121,8 @@ jobs:
89121
- name: Package PyInstallers
90122
id: make_pyinstaller
91123
run: |
92-
./make_pyinstaller_cuda12.bat
124+
./make_pyinstaller.bat
125+
./make_pyinstaller_cuda.bat
93126
94127
- name: Save artifact
95128
uses: actions/upload-artifact@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.a
33
*.bin
44
*.tmp.yaml
5+
*.Identifier
56

67
.DS_Store
78
.build/

0 commit comments

Comments
 (0)