From 8b916c2f071242f674bcbdac8be5a2180d37c74f Mon Sep 17 00:00:00 2001 From: Ashraful Islam Date: Fri, 29 Dec 2023 13:59:09 -0600 Subject: [PATCH 1/2] updates the package.swift to use ggml as dependency --- Package.swift | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Package.swift b/Package.swift index 18d610d6941d2..260f9cea33f0e 100644 --- a/Package.swift +++ b/Package.swift @@ -13,21 +13,25 @@ let package = Package( products: [ .library(name: "llama", targets: ["llama"]), ], + dependencies: [ + .package(url: "https://github.com/1-ashraful-islam/ggml.git", .branch("master")) + ], targets: [ .target( name: "llama", + dependencies: ["ggml"], path: ".", exclude: [], sources: [ - "ggml.c", + // "ggml.c", "llama.cpp", - "ggml-alloc.c", - "ggml-backend.c", - "ggml-quants.c", - "ggml-metal.m", + // "ggml-alloc.c", + // "ggml-backend.c", + // "ggml-quants.c", + // "ggml-metal.m", ], resources: [ - .process("ggml-metal.metal") + // .process("ggml-metal.metal") ], publicHeadersPath: "spm-headers", cSettings: [ From 5f12e26899f50f177d2133e52d4b883c1189333f Mon Sep 17 00:00:00 2001 From: Ashraful Islam Date: Fri, 29 Dec 2023 14:21:34 -0600 Subject: [PATCH 2/2] changes the ggml package url src to ggerganov --- Package.swift | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Package.swift b/Package.swift index 260f9cea33f0e..e33a4ff46cb15 100644 --- a/Package.swift +++ b/Package.swift @@ -14,7 +14,7 @@ let package = Package( .library(name: "llama", targets: ["llama"]), ], dependencies: [ - .package(url: "https://github.com/1-ashraful-islam/ggml.git", .branch("master")) + .package(url: "https://github.com/ggerganov/ggml.git", .branch("master")) ], targets: [ .target( @@ -23,15 +23,7 @@ let package = Package( path: ".", exclude: [], sources: [ - // "ggml.c", "llama.cpp", - // "ggml-alloc.c", - // "ggml-backend.c", - // "ggml-quants.c", - // "ggml-metal.m", - ], - resources: [ - // .process("ggml-metal.metal") ], publicHeadersPath: "spm-headers", cSettings: [