Skip to content

Commit e1fa23b

Browse files
committed
Merge remote-tracking branch 'koboldcpp/concedo_experimental' into esocrok
2 parents 7b1132e + af32785 commit e1fa23b

File tree

117 files changed

+5450
-2256
lines changed

Some content is hidden

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

117 files changed

+5450
-2256
lines changed
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Koboldcpp Windows OlderPC Nocuda
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
commit_hash:
7+
description: 'Optional commit hash to build from'
8+
required: false
9+
default: ''
10+
11+
env:
12+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
13+
14+
jobs:
15+
windows:
16+
runs-on: windows-2022
17+
steps:
18+
- name: Clone
19+
id: checkout
20+
uses: actions/checkout@v3
21+
with:
22+
ref: ${{ inputs.commit_hash != '' && inputs.commit_hash || github.head_ref || github.ref_name }}
23+
24+
- name: Show Commit Used
25+
run: |
26+
echo "Building from ref: ${{ inputs.commit_hash != '' && inputs.commit_hash || github.head_ref || github.ref_name }}"
27+
28+
- name: Get Python
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: 3.8.10
32+
33+
- name: Install python dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install customtkinter==5.2.0 pyinstaller==5.12.0 psutil==5.9.5
37+
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+
71+
- name: Download and install win64devkit
72+
run: |
73+
curl -L https://github.com/skeeto/w64devkit/releases/download/v1.22.0/w64devkit-1.22.0.zip --output w64devkit.zip
74+
Expand-Archive w64devkit.zip -DestinationPath .
75+
76+
- name: Add w64devkit to PATH
77+
run: |
78+
echo "$(Get-Location)\w64devkit\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
79+
80+
- name: Print System Environment Variables
81+
id: printvars
82+
run: |
83+
echo "Number of processors: ${env:NUMBER_OF_PROCESSORS}"
84+
echo "Processor Architecture: ${env:PROCESSOR_ARCHITECTURE}"
85+
echo "Computer Name: ${env:COMPUTERNAME}"
86+
wmic cpu get name
87+
wmic os get TotalVisibleMemorySize, FreePhysicalMemory
88+
89+
- name: Build Non-CUDA
90+
id: make_build
91+
run: |
92+
make LLAMA_CLBLAST=1 LLAMA_VULKAN=1 LLAMA_PORTABLE=1 -j ${env:NUMBER_OF_PROCESSORS} LLAMA_NOAVX1=1
93+
94+
- name: Package PyInstallers
95+
id: make_pyinstaller
96+
run: |
97+
./make_pyinstaller_oldpc.bat
98+
99+
- name: Save artifact
100+
uses: actions/upload-artifact@v4
101+
with:
102+
name: kcpp_windows_pyinstallers
103+
path: dist/

.github/workflows/kcpp-build-release-win-oldpc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Install python dependencies
3434
run: |
3535
python -m pip install --upgrade pip
36-
pip install customtkinter==5.2.0 pyinstaller==5.11.0 psutil==5.9.5 pdfplumber PyMuPdf tqdm
36+
pip install customtkinter==5.2.0 pyinstaller==5.12.0 psutil==5.9.5 pdfplumber PyMuPdf tqdm
3737
3838
- name: Display full Visual Studio info Before
3939
run: |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Install python dependencies
3434
run: |
3535
python -m pip install --upgrade pip
36-
pip install customtkinter==5.2.0 pyinstaller==5.11.0 psutil==5.9.5 pdfplumber PyMuPdf tqdm
36+
pip install customtkinter==5.2.0 pyinstaller==5.12.0 psutil==5.9.5 pdfplumber PyMuPdf tqdm
3737
3838
- name: Display full Visual Studio info Before
3939
run: |

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,19 @@ CXXV := $(shell $(CXX) --version | head -n 1)
164164
# For x86 based architectures
165165
ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686 amd64))
166166
ifdef LLAMA_PORTABLE
167-
SIMPLECFLAGS += -mavx -msse3 -mssse3
168167
SIMPLERCFLAGS += -msse3 -mssse3
168+
ifdef LLAMA_NOAVX1
169+
FULLCFLAGS += -msse3 -mssse3
170+
SIMPLECFLAGS += -msse3 -mssse3
171+
else
169172
ifdef LLAMA_NOAVX2
170-
FULLCFLAGS += -msse3 -mssse3 -mavx
173+
FULLCFLAGS += -mavx -msse3 -mssse3
174+
SIMPLECFLAGS += -mavx -msse3 -mssse3
171175
else
172176
FULLCFLAGS += -mavx2 -msse3 -mssse3 -mfma -mf16c -mavx
177+
SIMPLECFLAGS += -mavx -msse3 -mssse3
173178
endif # LLAMA_NOAVX2
179+
endif # LLAMA_NOAVX1
174180
else
175181
CFLAGS += -march=native -mtune=native
176182
SIMPLECFLAGS += -march=native -mtune=native

common/arg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3226,7 +3226,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
32263226
).set_examples({LLAMA_EXAMPLE_IMATRIX}));
32273227
add_opt(common_arg(
32283228
{"--parse-special"},
3229-
string_format("prase special tokens (chat, tool, etc) (default: %s)", params.parse_special ? "true" : "false"),
3229+
string_format("parse special tokens (chat, tool, etc) (default: %s)", params.parse_special ? "true" : "false"),
32303230
[](common_params & params) {
32313231
params.parse_special = true;
32323232
}
@@ -3271,7 +3271,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
32713271
).set_examples({LLAMA_EXAMPLE_EMBEDDING}));
32723272
add_opt(common_arg(
32733273
{"--embd-output-format"}, "FORMAT",
3274-
"empty = default, \"array\" = [[],[]...], \"json\" = openai style, \"json+\" = same \"json\" + cosine similarity matrix",
3274+
"empty = default, \"array\" = [[],[]...], \"json\" = openai style, \"json+\" = same \"json\" + cosine similarity matrix, \"raw\" = plain whitespace-delimited output (one embedding per line)",
32753275
[](common_params & params, const std::string & value) {
32763276
params.embd_out = value;
32773277
}

0 commit comments

Comments
 (0)