Skip to content

Commit f87b2e5

Browse files
committed
chore: macOS drop of d07c62
1 parent 69c7661 commit f87b2e5

File tree

279 files changed

+26518
-7988
lines changed

Some content is hidden

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

279 files changed

+26518
-7988
lines changed

example/macos/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ EXTERNAL SOURCES:
2525
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
2626

2727
SPEC CHECKSUMS:
28-
file_selector_macos: 54fdab7caa3ac3fc43c9fac4d7d8d231277f8cf2
29-
fllama: 26c3b6cb0e6466f5d492ce5996717c7222f22bd9
28+
file_selector_macos: 585232b688707857504f9cb5f985a7c97fe4dd30
29+
fllama: 70eecc4bce57bde96fc985659224585564a2bfa2
3030
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
31-
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
31+
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
3232

3333
PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
3434

example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
ignoresPersistentStateOnLaunch = "NO"
6060
debugDocumentVersioning = "YES"
6161
debugServiceExtension = "internal"
62+
enableGPUValidationMode = "1"
6263
allowLocationSimulation = "YES">
6364
<BuildableProductRunnable
6465
runnableDebuggingMode = "0">

macos/llama.cpp/.devops/cpu.Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,25 @@ ARG UBUNTU_VERSION=22.04
22

33
FROM ubuntu:$UBUNTU_VERSION AS build
44

5+
ARG TARGETARCH
6+
7+
ARG GGML_CPU_ARM_ARCH=armv8-a
8+
59
RUN apt-get update && \
610
apt-get install -y build-essential git cmake libcurl4-openssl-dev
711

812
WORKDIR /app
913

1014
COPY . .
1115

12-
RUN cmake -S . -B build -DGGML_BACKEND_DL=ON -DGGML_NATIVE=OFF -DGGML_CPU_ALL_VARIANTS=ON -DLLAMA_CURL=ON -DCMAKE_BUILD_TYPE=Release && \
16+
RUN if [ "$TARGETARCH" = "amd64" ]; then \
17+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=ON -DGGML_NATIVE=OFF -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON; \
18+
elif [ "$TARGETARCH" = "arm64" ]; then \
19+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=ON -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=${GGML_CPU_ARM_ARCH}; \
20+
else \
21+
echo "Unsupported architecture"; \
22+
exit 1; \
23+
fi && \
1324
cmake --build build -j $(nproc)
1425

1526
RUN mkdir -p /app/lib && \

macos/llama.cpp/.devops/cuda.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG UBUNTU_VERSION=22.04
22
# This needs to generally match the container host's environment.
3-
ARG CUDA_VERSION=12.6.0
3+
ARG CUDA_VERSION=12.4.0
44
# Target the CUDA build image
55
ARG BASE_CUDA_DEV_CONTAINER=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
66

macos/llama.cpp/.devops/llama-cpp-cuda.srpm.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ Version: %( date "+%%Y%%m%%d" )
1717
Release: 1%{?dist}
1818
Summary: CPU Inference of LLaMA model in pure C/C++ (no CUDA/OpenCL)
1919
License: MIT
20-
Source0: https://github.com/ggerganov/llama.cpp/archive/refs/heads/master.tar.gz
20+
Source0: https://github.com/ggml-org/llama.cpp/archive/refs/heads/master.tar.gz
2121
BuildRequires: coreutils make gcc-c++ git cuda-toolkit
2222
Requires: cuda-toolkit
23-
URL: https://github.com/ggerganov/llama.cpp
23+
URL: https://github.com/ggml-org/llama.cpp
2424

2525
%define debug_package %{nil}
2626
%define source_date_epoch_from_changelog 0

macos/llama.cpp/.devops/llama-cpp.srpm.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ Version: %( date "+%%Y%%m%%d" )
1818
Release: 1%{?dist}
1919
Summary: CPU Inference of LLaMA model in pure C/C++ (no CUDA/OpenCL)
2020
License: MIT
21-
Source0: https://github.com/ggerganov/llama.cpp/archive/refs/heads/master.tar.gz
21+
Source0: https://github.com/ggml-org/llama.cpp/archive/refs/heads/master.tar.gz
2222
BuildRequires: coreutils make gcc-c++ git libstdc++-devel
2323
Requires: libstdc++
24-
URL: https://github.com/ggerganov/llama.cpp
24+
URL: https://github.com/ggml-org/llama.cpp
2525

2626
%define debug_package %{nil}
2727
%define source_date_epoch_from_changelog 0

macos/llama.cpp/.devops/musa.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG UBUNTU_VERSION=22.04
22
# This needs to generally match the container host's environment.
3-
ARG MUSA_VERSION=rc3.1.0
3+
ARG MUSA_VERSION=rc3.1.1
44
# Target the MUSA build image
55
ARG BASE_MUSA_DEV_CONTAINER=mthreads/musa:${MUSA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
66

macos/llama.cpp/.devops/nix/package.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ effectiveStdenv.mkDerivation (finalAttrs: {
133133
--replace '[bundle pathForResource:@"default" ofType:@"metallib"];' "@\"$out/bin/default.metallib\";"
134134
'';
135135

136-
# With PR#6015 https://github.com/ggerganov/llama.cpp/pull/6015,
136+
# With PR#6015 https://github.com/ggml-org/llama.cpp/pull/6015,
137137
# `default.metallib` may be compiled with Metal compiler from XCode
138138
# and we need to escape sandbox on MacOS to access Metal compiler.
139139
# `xcrun` is used find the path of the Metal compiler, which is varible
140140
# and not on $PATH
141-
# see https://github.com/ggerganov/llama.cpp/pull/6118 for discussion
141+
# see https://github.com/ggml-org/llama.cpp/pull/6118 for discussion
142142
__noChroot = effectiveStdenv.isDarwin && useMetalKit && precompileMetalShaders;
143143

144144
nativeBuildInputs =
@@ -220,7 +220,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
220220
broken = (useMetalKit && !effectiveStdenv.isDarwin);
221221

222222
description = "Inference of LLaMA model in pure C/C++${descriptionSuffix}";
223-
homepage = "https://github.com/ggerganov/llama.cpp/";
223+
homepage = "https://github.com/ggml-org/llama.cpp/";
224224
license = lib.licenses.mit;
225225

226226
# Accommodates `nix run` and `lib.getExe`

macos/llama.cpp/.devops/rocm.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-co
1111
FROM ${BASE_ROCM_DEV_CONTAINER} AS build
1212

1313
# Unless otherwise specified, we make a fat build.
14-
# List from https://github.com/ggerganov/llama.cpp/pull/1087#issuecomment-1682807878
14+
# List from https://github.com/ggml-org/llama.cpp/pull/1087#issuecomment-1682807878
1515
# This is mostly tied to rocBLAS supported archs.
1616
# gfx803, gfx900, gfx1032, gfx1101, gfx1102,not officialy supported
1717
# gfx906 is deprecated

macos/llama.cpp/.devops/tools.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ elif [[ "$arg1" == '--quantize' || "$arg1" == '-q' ]]; then
1313
exec ./llama-quantize "$@"
1414
elif [[ "$arg1" == '--run' || "$arg1" == '-r' ]]; then
1515
exec ./llama-cli "$@"
16+
elif [[ "$arg1" == '--bench' || "$arg1" == '-b' ]]; then
17+
exec ./llama-bench "$@"
18+
elif [[ "$arg1" == '--perplexity' || "$arg1" == '-p' ]]; then
19+
exec ./llama-perplexity "$@"
1620
elif [[ "$arg1" == '--all-in-one' || "$arg1" == '-a' ]]; then
1721
echo "Converting PTH to GGML..."
18-
for i in `ls $1/$2/ggml-model-f16.bin*`; do
22+
for i in $(ls $1/$2/ggml-model-f16.bin*); do
1923
if [ -f "${i/f16/q4_0}" ]; then
2024
echo "Skip model quantization, it already exists: ${i/f16/q4_0}"
2125
else
@@ -30,6 +34,10 @@ else
3034
echo "Available commands: "
3135
echo " --run (-r): Run a model previously converted into ggml"
3236
echo " ex: -m /models/7B/ggml-model-q4_0.bin -p \"Building a website can be done in 10 simple steps:\" -n 512"
37+
echo " --bench (-b): Benchmark the performance of the inference for various parameters."
38+
echo " ex: -m model.gguf"
39+
echo " --perplexity (-p): Measure the perplexity of a model over a given text."
40+
echo " ex: -m model.gguf -f file.txt"
3341
echo " --convert (-c): Convert a llama model into ggml"
3442
echo " ex: --outtype f16 \"/models/7B/\" "
3543
echo " --quantize (-q): Optimize with quantization process ggml"

macos/llama.cpp/.devops/vulkan.Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG UBUNTU_VERSION=jammy
1+
ARG UBUNTU_VERSION=24.04
22

33
FROM ubuntu:$UBUNTU_VERSION AS build
44

@@ -7,7 +7,7 @@ RUN apt update && apt install -y git build-essential cmake wget
77

88
# Install Vulkan SDK and cURL
99
RUN wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \
10-
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list && \
10+
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list https://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list && \
1111
apt update -y && \
1212
apt-get install -y vulkan-sdk libcurl4-openssl-dev curl
1313

@@ -34,7 +34,7 @@ RUN mkdir -p /app/full \
3434
FROM ubuntu:$UBUNTU_VERSION AS base
3535

3636
RUN apt-get update \
37-
&& apt-get install -y libgomp1 curl\
37+
&& apt-get install -y libgomp1 curl libvulkan-dev \
3838
&& apt autoremove -y \
3939
&& apt clean -y \
4040
&& rm -rf /tmp/* /var/tmp/* \
@@ -55,8 +55,9 @@ RUN apt-get update \
5555
git \
5656
python3 \
5757
python3-pip \
58-
&& pip install --upgrade pip setuptools wheel \
59-
&& pip install -r requirements.txt \
58+
python3-wheel \
59+
&& pip install --break-system-packages --upgrade setuptools \
60+
&& pip install --break-system-packages -r requirements.txt \
6061
&& apt autoremove -y \
6162
&& apt clean -y \
6263
&& rm -rf /tmp/* /var/tmp/* \

macos/llama.cpp/.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,11 @@ indent_style = tab
4040
[examples/cvector-generator/*.txt]
4141
trim_trailing_whitespace = unset
4242
insert_final_newline = unset
43+
44+
[models/templates/*.jinja]
45+
indent_style = unset
46+
indent_size = unset
47+
end_of_line = unset
48+
charset = unset
49+
trim_trailing_whitespace = unset
50+
insert_final_newline = unset

macos/llama.cpp/.github/ISSUE_TEMPLATE/020-enhancement.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ body:
66
- type: markdown
77
attributes:
88
value: |
9-
[Please post your idea first in Discussion if there is not yet a consensus for this enhancement request. This will help to keep this issue tracker focused on enhancements that the community has agreed needs to be implemented.](https://github.com/ggerganov/llama.cpp/discussions/categories/ideas)
9+
[Please post your idea first in Discussion if there is not yet a consensus for this enhancement request. This will help to keep this issue tracker focused on enhancements that the community has agreed needs to be implemented.](https://github.com/ggml-org/llama.cpp/discussions/categories/ideas)
1010
1111
- type: checkboxes
1212
id: prerequisites
@@ -16,11 +16,11 @@ body:
1616
options:
1717
- label: I am running the latest code. Mention the version if possible as well.
1818
required: true
19-
- label: I carefully followed the [README.md](https://github.com/ggerganov/llama.cpp/blob/master/README.md).
19+
- label: I carefully followed the [README.md](https://github.com/ggml-org/llama.cpp/blob/master/README.md).
2020
required: true
2121
- label: I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
2222
required: true
23-
- label: I reviewed the [Discussions](https://github.com/ggerganov/llama.cpp/discussions), and have a new and useful enhancement to share.
23+
- label: I reviewed the [Discussions](https://github.com/ggml-org/llama.cpp/discussions), and have a new and useful enhancement to share.
2424
required: true
2525

2626
- type: textarea

macos/llama.cpp/.github/ISSUE_TEMPLATE/030-research.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ body:
66
- type: markdown
77
attributes:
88
value: |
9-
Don't forget to check for any [duplicate research issue tickets](https://github.com/ggerganov/llama.cpp/issues?q=is%3Aopen+is%3Aissue+label%3A%22research+%F0%9F%94%AC%22)
9+
Don't forget to check for any [duplicate research issue tickets](https://github.com/ggml-org/llama.cpp/issues?q=is%3Aopen+is%3Aissue+label%3A%22research+%F0%9F%94%AC%22)
1010
1111
- type: checkboxes
1212
id: research-stage

macos/llama.cpp/.github/ISSUE_TEMPLATE/040-refactor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ body:
66
- type: markdown
77
attributes:
88
value: |
9-
Don't forget to [check for existing refactor issue tickets](https://github.com/ggerganov/llama.cpp/issues?q=is%3Aopen+is%3Aissue+label%3Arefactoring) in case it's already covered.
10-
Also you may want to check [Pull request refactor label as well](https://github.com/ggerganov/llama.cpp/pulls?q=is%3Aopen+is%3Apr+label%3Arefactoring) for duplicates too.
9+
Don't forget to [check for existing refactor issue tickets](https://github.com/ggml-org/llama.cpp/issues?q=is%3Aopen+is%3Aissue+label%3Arefactoring) in case it's already covered.
10+
Also you may want to check [Pull request refactor label as well](https://github.com/ggml-org/llama.cpp/pulls?q=is%3Aopen+is%3Apr+label%3Arefactoring) for duplicates too.
1111
1212
- type: textarea
1313
id: background-description
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
blank_issues_enabled: true
22
contact_links:
33
- name: Got an idea?
4-
url: https://github.com/ggerganov/llama.cpp/discussions/categories/ideas
4+
url: https://github.com/ggml-org/llama.cpp/discussions/categories/ideas
55
about: Pop it there. It may then become an enhancement ticket.
66
- name: Got a question?
7-
url: https://github.com/ggerganov/llama.cpp/discussions/categories/q-a
7+
url: https://github.com/ggml-org/llama.cpp/discussions/categories/q-a
88
about: Ask a question there!
99
- name: Want to contribute?
10-
url: https://github.com/ggerganov/llama.cpp/wiki/contribute
10+
url: https://github.com/ggml-org/llama.cpp/wiki/contribute
1111
about: Head to the contribution guide page of the wiki for areas you can help with
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
*Make sure to read the [contributing guidelines](https://github.com/ggerganov/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*
1+
*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*

macos/llama.cpp/.github/workflows/bench.yml.disabled

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# TODO: there have been some issues with the workflow, so disabling for now
2-
# https://github.com/ggerganov/llama.cpp/issues/7893
2+
# https://github.com/ggml-org/llama.cpp/issues/7893
33
#
44
# Benchmark
55
name: Benchmark
@@ -57,17 +57,7 @@ jobs:
5757

5858
if: |
5959
inputs.gpu-series == 'Standard_NC4as_T4_v3'
60-
|| (
61-
github.event_name == 'schedule'
62-
&& github.ref_name == 'master'
63-
&& github.repository_owner == 'ggerganov'
64-
)
6560
|| github.event_name == 'pull_request_target'
66-
|| (
67-
github.event_name == 'push'
68-
&& github.event.ref == 'refs/heads/master'
69-
&& github.repository_owner == 'ggerganov'
70-
)
7161
steps:
7262
- name: Clone
7363
id: checkout

0 commit comments

Comments
 (0)