Build Information
Successful build of llmfarm_core, reference main (a0c1bc
), with Swift 6.0 for macOS (SPM) on 4 Nov 2024 06:29:58 UTC.
Swift 6 data race errors: 4
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/buhe/llmfarm_core.swift.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/buhe/llmfarm_core.swift
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at a0c1bc8 Update swift.yml
Cloned https://github.com/buhe/llmfarm_core.swift.git
Revision (git rev-parse @):
a0c1bc8b584e6c24442d48a82dd5383fa0f18740
SUCCESS checkout https://github.com/buhe/llmfarm_core.swift.git at main
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "llmfarm_core.swift",
"name": "llmfarm_core",
"url": "https://github.com/buhe/llmfarm_core.swift.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/llmfarm_core.swift",
"dependencies": [
]
}
]
}
Fetching https://github.com/buhe/llmfarm_core.swift.git
[1/1197] Fetching llmfarm_core.swift
Fetched https://github.com/buhe/llmfarm_core.swift.git from cache (1.46s)
Creating working copy for https://github.com/buhe/llmfarm_core.swift.git
Working copy of https://github.com/buhe/llmfarm_core.swift.git resolved at main (a0c1bc8)
warning: '.resolve-product-dependencies': dependency 'llmfarm_core.swift' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $PWD
https://github.com/buhe/llmfarm_core.swift.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/34] Write sources
[1/34] Copying metal
[2/34] Copying tokenizers
[3/34] Write swift-version--7754E27361AE5C74.txt
[4/34] Compiling llmfarm_core_cpp package_helper.m
[5/34] Compiling llmfarm_core_cpp resource_bundle_accessor.m
[6/34] Compiling llmfarm_core_cpp gpt_spm.mm
[7/34] Compiling rwkv.mm
[7/34] Compiling llmfarm_core_cpp grammar-parser.mm
[9/34] Compiling gptneox.mm
[10/34] Compiling starcoder.mm
[11/34] Compiling replit.mm
[12/34] Compiling ggml_d925ed-alloc.m
[13/34] Compiling ggml_d925ed-metal.m
[14/34] Compiling k_quants_dadbed9.m
[15/34] Compiling llmfarm_core_cpp gpt_helpers.mm
[16/34] Compiling ggml-metal_dadbed9.m
[17/34] Compiling ggml-backend.m
[18/34] Compiling ggml-metal.m
[19/34] Compiling ggml-alloc_dadbed9.m
[20/34] Compiling ggml-alloc.m
[21/34] Compiling gpt2.mm
[22/34] Compiling train.mm
[23/34] Compiling ggml-quants.m
[24/34] Compiling llmfarm_core_cpp exception_helper_objc.mm
[25/34] Compiling llama_dadbed9.mm
[26/34] Compiling llmfarm_core_cpp exception_helper.mm
[27/34] Compiling export-lora.mm
[28/34] Compiling finetune.mm
[29/34] Compiling ggml_dadbed9.m
[30/34] Compiling ggml_d925ed.m
[31/34] Compiling ggml.m
[32/34] Compiling common.mm
[33/34] Compiling llama.mm
[35/54] Emitting module llmfarm_core
<module-includes>:6:9: note: in file included from <module-includes>:6:
4 | #import "/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core_cpp/spm-headers/finetune.h"
5 | #import "/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core_cpp/spm-headers/gpt2.h"
6 | #import "/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core_cpp/spm-headers/gpt_spm.h"
| `- note: in file included from <module-includes>:6:
7 | #import "/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core_cpp/spm-headers/gptneox.h"
8 | #import "/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core_cpp/spm-headers/llama.h"
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core_cpp/spm-headers/gpt_spm.h:138:30: warning: declaration of 'struct rwkv_context' will not be visible outside of this function
136 | float repeat_penalty);
137 |
138 | void rwkv_init_logits(struct rwkv_context * model);
| `- warning: declaration of 'struct rwkv_context' will not be visible outside of this function
139 | int32_t rwkv_sample(int n_logits, float * logits, int top_k, float top_p, float temp);
140 | int32_t rwkv_sample_repeat(int n_logits, float * logits,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:362:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelSampleParams' may have shared mutable state; this is an error in the Swift 6 language mode
344 | }
345 |
346 | public struct ModelSampleParams {
| `- note: consider making struct 'ModelSampleParams' conform to the 'Sendable' protocol
347 | public var n_batch: Int32
348 | public var temp: Float
:
360 | public var penalize_nl: Bool
361 |
362 | public static let `default` = ModelSampleParams(
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelSampleParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
363 | n_batch: 512,
364 | temp: 0.9,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/Extensions.swift:34:1: warning: extension declares a conformance of imported type 'String' to imported protocol 'Error'; this will not behave correctly if the owners of 'Swift' introduce this conformance in the future
32 | }
33 |
34 | extension String: Error {
| |- warning: extension declares a conformance of imported type 'String' to imported protocol 'Error'; this will not behave correctly if the owners of 'Swift' introduce this conformance in the future
| `- note: add '@retroactive' to silence this warning
35 | }
36 |
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMA_FineTune.swift:10:5: warning: var 'aaa' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
8 | import llmfarm_core_cpp
9 |
10 | var aaa = 1
| |- warning: var 'aaa' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'aaa' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'aaa' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 | var LLaMa_FineTune_obj_ptr:UnsafeMutableRawPointer? = nil
12 |
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMA_FineTune.swift:11:5: warning: var 'LLaMa_FineTune_obj_ptr' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
9 |
10 | var aaa = 1
11 | var LLaMa_FineTune_obj_ptr:UnsafeMutableRawPointer? = nil
| |- warning: var 'LLaMa_FineTune_obj_ptr' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'LLaMa_FineTune_obj_ptr' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'LLaMa_FineTune_obj_ptr' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | public class LLaMa_FineTune: FineTune {
[36/56] Compiling llmfarm_core Tokenizer.swift
[37/56] Compiling llmfarm_core TokenizerConfig.swift
[38/56] Compiling llmfarm_core GPT2.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
[39/56] Compiling llmfarm_core GPTNeox.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
[40/56] Compiling llmfarm_core AI.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:362:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelSampleParams' may have shared mutable state; this is an error in the Swift 6 language mode
344 | }
345 |
346 | public struct ModelSampleParams {
| `- note: consider making struct 'ModelSampleParams' conform to the 'Sendable' protocol
347 | public var n_batch: Int32
348 | public var temp: Float
:
360 | public var penalize_nl: Bool
361 |
362 | public static let `default` = ModelSampleParams(
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelSampleParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
363 | n_batch: 512,
364 | temp: 0.9,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:74:36: warning: capture of 'completion' with non-sendable type '((String) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 | flagResponding = true
73 | aiQueue.async {
74 | guard let completion = completion else { return }
| |- warning: capture of 'completion' with non-sendable type '((String) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
75 |
76 |
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:77:16: warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
75 |
76 |
77 | if self.model == nil{
| `- warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
78 | DispatchQueue.main.async {
79 | self.flagResponding = false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
98 | }
99 | return false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:79:21: warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
77 | if self.model == nil{
78 | DispatchQueue.main.async {
79 | self.flagResponding = false
| `- warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
80 | completion("[Error] Load Model")
81 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:80:21: warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
78 | DispatchQueue.main.async {
79 | self.flagResponding = false
80 | completion("[Error] Load Model")
| |- warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
81 | }
82 | return
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:89:35: warning: capture of 'self' with non-sendable type 'AI' in an isolated closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
87 | do{
88 | try ExceptionCather.catchException {
89 | output = try? self.model.predict(input, { str, time in
| `- warning: capture of 'self' with non-sendable type 'AI' in an isolated closure; this is an error in the Swift 6 language mode
90 | if self.flagExit {
91 | // Reset flag
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in an isolated closure; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
98 | }
99 | return false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:90:28: warning: capture of 'self' with non-sendable type 'AI' in an isolated closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
88 | try ExceptionCather.catchException {
89 | output = try? self.model.predict(input, { str, time in
90 | if self.flagExit {
| `- warning: capture of 'self' with non-sendable type 'AI' in an isolated closure; this is an error in the Swift 6 language mode
91 | // Reset flag
92 | self.flagExit = false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in an isolated closure; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
98 | }
99 | return false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
98 | }
99 | return false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:105:21: warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
103 | print(error)
104 | DispatchQueue.main.async {
105 | self.flagResponding = false
| `- warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
106 | completion("[Error] \(error)")
107 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:106:21: warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 | DispatchQueue.main.async {
105 | self.flagResponding = false
106 | completion("[Error] \(error)")
| |- warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
107 | }
108 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:110:17: warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
108 | }
109 | DispatchQueue.main.async {
110 | self.flagResponding = false
| `- warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
111 | completion(output ?? "[Error]")
112 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:111:17: warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
109 | DispatchQueue.main.async {
110 | self.flagResponding = false
111 | completion(output ?? "[Error]")
| |- warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
112 | }
113 |
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:111:28: warning: reference to captured var 'output' in concurrently-executing code; this is an error in the Swift 6 language mode
109 | DispatchQueue.main.async {
110 | self.flagResponding = false
111 | completion(output ?? "[Error]")
| `- warning: reference to captured var 'output' in concurrently-executing code; this is an error in the Swift 6 language mode
112 | }
113 |
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:105:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
103 | print(error)
104 | DispatchQueue.main.async {
105 | self.flagResponding = false
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
106 | completion("[Error] \(error)")
107 | }
108 | }
109 | DispatchQueue.main.async {
| `- note: access can happen concurrently
110 | self.flagResponding = false
111 | completion(output ?? "[Error]")
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:106:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
104 | DispatchQueue.main.async {
105 | self.flagResponding = false
106 | completion("[Error] \(error)")
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
107 | }
108 | }
109 | DispatchQueue.main.async {
| `- note: access can happen concurrently
110 | self.flagResponding = false
111 | completion(output ?? "[Error]")
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: sending 'tokenCallback' risks causing data races; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: sending 'tokenCallback' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'tokenCallback' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
98 | }
99 | return false
[41/56] Compiling llmfarm_core ArrayExt.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:362:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelSampleParams' may have shared mutable state; this is an error in the Swift 6 language mode
344 | }
345 |
346 | public struct ModelSampleParams {
| `- note: consider making struct 'ModelSampleParams' conform to the 'Sendable' protocol
347 | public var n_batch: Int32
348 | public var temp: Float
:
360 | public var penalize_nl: Bool
361 |
362 | public static let `default` = ModelSampleParams(
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelSampleParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
363 | n_batch: 512,
364 | temp: 0.9,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:74:36: warning: capture of 'completion' with non-sendable type '((String) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 | flagResponding = true
73 | aiQueue.async {
74 | guard let completion = completion else { return }
| |- warning: capture of 'completion' with non-sendable type '((String) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
75 |
76 |
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:77:16: warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
75 |
76 |
77 | if self.model == nil{
| `- warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
78 | DispatchQueue.main.async {
79 | self.flagResponding = false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
98 | }
99 | return false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:79:21: warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
77 | if self.model == nil{
78 | DispatchQueue.main.async {
79 | self.flagResponding = false
| `- warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
80 | completion("[Error] Load Model")
81 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:80:21: warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
78 | DispatchQueue.main.async {
79 | self.flagResponding = false
80 | completion("[Error] Load Model")
| |- warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
81 | }
82 | return
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:89:35: warning: capture of 'self' with non-sendable type 'AI' in an isolated closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
87 | do{
88 | try ExceptionCather.catchException {
89 | output = try? self.model.predict(input, { str, time in
| `- warning: capture of 'self' with non-sendable type 'AI' in an isolated closure; this is an error in the Swift 6 language mode
90 | if self.flagExit {
91 | // Reset flag
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in an isolated closure; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
98 | }
99 | return false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:90:28: warning: capture of 'self' with non-sendable type 'AI' in an isolated closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
88 | try ExceptionCather.catchException {
89 | output = try? self.model.predict(input, { str, time in
90 | if self.flagExit {
| `- warning: capture of 'self' with non-sendable type 'AI' in an isolated closure; this is an error in the Swift 6 language mode
91 | // Reset flag
92 | self.flagExit = false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in an isolated closure; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
98 | }
99 | return false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
98 | }
99 | return false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:105:21: warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
103 | print(error)
104 | DispatchQueue.main.async {
105 | self.flagResponding = false
| `- warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
106 | completion("[Error] \(error)")
107 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:106:21: warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 | DispatchQueue.main.async {
105 | self.flagResponding = false
106 | completion("[Error] \(error)")
| |- warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
107 | }
108 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:110:17: warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
108 | }
109 | DispatchQueue.main.async {
110 | self.flagResponding = false
| `- warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
111 | completion(output ?? "[Error]")
112 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:111:17: warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
109 | DispatchQueue.main.async {
110 | self.flagResponding = false
111 | completion(output ?? "[Error]")
| |- warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
112 | }
113 |
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:111:28: warning: reference to captured var 'output' in concurrently-executing code; this is an error in the Swift 6 language mode
109 | DispatchQueue.main.async {
110 | self.flagResponding = false
111 | completion(output ?? "[Error]")
| `- warning: reference to captured var 'output' in concurrently-executing code; this is an error in the Swift 6 language mode
112 | }
113 |
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:105:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
103 | print(error)
104 | DispatchQueue.main.async {
105 | self.flagResponding = false
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
106 | completion("[Error] \(error)")
107 | }
108 | }
109 | DispatchQueue.main.async {
| `- note: access can happen concurrently
110 | self.flagResponding = false
111 | completion(output ?? "[Error]")
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:106:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
104 | DispatchQueue.main.async {
105 | self.flagResponding = false
106 | completion("[Error] \(error)")
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
107 | }
108 | }
109 | DispatchQueue.main.async {
| `- note: access can happen concurrently
110 | self.flagResponding = false
111 | completion(output ?? "[Error]")
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: sending 'tokenCallback' risks causing data races; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: sending 'tokenCallback' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'tokenCallback' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
98 | }
99 | return false
[42/56] Compiling llmfarm_core ByteEncoder.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:362:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelSampleParams' may have shared mutable state; this is an error in the Swift 6 language mode
344 | }
345 |
346 | public struct ModelSampleParams {
| `- note: consider making struct 'ModelSampleParams' conform to the 'Sendable' protocol
347 | public var n_batch: Int32
348 | public var temp: Float
:
360 | public var penalize_nl: Bool
361 |
362 | public static let `default` = ModelSampleParams(
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelSampleParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
363 | n_batch: 512,
364 | temp: 0.9,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:74:36: warning: capture of 'completion' with non-sendable type '((String) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 | flagResponding = true
73 | aiQueue.async {
74 | guard let completion = completion else { return }
| |- warning: capture of 'completion' with non-sendable type '((String) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
75 |
76 |
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:77:16: warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
75 |
76 |
77 | if self.model == nil{
| `- warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
78 | DispatchQueue.main.async {
79 | self.flagResponding = false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
98 | }
99 | return false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:79:21: warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
77 | if self.model == nil{
78 | DispatchQueue.main.async {
79 | self.flagResponding = false
| `- warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
80 | completion("[Error] Load Model")
81 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:80:21: warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
78 | DispatchQueue.main.async {
79 | self.flagResponding = false
80 | completion("[Error] Load Model")
| |- warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
81 | }
82 | return
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:89:35: warning: capture of 'self' with non-sendable type 'AI' in an isolated closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
87 | do{
88 | try ExceptionCather.catchException {
89 | output = try? self.model.predict(input, { str, time in
| `- warning: capture of 'self' with non-sendable type 'AI' in an isolated closure; this is an error in the Swift 6 language mode
90 | if self.flagExit {
91 | // Reset flag
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in an isolated closure; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
98 | }
99 | return false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:90:28: warning: capture of 'self' with non-sendable type 'AI' in an isolated closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
88 | try ExceptionCather.catchException {
89 | output = try? self.model.predict(input, { str, time in
90 | if self.flagExit {
| `- warning: capture of 'self' with non-sendable type 'AI' in an isolated closure; this is an error in the Swift 6 language mode
91 | // Reset flag
92 | self.flagExit = false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in an isolated closure; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
98 | }
99 | return false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: capture of 'tokenCallback' with non-sendable type '((String, Double) -> ())?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
98 | }
99 | return false
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:105:21: warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
103 | print(error)
104 | DispatchQueue.main.async {
105 | self.flagResponding = false
| `- warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
106 | completion("[Error] \(error)")
107 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:106:21: warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 | DispatchQueue.main.async {
105 | self.flagResponding = false
106 | completion("[Error] \(error)")
| |- warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
107 | }
108 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:110:17: warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 | }
19 |
20 | public class AI {
| `- note: class 'AI' does not conform to the 'Sendable' protocol
21 |
22 | var aiQueue = DispatchQueue(label: "LLMFarm-Main", qos: .userInitiated, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
:
108 | }
109 | DispatchQueue.main.async {
110 | self.flagResponding = false
| `- warning: capture of 'self' with non-sendable type 'AI' in a `@Sendable` closure; this is an error in the Swift 6 language mode
111 | completion(output ?? "[Error]")
112 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:111:17: warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
109 | DispatchQueue.main.async {
110 | self.flagResponding = false
111 | completion(output ?? "[Error]")
| |- warning: capture of 'completion' with non-sendable type '(String) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
112 | }
113 |
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:111:28: warning: reference to captured var 'output' in concurrently-executing code; this is an error in the Swift 6 language mode
109 | DispatchQueue.main.async {
110 | self.flagResponding = false
111 | completion(output ?? "[Error]")
| `- warning: reference to captured var 'output' in concurrently-executing code; this is an error in the Swift 6 language mode
112 | }
113 |
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:105:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
103 | print(error)
104 | DispatchQueue.main.async {
105 | self.flagResponding = false
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
106 | completion("[Error] \(error)")
107 | }
108 | }
109 | DispatchQueue.main.async {
| `- note: access can happen concurrently
110 | self.flagResponding = false
111 | completion(output ?? "[Error]")
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:106:21: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
104 | DispatchQueue.main.async {
105 | self.flagResponding = false
106 | completion("[Error] \(error)")
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
107 | }
108 | }
109 | DispatchQueue.main.async {
| `- note: access can happen concurrently
110 | self.flagResponding = false
111 | completion(output ?? "[Error]")
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:97:29: warning: sending 'tokenCallback' risks causing data races; this is an error in the Swift 6 language mode
95 | }
96 | DispatchQueue.main.async {
97 | tokenCallback?(str, time)
| |- warning: sending 'tokenCallback' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'tokenCallback' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
98 | }
99 | return false
[43/56] Compiling llmfarm_core LLMBase.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:362:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelSampleParams' may have shared mutable state; this is an error in the Swift 6 language mode
344 | }
345 |
346 | public struct ModelSampleParams {
| `- note: consider making struct 'ModelSampleParams' conform to the 'Sendable' protocol
347 | public var n_batch: Int32
348 | public var temp: Float
:
360 | public var penalize_nl: Bool
361 |
362 | public static let `default` = ModelSampleParams(
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelSampleParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
363 | n_batch: 512,
364 | temp: 0.9,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLMBase.swift:217:17: warning: variable 'class_name' was never mutated; consider changing to 'let' constant
215 | res_token = llama_dadbed9_sample_token_greedy(ctx, &candidates_p)
216 | } else {
217 | var class_name = String(describing: self)
| `- warning: variable 'class_name' was never mutated; consider changing to 'let' constant
218 | if(mirostat == 1) {
219 | var mirostat_mu: Float = 2.0 * mirostat_tau
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMA_FineTune.swift:10:5: warning: var 'aaa' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
8 | import llmfarm_core_cpp
9 |
10 | var aaa = 1
| |- warning: var 'aaa' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'aaa' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'aaa' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 | var LLaMa_FineTune_obj_ptr:UnsafeMutableRawPointer? = nil
12 |
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMA_FineTune.swift:11:5: warning: var 'LLaMa_FineTune_obj_ptr' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
9 |
10 | var aaa = 1
11 | var LLaMa_FineTune_obj_ptr:UnsafeMutableRawPointer? = nil
| |- warning: var 'LLaMa_FineTune_obj_ptr' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'LLaMa_FineTune_obj_ptr' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'LLaMa_FineTune_obj_ptr' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | public class LLaMa_FineTune: FineTune {
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMA_FineTune.swift:39:21: warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
37 | self.retain_new_self_ptr()
38 | try ExceptionCather.catchException {
39 | let result = run_finetune(Int32(args.count), &cargs,
| `- warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
40 | { c_str in
41 | let LLaMa_FineTune_obj = Unmanaged<LLaMa_FineTune>.fromOpaque(LLaMa_FineTune_obj_ptr!).takeRetainedValue()
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMA_FineTune.swift:62:13: warning: variable 'args' was never mutated; consider changing to 'let' constant
60 |
61 | public func export_lora(_ progressCallback: ((Double) -> ())?) throws{
62 | var args = ["progr_name", "-m", self.model_base, "-o", self.export_model,
| `- warning: variable 'args' was never mutated; consider changing to 'let' constant
63 | "-t", String(self.threads), "-s",self.lora_out, String(self.export_scale)]
64 | do{
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMA_FineTune.swift:71:21: warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
69 | self.retain_new_self_ptr()
70 | try ExceptionCather.catchException {
71 | let result = export_lora_main(Int32(args.count), &cargs,
| `- warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
72 | { progress in
73 | let LLaMa_FineTune_obj = Unmanaged<LLaMa_FineTune>.fromOpaque(LLaMa_FineTune_obj_ptr!).takeRetainedValue()
[44/56] Compiling llmfarm_core LLaMA_FineTune.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:362:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelSampleParams' may have shared mutable state; this is an error in the Swift 6 language mode
344 | }
345 |
346 | public struct ModelSampleParams {
| `- note: consider making struct 'ModelSampleParams' conform to the 'Sendable' protocol
347 | public var n_batch: Int32
348 | public var temp: Float
:
360 | public var penalize_nl: Bool
361 |
362 | public static let `default` = ModelSampleParams(
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelSampleParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
363 | n_batch: 512,
364 | temp: 0.9,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLMBase.swift:217:17: warning: variable 'class_name' was never mutated; consider changing to 'let' constant
215 | res_token = llama_dadbed9_sample_token_greedy(ctx, &candidates_p)
216 | } else {
217 | var class_name = String(describing: self)
| `- warning: variable 'class_name' was never mutated; consider changing to 'let' constant
218 | if(mirostat == 1) {
219 | var mirostat_mu: Float = 2.0 * mirostat_tau
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMA_FineTune.swift:10:5: warning: var 'aaa' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
8 | import llmfarm_core_cpp
9 |
10 | var aaa = 1
| |- warning: var 'aaa' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'aaa' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'aaa' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 | var LLaMa_FineTune_obj_ptr:UnsafeMutableRawPointer? = nil
12 |
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMA_FineTune.swift:11:5: warning: var 'LLaMa_FineTune_obj_ptr' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
9 |
10 | var aaa = 1
11 | var LLaMa_FineTune_obj_ptr:UnsafeMutableRawPointer? = nil
| |- warning: var 'LLaMa_FineTune_obj_ptr' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'LLaMa_FineTune_obj_ptr' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'LLaMa_FineTune_obj_ptr' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | public class LLaMa_FineTune: FineTune {
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMA_FineTune.swift:39:21: warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
37 | self.retain_new_self_ptr()
38 | try ExceptionCather.catchException {
39 | let result = run_finetune(Int32(args.count), &cargs,
| `- warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
40 | { c_str in
41 | let LLaMa_FineTune_obj = Unmanaged<LLaMa_FineTune>.fromOpaque(LLaMa_FineTune_obj_ptr!).takeRetainedValue()
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMA_FineTune.swift:62:13: warning: variable 'args' was never mutated; consider changing to 'let' constant
60 |
61 | public func export_lora(_ progressCallback: ((Double) -> ())?) throws{
62 | var args = ["progr_name", "-m", self.model_base, "-o", self.export_model,
| `- warning: variable 'args' was never mutated; consider changing to 'let' constant
63 | "-t", String(self.threads), "-s",self.lora_out, String(self.export_scale)]
64 | do{
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMA_FineTune.swift:71:21: warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
69 | self.retain_new_self_ptr()
70 | try ExceptionCather.catchException {
71 | let result = export_lora_main(Int32(args.count), &cargs,
| `- warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
72 | { progress in
73 | let LLaMa_FineTune_obj = Unmanaged<LLaMa_FineTune>.fromOpaque(LLaMa_FineTune_obj_ptr!).takeRetainedValue()
[45/56] Compiling llmfarm_core Extensions.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/Extensions.swift:34:1: warning: extension declares a conformance of imported type 'String' to imported protocol 'Error'; this will not behave correctly if the owners of 'Swift' introduce this conformance in the future
32 | }
33 |
34 | extension String: Error {
| |- warning: extension declares a conformance of imported type 'String' to imported protocol 'Error'; this will not behave correctly if the owners of 'Swift' introduce this conformance in the future
| `- note: add '@retroactive' to silence this warning
35 | }
36 |
[46/56] Compiling llmfarm_core FineTune.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/Extensions.swift:34:1: warning: extension declares a conformance of imported type 'String' to imported protocol 'Error'; this will not behave correctly if the owners of 'Swift' introduce this conformance in the future
32 | }
33 |
34 | extension String: Error {
| |- warning: extension declares a conformance of imported type 'String' to imported protocol 'Error'; this will not behave correctly if the owners of 'Swift' introduce this conformance in the future
| `- note: add '@retroactive' to silence this warning
35 | }
36 |
[47/56] Compiling llmfarm_core Tasker.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/Tasker.swift:21:17: warning: capture of 'task' with non-sendable type '(Int) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 | group.enter()
20 | taskerQueue.async {
21 | task(i)
| |- warning: capture of 'task' with non-sendable type '(Int) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
22 | group.leave()
23 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/Tasker.swift:37:21: warning: capture of 'task' with non-sendable type '(Int) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
35 | let g = i * grouping
36 | for j in 0 ..< grouping {
37 | task(g + j)
| |- warning: capture of 'task' with non-sendable type '(Int) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
38 | }
39 | group.leave()
[48/56] Compiling llmfarm_core TokenizeUtils.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/Tasker.swift:21:17: warning: capture of 'task' with non-sendable type '(Int) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 | group.enter()
20 | taskerQueue.async {
21 | task(i)
| |- warning: capture of 'task' with non-sendable type '(Int) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
22 | group.leave()
23 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/Tasker.swift:37:21: warning: capture of 'task' with non-sendable type '(Int) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
35 | let g = i * grouping
36 | for j in 0 ..< grouping {
37 | task(g + j)
| |- warning: capture of 'task' with non-sendable type '(Int) -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
38 | }
39 | group.leave()
[49/56] Compiling llmfarm_core Utils.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
[50/56] Compiling llmfarm_core RWKV.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
[51/56] Compiling llmfarm_core Replit.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
[52/56] Compiling llmfarm_core Starcoder.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
[53/56] Compiling llmfarm_core LLaMa.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMa.swift:26:13: warning: variable 'progress_callback_user_data' was never used; consider replacing with '_' or removing it
24 | model_params.use_mlock = contextParams.useMlock
25 | model_params.use_mmap = contextParams.useMMap
26 | var progress_callback_user_data:Int32 = 0
| `- warning: variable 'progress_callback_user_data' was never used; consider replacing with '_' or removing it
27 | // model_params.progress_callback_user_data = progress_callback_user_data
28 | // context_params.rope_freq_base = 10000.0
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMa.swift:89:12: warning: 'llama_eval' is deprecated: use llama_decode() instead
87 | public override func llm_eval(inputBatch:[ModelToken]) throws -> Bool{
88 | var mutable_inputBatch = inputBatch
89 | if llama_eval(self.context, mutable_inputBatch.mutPtr, Int32(inputBatch.count), min(self.contextParams.context, self.nPast)) != 0 {
| `- warning: 'llama_eval' is deprecated: use llama_decode() instead
90 | return false
91 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMa_dadbed9.swift:35:24: warning: 'llama_dadbed9_init_from_file' is deprecated: please use llama_dadbed9_load_model_from_file combined with llama_dadbed9_new_context_with_model instead
33 | params.n_gpu_layers = 0
34 | }
35 | self.context = llama_dadbed9_init_from_file(path, params)
| `- warning: 'llama_dadbed9_init_from_file' is deprecated: please use llama_dadbed9_load_model_from_file combined with llama_dadbed9_new_context_with_model instead
36 | if self.context == nil {
37 | return false
[54/56] Compiling llmfarm_core LLaMa_dadbed9.swift
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/AI.swift:319:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
287 | }
288 |
289 | public struct ModelAndContextParams {
| `- note: consider making struct 'ModelAndContextParams' conform to the 'Sendable' protocol
290 | public var model_inference = ModelInference.LLama_gguf
291 |
:
317 | public var reverse_prompt: [String] = []
318 |
319 | public static let `default` = ModelAndContextParams()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'ModelAndContextParams' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'default' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
320 |
321 | public init( context: Int32 = 2048 /*512*/,
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMa.swift:26:13: warning: variable 'progress_callback_user_data' was never used; consider replacing with '_' or removing it
24 | model_params.use_mlock = contextParams.useMlock
25 | model_params.use_mmap = contextParams.useMMap
26 | var progress_callback_user_data:Int32 = 0
| `- warning: variable 'progress_callback_user_data' was never used; consider replacing with '_' or removing it
27 | // model_params.progress_callback_user_data = progress_callback_user_data
28 | // context_params.rope_freq_base = 10000.0
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMa.swift:89:12: warning: 'llama_eval' is deprecated: use llama_decode() instead
87 | public override func llm_eval(inputBatch:[ModelToken]) throws -> Bool{
88 | var mutable_inputBatch = inputBatch
89 | if llama_eval(self.context, mutable_inputBatch.mutPtr, Int32(inputBatch.count), min(self.contextParams.context, self.nPast)) != 0 {
| `- warning: 'llama_eval' is deprecated: use llama_decode() instead
90 | return false
91 | }
/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core/LLaMa_dadbed9.swift:35:24: warning: 'llama_dadbed9_init_from_file' is deprecated: please use llama_dadbed9_load_model_from_file combined with llama_dadbed9_new_context_with_model instead
33 | params.n_gpu_layers = 0
34 | }
35 | self.context = llama_dadbed9_init_from_file(path, params)
| `- warning: 'llama_dadbed9_init_from_file' is deprecated: please use llama_dadbed9_load_model_from_file combined with llama_dadbed9_new_context_with_model instead
36 | if self.context == nil {
37 | return false
[55/56] Compiling llmfarm_core ComputeGraph.swift
[56/56] Compiling llmfarm_core Math.swift
Build complete! (32.36s)
Build complete.
{
"cxx_language_standard" : "c++20",
"dependencies" : [
],
"manifest_display_name" : "llmfarm_core",
"name" : "llmfarm_core",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "11.0"
},
{
"name" : "ios",
"version" : "15.0"
}
],
"products" : [
{
"name" : "llmfarm_core",
"targets" : [
"llmfarm_core"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "llmfarm_core_cpp",
"module_type" : "ClangTarget",
"name" : "llmfarm_core_cpp",
"path" : "Sources/llmfarm_core_cpp",
"product_memberships" : [
"llmfarm_core"
],
"resources" : [
{
"path" : "/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core_cpp/metal",
"rule" : {
"copy" : {
}
}
},
{
"path" : "/Users/admin/builder/spi-builder-workspace/Sources/llmfarm_core_cpp/tokenizers",
"rule" : {
"copy" : {
}
}
}
],
"sources" : [
"exception_helper.mm",
"exception_helper_objc.mm",
"finetune/export-lora.mm",
"finetune/finetune.mm",
"ggml/common.mm",
"ggml/ggml-alloc.m",
"ggml/ggml-alloc_dadbed9.m",
"ggml/ggml-backend.m",
"ggml/ggml-metal.m",
"ggml/ggml-metal_dadbed9.m",
"ggml/ggml-quants.m",
"ggml/ggml.m",
"ggml/ggml_d925ed-alloc.m",
"ggml/ggml_d925ed-metal.m",
"ggml/ggml_d925ed.m",
"ggml/ggml_dadbed9.m",
"ggml/k_quants_dadbed9.m",
"ggml/train.mm",
"gpt2/gpt2.mm",
"gpt_helpers.mm",
"gpt_spm.mm",
"gptneox/gptneox.mm",
"grammar-parser.mm",
"llama/llama.mm",
"llama/llama_dadbed9.mm",
"package_helper.m",
"replit/replit.mm",
"rwkv/rwkv.mm",
"starcoder/starcoder.mm"
],
"type" : "library"
},
{
"c99name" : "llmfarm_core",
"module_type" : "SwiftTarget",
"name" : "llmfarm_core",
"path" : "Sources/llmfarm_core",
"product_memberships" : [
"llmfarm_core"
],
"sources" : [
"AI.swift",
"ArrayExt.swift",
"ByteEncoder.swift",
"Extensions.swift",
"FineTune.swift",
"GPT2.swift",
"GPTNeox.swift",
"LLMBase.swift",
"LLaMA_FineTune.swift",
"LLaMa.swift",
"LLaMa_dadbed9.swift",
"Math/ComputeGraph.swift",
"Math/Math.swift",
"Math/Utils.swift",
"RWKV.swift",
"Replit.swift",
"Starcoder.swift",
"Tasker.swift",
"TokenizeUtils.swift",
"Tokenizer.swift",
"TokenizerConfig.swift"
],
"target_dependencies" : [
"llmfarm_core_cpp"
],
"type" : "library"
}
],
"tools_version" : "5.6"
}
Done.