Skip to content

Commit e5c6999

Browse files
authored
Merge pull request #21 from tattn/update-llama-dependency-20250606153945
[auto] Update llama.cpp to latest version
2 parents 34cbed9 + e39a218 commit e5c6999

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

Package.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import PackageDescription
44

5-
let llamaVersion = "b5575"
5+
let llamaVersion = "b5602"
66

77
// MARK: - Package Dependencies
88

@@ -94,7 +94,7 @@ packageTargets.append(contentsOf: [
9494
name: "LocalLLMClientLlamaFramework",
9595
url:
9696
"https://github.com/ggml-org/llama.cpp/releases/download/\(llamaVersion)/llama-\(llamaVersion)-xcframework.zip",
97-
checksum: "78ba1f1a8622e548f5e8a29b93473afe2e879b9b0781c3af0d31673c3310c7d6"
97+
checksum: "88b75946b8fdedc1eb7eb97be1286d0f15c836f3676579305cf091cb977740ac"
9898
),
9999
.target(
100100
name: "LocalLLMClientLlamaC",
@@ -159,7 +159,7 @@ packageTargets.append(contentsOf: [
159159
],
160160
linkerSettings: [
161161
.unsafeFlags([
162-
"-lggml-base", "-lggml-cpu", "-lggml-rpc", "-lggml", "-lllama", "-lmtmd"
162+
"-lggml-base", "-lggml", "-lllama", "-lmtmd"
163163
])
164164
]
165165
),

Sources/LocalLLMClientLlama/Utility.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#else
66
@preconcurrency import LocalLLMClientLlamaC
77
#endif
8+
import Foundation
89
#if canImport(OSLog)
910
import OSLog
1011
#endif
@@ -20,6 +21,10 @@ nonisolated(unsafe) private var llamaLogCallback: ((LlamaLogLevel, String) -> Vo
2021
public func initializeLlama() {
2122
guard !isLlamaInitialized else { return }
2223
isLlamaInitialized = true
24+
#if os(Linux)
25+
ggml_backend_load_all_from_path(ProcessInfo.processInfo.environment["LD_LIBRARY_PATH"])
26+
#endif
27+
2328
llama_backend_init()
2429

2530
if !isCustomLogEnabled {
Submodule llama.cpp updated 81 files

0 commit comments

Comments
 (0)