Skip to content

Commit 6639d3e

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 14a51f4 + e1af05f commit 6639d3e

17 files changed

+1375
-1016
lines changed

.github/workflows/build-and-release.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
matrix:
14-
os: [ubuntu-20.04, windows-2019, macos-13]
14+
os: [ubuntu-22.04, windows-2022, macos-14, macos-15]
1515

1616
steps:
1717
- uses: actions/checkout@v4
@@ -74,6 +74,7 @@ jobs:
7474
CIBW_SKIP: "*musllinux* pp*"
7575
CIBW_REPAIR_WHEEL_COMMAND: ""
7676
CIBW_ARCHS: "aarch64"
77+
CIBW_ENVIRONMENT: CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 -DCMAKE_CROSSCOMPILING=ON"
7778
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-*"
7879
with:
7980
output-dir: wheelhouse

.github/workflows/build-docker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99
jobs:
1010
docker:
1111
name: Build and push Docker image
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-22.04
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4

.github/workflows/build-wheels-cuda.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ permissions:
88
jobs:
99
define_matrix:
1010
name: Define Build Matrix
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-22.04
1212
outputs:
1313
matrix: ${{ steps.set-matrix.outputs.matrix }}
1414
defaults:
@@ -20,7 +20,7 @@ jobs:
2020
id: set-matrix
2121
run: |
2222
$matrix = @{
23-
'os' = @('ubuntu-latest', 'windows-2019')
23+
'os' = @('ubuntu-22.04') #, 'windows-2022')
2424
'pyver' = @("3.9", "3.10", "3.11", "3.12")
2525
'cuda' = @("12.1.1", "12.2.2", "12.3.2", "12.4.1") #, "12.5.1", "12.6.1")
2626
'releasetag' = @("basic")

.github/workflows/build-wheels-metal.yaml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
matrix:
14-
os: [macos-13, macos-14, macos-15]
14+
os: [macos-14, macos-15]
1515

1616
steps:
1717
- uses: actions/checkout@v4
@@ -23,32 +23,21 @@ jobs:
2323
with:
2424
python-version: "3.12"
2525
cache: 'pip'
26-
26+
2727
- name: Install dependencies (Linux/MacOS)
28-
if: runner.os != 'Windows'
2928
run: |
3029
python -m pip install --upgrade pip
3130
python -m pip install uv
3231
RUST_LOG=trace python -m uv pip install -e .[all] --verbose
3332
shell: bash
3433

35-
- name: Install dependencies (Windows)
36-
if: runner.os == 'Windows'
37-
env:
38-
RUST_LOG: trace
39-
run: |
40-
python -m pip install --upgrade pip
41-
python -m pip install uv
42-
python -m uv pip install -e .[all] --verbose
43-
shell: cmd
44-
4534
- name: Build wheels
4635
uses: pypa/[email protected]
4736
env:
4837
# disable repair
4938
CIBW_REPAIR_WHEEL_COMMAND: ""
5039
CIBW_ARCHS: "arm64"
51-
CIBW_ENVIRONMENT: CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 -DGGML_METAL=on"
40+
CIBW_ENVIRONMENT: CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 -DGGML_METAL=on -DCMAKE_CROSSCOMPILING=ON"
5241
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*"
5342
with:
5443
package-dir: .
@@ -69,7 +58,7 @@ jobs:
6958
with:
7059
merge-multiple: true
7160
path: dist2
72-
61+
7362
- uses: softprops/action-gh-release@v2
7463
with:
7564
files: dist2/*

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.3.14]
11+
12+
- feat: Update llama.cpp to ggerganov/llama.cpp@79e0b68c178656bb0632cb8602d2940b755077f8
13+
14+
## [0.3.13]
15+
16+
- feat: Update llama.cpp to ggerganov/llama.cpp@bdca38376f7e8dd928defe01ce6a16218a64b040
17+
- fix: Better chat format for Qwen2.5-VL by @alcoftTAO in #2040
18+
19+
## [0.3.12]
20+
21+
- feat: Update llama.cpp to ggerganov/llama.cpp@a0374a67e2924f2e845cdc59dd67d9a44065a89c
22+
23+
## [0.3.11]
24+
25+
- fix: Update reference to `llama_kv_cache_clear` in Llama.embed. Closes #2037 by @abetlen in 9e5a4eaa84156084ed7bbb91e6efcc91dc6217bc
26+
27+
## [0.3.10]
28+
29+
- feat: Update llama.cpp to ggerganov/llama.cpp@8846aace4934ad29651ea61b8c7e3f6b0556e3d2
30+
- feat: Add support for llama.cpp multimodal, add Qwen2.5-VL chat handler by @abetlen in cd548bd0f14210627798237d5c2ea78acfb88ccb
31+
1032
## [0.3.9]
1133

1234
- feat: Update llama.cpp to ggerganov/llama.cpp@8733e0cf6eefc7c7752297cc22d0836706f4222c

CMakeLists.txt

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,15 @@ if (LLAMA_BUILD)
9696
set(GGML_METAL_EMBED_LIBRARY "ON" CACHE BOOL "ggml: embed metal library" FORCE)
9797
endif()
9898

99+
99100
add_subdirectory(vendor/llama.cpp)
101+
102+
if (WIN32)
103+
if (TARGET llama)
104+
set_target_properties(llama PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
105+
endif()
106+
endif()
107+
100108
llama_cpp_python_install_target(llama)
101109
llama_cpp_python_install_target(ggml)
102110

@@ -147,34 +155,33 @@ if (LLAMA_BUILD)
147155

148156
# Building llava
149157
add_subdirectory(vendor/llama.cpp/tools/mtmd)
150-
set_target_properties(llava_shared PROPERTIES OUTPUT_NAME "llava")
151158

152159
if (WIN32)
153-
set_target_properties(llava_shared PROPERTIES CUDA_ARCHITECTURES OFF)
160+
set_target_properties(mtmd PROPERTIES CUDA_ARCHITECTURES OFF)
154161
endif()
155-
llama_cpp_python_install_target(llava_shared)
162+
llama_cpp_python_install_target(mtmd)
156163
if (WIN32)
157164
install(
158-
FILES $<TARGET_RUNTIME_DLLS:llava_shared>
165+
FILES $<TARGET_RUNTIME_DLLS:mtmd>
159166
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/llama_cpp/lib
160167
)
161168
install(
162-
FILES $<TARGET_RUNTIME_DLLS:llava_shared>
169+
FILES $<TARGET_RUNTIME_DLLS:mtmd>
163170
DESTINATION ${SKBUILD_PLATLIB_DIR}/llama_cpp/lib
164171
)
165172
endif()
166173

167-
# Fix for llava build: Add include directory for llama.h
174+
# Fix for mtmd build: Add include directory for llama.h
168175
# Move these commands after the add_subdirectory call
169-
target_include_directories(llava PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/llama.cpp/include)
170-
target_include_directories(llava PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/llama.cpp/ggml/include)
176+
target_include_directories(mtmd PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/llama.cpp/include)
177+
target_include_directories(mtmd PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/llama.cpp/ggml/include)
171178

172179
if (BUILD_SHARED_LIBS)
173-
target_include_directories(llava_shared PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/llama.cpp/include)
174-
target_include_directories(llava_shared PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/llama.cpp/ggml/include)
180+
target_include_directories(mtmd PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/llama.cpp/include)
181+
target_include_directories(mtmd PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/llama.cpp/ggml/include)
175182
endif()
176183

177-
target_include_directories(llama-llava-cli PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/llama.cpp/include)
178-
target_include_directories(llama-minicpmv-cli PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/llama.cpp/include)
184+
# target_include_directories(llama-llava-cli PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/llama.cpp/include)
185+
# target_include_directories(llama-minicpmv-cli PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/llama.cpp/include)
179186
endif()
180187
endif()

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@ Below are the supported multi-modal models and their respective chat handlers (P
505505
| [nanollava](https://huggingface.co/abetlen/nanollava-gguf) | `NanollavaChatHandler` | `nanollava` |
506506
| [llama-3-vision-alpha](https://huggingface.co/abetlen/llama-3-vision-alpha-gguf) | `Llama3VisionAlphaChatHandler` | `llama-3-vision-alpha` |
507507
| [minicpm-v-2.6](https://huggingface.co/openbmb/MiniCPM-V-2_6-gguf) | `MiniCPMv26ChatHandler` | `minicpm-v-2.6` |
508+
| [qwen2.5-vl](https://huggingface.co/unsloth/Qwen2.5-VL-3B-Instruct-GGUF) | `Qwen25VLChatHandler` | `qwen2.5-vl` |
508509

509510
Then you'll need to use a custom chat handler to load the clip model and process the chat messages and images.
510511

docker/simple/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ARG IMAGE
99

1010
# Update and upgrade the existing packages
1111
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
12+
git \
1213
python3 \
1314
python3-pip \
1415
ninja-build \

llama_cpp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from .llama_cpp import *
22
from .llama import *
33

4-
__version__ = "0.3.9"
4+
__version__ = "0.3.14"

0 commit comments

Comments
 (0)