Build Information
Successful build of mlx-libraries, reference main (2cceb8
), with Swift 6.0 for macOS (SPM) on 25 Jun 2025 01:36:53 UTC.
Swift 6 data race errors: 0
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64
Build Log
794 | // Launch a Task to perform iteration asynchronously.
795 | let task = Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
796 | var start = Date.timeIntervalSinceReferenceDate
797 | var promptTime: TimeInterval = 0
:
845 |
846 | let info = GenerateCompletionInfo(
847 | promptTokenCount: input.text.tokens.size,
| `- note: closure captures 'input' which is accessible to code in the current task
848 | generationTokenCount: tokenCount,
849 | promptTime: promptTime,
[428/446] Compiling MLXLMCommon AbstractModelRegistry.swift
[429/446] Compiling MLXLMCommon ModelTypeRegistry.swift
[430/446] Compiling MLXLMCommon ProcessorTypeRegistry.swift
[431/446] Compiling MLXLMCommon Load.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:65:19: warning: non-sendable type 'R' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
61 | /// Perform an action on the ``ModelContext``. Callers _must_ eval any `MLXArray` before returning as
62 | /// `MLXArray` is not `Sendable`.
63 | public func perform<R>(_ action: @Sendable (ModelContext) async throws -> R) async rethrows -> R
| `- note: consider making generic parameter 'R' conform to the 'Sendable' protocol
64 | {
65 | try await action(context)
| `- warning: non-sendable type 'R' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
66 | }
67 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:74:19: warning: non-sendable type 'R' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
69 | /// Callers _must_ eval any `MLXArray` before returning as
70 | /// `MLXArray` is not `Sendable`.
71 | public func perform<V, R>(
| `- note: consider making generic parameter 'R' conform to the 'Sendable' protocol
72 | values: V, _ action: @Sendable (ModelContext, V) async throws -> R
73 | ) async rethrows -> R {
74 | try await action(context, values)
| `- warning: non-sendable type 'R' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
75 | }
76 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:65:19: warning: sending 'self'-isolated value of type 'ModelContext' with later accesses to nonisolated context risks causing data races; this is an error in the Swift 6 language mode
63 | public func perform<R>(_ action: @Sendable (ModelContext) async throws -> R) async rethrows -> R
64 | {
65 | try await action(context)
| `- warning: sending 'self'-isolated value of type 'ModelContext' with later accesses to nonisolated context risks causing data races; this is an error in the Swift 6 language mode
66 | }
67 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:74:19: warning: sending 'self'-isolated value of type 'ModelContext' with later accesses to nonisolated context risks causing data races; this is an error in the Swift 6 language mode
72 | values: V, _ action: @Sendable (ModelContext, V) async throws -> R
73 | ) async rethrows -> R {
74 | try await action(context, values)
| `- warning: sending 'self'-isolated value of type 'ModelContext' with later accesses to nonisolated context risks causing data races; this is an error in the Swift 6 language mode
75 | }
76 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:74:19: warning: sending 'values' risks causing data races; this is an error in the Swift 6 language mode
72 | values: V, _ action: @Sendable (ModelContext, V) async throws -> R
73 | ) async rethrows -> R {
74 | try await action(context, values)
| |- warning: sending 'values' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'values' to nonisolated callee risks causing data races between nonisolated and 'self'-isolated uses
75 | }
76 |
[432/446] Compiling MLXLMCommon ModelConfiguration.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:65:19: warning: non-sendable type 'R' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
61 | /// Perform an action on the ``ModelContext``. Callers _must_ eval any `MLXArray` before returning as
62 | /// `MLXArray` is not `Sendable`.
63 | public func perform<R>(_ action: @Sendable (ModelContext) async throws -> R) async rethrows -> R
| `- note: consider making generic parameter 'R' conform to the 'Sendable' protocol
64 | {
65 | try await action(context)
| `- warning: non-sendable type 'R' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
66 | }
67 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:74:19: warning: non-sendable type 'R' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
69 | /// Callers _must_ eval any `MLXArray` before returning as
70 | /// `MLXArray` is not `Sendable`.
71 | public func perform<V, R>(
| `- note: consider making generic parameter 'R' conform to the 'Sendable' protocol
72 | values: V, _ action: @Sendable (ModelContext, V) async throws -> R
73 | ) async rethrows -> R {
74 | try await action(context, values)
| `- warning: non-sendable type 'R' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
75 | }
76 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:65:19: warning: sending 'self'-isolated value of type 'ModelContext' with later accesses to nonisolated context risks causing data races; this is an error in the Swift 6 language mode
63 | public func perform<R>(_ action: @Sendable (ModelContext) async throws -> R) async rethrows -> R
64 | {
65 | try await action(context)
| `- warning: sending 'self'-isolated value of type 'ModelContext' with later accesses to nonisolated context risks causing data races; this is an error in the Swift 6 language mode
66 | }
67 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:74:19: warning: sending 'self'-isolated value of type 'ModelContext' with later accesses to nonisolated context risks causing data races; this is an error in the Swift 6 language mode
72 | values: V, _ action: @Sendable (ModelContext, V) async throws -> R
73 | ) async rethrows -> R {
74 | try await action(context, values)
| `- warning: sending 'self'-isolated value of type 'ModelContext' with later accesses to nonisolated context risks causing data races; this is an error in the Swift 6 language mode
75 | }
76 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:74:19: warning: sending 'values' risks causing data races; this is an error in the Swift 6 language mode
72 | values: V, _ action: @Sendable (ModelContext, V) async throws -> R
73 | ) async rethrows -> R {
74 | try await action(context, values)
| |- warning: sending 'values' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'values' to nonisolated callee risks causing data races between nonisolated and 'self'-isolated uses
75 | }
76 |
[433/446] Compiling MLXLMCommon ModelContainer.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:65:19: warning: non-sendable type 'R' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
61 | /// Perform an action on the ``ModelContext``. Callers _must_ eval any `MLXArray` before returning as
62 | /// `MLXArray` is not `Sendable`.
63 | public func perform<R>(_ action: @Sendable (ModelContext) async throws -> R) async rethrows -> R
| `- note: consider making generic parameter 'R' conform to the 'Sendable' protocol
64 | {
65 | try await action(context)
| `- warning: non-sendable type 'R' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
66 | }
67 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:74:19: warning: non-sendable type 'R' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
69 | /// Callers _must_ eval any `MLXArray` before returning as
70 | /// `MLXArray` is not `Sendable`.
71 | public func perform<V, R>(
| `- note: consider making generic parameter 'R' conform to the 'Sendable' protocol
72 | values: V, _ action: @Sendable (ModelContext, V) async throws -> R
73 | ) async rethrows -> R {
74 | try await action(context, values)
| `- warning: non-sendable type 'R' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
75 | }
76 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:65:19: warning: sending 'self'-isolated value of type 'ModelContext' with later accesses to nonisolated context risks causing data races; this is an error in the Swift 6 language mode
63 | public func perform<R>(_ action: @Sendable (ModelContext) async throws -> R) async rethrows -> R
64 | {
65 | try await action(context)
| `- warning: sending 'self'-isolated value of type 'ModelContext' with later accesses to nonisolated context risks causing data races; this is an error in the Swift 6 language mode
66 | }
67 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:74:19: warning: sending 'self'-isolated value of type 'ModelContext' with later accesses to nonisolated context risks causing data races; this is an error in the Swift 6 language mode
72 | values: V, _ action: @Sendable (ModelContext, V) async throws -> R
73 | ) async rethrows -> R {
74 | try await action(context, values)
| `- warning: sending 'self'-isolated value of type 'ModelContext' with later accesses to nonisolated context risks causing data races; this is an error in the Swift 6 language mode
75 | }
76 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelContainer.swift:74:19: warning: sending 'values' risks causing data races; this is an error in the Swift 6 language mode
72 | values: V, _ action: @Sendable (ModelContext, V) async throws -> R
73 | ) async rethrows -> R {
74 | try await action(context, values)
| |- warning: sending 'values' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'values' to nonisolated callee risks causing data races between nonisolated and 'self'-isolated uses
75 | }
76 |
[434/446] Compiling MLXLMCommon Streamlined.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:160:58: warning: initializer 'init(width:height:)' cannot be used in a default argument value because 'CoreGraphics' was not imported by this file; this is an error in the Swift 6 language mode
158 | _ model: ModelContainer, instructions: String? = nil,
159 | generateParameters: GenerateParameters = .init(),
160 | processing: UserInput.Processing = .init(resize: CGSize(width: 512, height: 512))
| |- warning: initializer 'init(width:height:)' cannot be used in a default argument value because 'CoreGraphics' was not imported by this file; this is an error in the Swift 6 language mode
| `- note: The missing import of module 'CoreGraphics' will be added implicitly
161 | ) {
162 | self.generator = .init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:177:58: warning: initializer 'init(width:height:)' cannot be used in a default argument value because 'CoreGraphics' was not imported by this file; this is an error in the Swift 6 language mode
175 | _ model: ModelContext, instructions: String? = nil,
176 | generateParameters: GenerateParameters = .init(),
177 | processing: UserInput.Processing = .init(resize: CGSize(width: 512, height: 512))
| |- warning: initializer 'init(width:height:)' cannot be used in a default argument value because 'CoreGraphics' was not imported by this file; this is an error in the Swift 6 language mode
| `- note: The missing import of module 'CoreGraphics' will be added implicitly
178 | ) {
179 | self.generator = .init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:78:27: warning: capture of 'generate(context:)' with non-sendable type '(ModelContext) async throws -> String' in a `@Sendable` closure; this is an error in the Swift 6 language mode
76 | case .container(let container):
77 | return try await container.perform { context in
78 | try await generate(context: context)
| |- warning: capture of 'generate(context:)' with non-sendable type '(ModelContext) async throws -> 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'
79 | }
80 | case .context(let context):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:53:14: warning: concurrently-executed local function 'generate(context:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
51 |
52 | func generate() async throws -> String {
53 | func generate(context: ModelContext) async throws -> String {
| `- warning: concurrently-executed local function 'generate(context:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
54 | // prepare the input -- first the structured messages,
55 | // next the tokens
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:122:31: warning: capture of 'stream(context:continuation:)' with non-sendable type '(ModelContext, AsyncThrowingStream<String, any Error>.Continuation) async -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 | case .container(let container):
121 | await container.perform { context in
122 | await stream(context: context, continuation: continuation)
| |- warning: capture of 'stream(context:continuation:)' with non-sendable type '(ModelContext, AsyncThrowingStream<String, any Error>.Continuation) async -> ()' 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'
123 | }
124 | case .context(let context):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:86:14: warning: concurrently-executed local function 'stream(context:continuation:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
84 |
85 | func stream() -> AsyncThrowingStream<String, Error> {
86 | func stream(
| `- warning: concurrently-executed local function 'stream(context:continuation:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
87 | context: ModelContext,
88 | continuation: AsyncThrowingStream<String, Error>.Continuation
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:50:26: warning: immutable value 'string' was never used; consider replacing with '_' or removing it
48 | public func asInts() -> [Int]? {
49 | switch self {
50 | case .string(let string): nil
| `- warning: immutable value 'string' was never used; consider replacing with '_' or removing it
51 | case .int(let v): [v]
52 | case .float(let float): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:52:25: warning: immutable value 'float' was never used; consider replacing with '_' or removing it
50 | case .string(let string): nil
51 | case .int(let v): [v]
52 | case .float(let float): nil
| `- warning: immutable value 'float' was never used; consider replacing with '_' or removing it
53 | case .ints(let array): array
54 | case .floats(let array): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:54:26: warning: immutable value 'array' was never used; consider replacing with '_' or removing it
52 | case .float(let float): nil
53 | case .ints(let array): array
54 | case .floats(let array): nil
| `- warning: immutable value 'array' was never used; consider replacing with '_' or removing it
55 | }
56 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:63:26: warning: immutable value 'string' was never used; consider replacing with '_' or removing it
61 | public func asInt() -> Int? {
62 | switch self {
63 | case .string(let string): nil
| `- warning: immutable value 'string' was never used; consider replacing with '_' or removing it
64 | case .int(let v): v
65 | case .float(let float): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:65:25: warning: immutable value 'float' was never used; consider replacing with '_' or removing it
63 | case .string(let string): nil
64 | case .int(let v): v
65 | case .float(let float): nil
| `- warning: immutable value 'float' was never used; consider replacing with '_' or removing it
66 | case .ints(let array): array.count == 1 ? array[0] : nil
67 | case .floats(let array): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:67:26: warning: immutable value 'array' was never used; consider replacing with '_' or removing it
65 | case .float(let float): nil
66 | case .ints(let array): array.count == 1 ? array[0] : nil
67 | case .floats(let array): nil
| `- warning: immutable value 'array' was never used; consider replacing with '_' or removing it
68 | }
69 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:76:26: warning: immutable value 'string' was never used; consider replacing with '_' or removing it
74 | public func asFloats() -> [Float]? {
75 | switch self {
76 | case .string(let string): nil
| `- warning: immutable value 'string' was never used; consider replacing with '_' or removing it
77 | case .int(let v): [Float(v)]
78 | case .float(let float): [float]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:89:26: warning: immutable value 'string' was never used; consider replacing with '_' or removing it
87 | public func asFloat() -> Float? {
88 | switch self {
89 | case .string(let string): nil
| `- warning: immutable value 'string' was never used; consider replacing with '_' or removing it
90 | case .int(let v): Float(v)
91 | case .float(let float): float
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:118:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
116 |
117 | return AsyncThrowingStream { continuation in
118 | Task { [model, continuation] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
119 | switch model {
120 | case .container(let container):
121 | await container.perform { context in
122 | await stream(context: context, continuation: continuation)
| `- note: closure captures 'stream(context:continuation:)' which is accessible to code in the current task
123 | }
124 | case .context(let context):
[435/446] Compiling MLXLMCommon StringOrNumber.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:160:58: warning: initializer 'init(width:height:)' cannot be used in a default argument value because 'CoreGraphics' was not imported by this file; this is an error in the Swift 6 language mode
158 | _ model: ModelContainer, instructions: String? = nil,
159 | generateParameters: GenerateParameters = .init(),
160 | processing: UserInput.Processing = .init(resize: CGSize(width: 512, height: 512))
| |- warning: initializer 'init(width:height:)' cannot be used in a default argument value because 'CoreGraphics' was not imported by this file; this is an error in the Swift 6 language mode
| `- note: The missing import of module 'CoreGraphics' will be added implicitly
161 | ) {
162 | self.generator = .init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:177:58: warning: initializer 'init(width:height:)' cannot be used in a default argument value because 'CoreGraphics' was not imported by this file; this is an error in the Swift 6 language mode
175 | _ model: ModelContext, instructions: String? = nil,
176 | generateParameters: GenerateParameters = .init(),
177 | processing: UserInput.Processing = .init(resize: CGSize(width: 512, height: 512))
| |- warning: initializer 'init(width:height:)' cannot be used in a default argument value because 'CoreGraphics' was not imported by this file; this is an error in the Swift 6 language mode
| `- note: The missing import of module 'CoreGraphics' will be added implicitly
178 | ) {
179 | self.generator = .init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:78:27: warning: capture of 'generate(context:)' with non-sendable type '(ModelContext) async throws -> String' in a `@Sendable` closure; this is an error in the Swift 6 language mode
76 | case .container(let container):
77 | return try await container.perform { context in
78 | try await generate(context: context)
| |- warning: capture of 'generate(context:)' with non-sendable type '(ModelContext) async throws -> 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'
79 | }
80 | case .context(let context):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:53:14: warning: concurrently-executed local function 'generate(context:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
51 |
52 | func generate() async throws -> String {
53 | func generate(context: ModelContext) async throws -> String {
| `- warning: concurrently-executed local function 'generate(context:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
54 | // prepare the input -- first the structured messages,
55 | // next the tokens
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:122:31: warning: capture of 'stream(context:continuation:)' with non-sendable type '(ModelContext, AsyncThrowingStream<String, any Error>.Continuation) async -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 | case .container(let container):
121 | await container.perform { context in
122 | await stream(context: context, continuation: continuation)
| |- warning: capture of 'stream(context:continuation:)' with non-sendable type '(ModelContext, AsyncThrowingStream<String, any Error>.Continuation) async -> ()' 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'
123 | }
124 | case .context(let context):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:86:14: warning: concurrently-executed local function 'stream(context:continuation:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
84 |
85 | func stream() -> AsyncThrowingStream<String, Error> {
86 | func stream(
| `- warning: concurrently-executed local function 'stream(context:continuation:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
87 | context: ModelContext,
88 | continuation: AsyncThrowingStream<String, Error>.Continuation
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:50:26: warning: immutable value 'string' was never used; consider replacing with '_' or removing it
48 | public func asInts() -> [Int]? {
49 | switch self {
50 | case .string(let string): nil
| `- warning: immutable value 'string' was never used; consider replacing with '_' or removing it
51 | case .int(let v): [v]
52 | case .float(let float): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:52:25: warning: immutable value 'float' was never used; consider replacing with '_' or removing it
50 | case .string(let string): nil
51 | case .int(let v): [v]
52 | case .float(let float): nil
| `- warning: immutable value 'float' was never used; consider replacing with '_' or removing it
53 | case .ints(let array): array
54 | case .floats(let array): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:54:26: warning: immutable value 'array' was never used; consider replacing with '_' or removing it
52 | case .float(let float): nil
53 | case .ints(let array): array
54 | case .floats(let array): nil
| `- warning: immutable value 'array' was never used; consider replacing with '_' or removing it
55 | }
56 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:63:26: warning: immutable value 'string' was never used; consider replacing with '_' or removing it
61 | public func asInt() -> Int? {
62 | switch self {
63 | case .string(let string): nil
| `- warning: immutable value 'string' was never used; consider replacing with '_' or removing it
64 | case .int(let v): v
65 | case .float(let float): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:65:25: warning: immutable value 'float' was never used; consider replacing with '_' or removing it
63 | case .string(let string): nil
64 | case .int(let v): v
65 | case .float(let float): nil
| `- warning: immutable value 'float' was never used; consider replacing with '_' or removing it
66 | case .ints(let array): array.count == 1 ? array[0] : nil
67 | case .floats(let array): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:67:26: warning: immutable value 'array' was never used; consider replacing with '_' or removing it
65 | case .float(let float): nil
66 | case .ints(let array): array.count == 1 ? array[0] : nil
67 | case .floats(let array): nil
| `- warning: immutable value 'array' was never used; consider replacing with '_' or removing it
68 | }
69 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:76:26: warning: immutable value 'string' was never used; consider replacing with '_' or removing it
74 | public func asFloats() -> [Float]? {
75 | switch self {
76 | case .string(let string): nil
| `- warning: immutable value 'string' was never used; consider replacing with '_' or removing it
77 | case .int(let v): [Float(v)]
78 | case .float(let float): [float]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:89:26: warning: immutable value 'string' was never used; consider replacing with '_' or removing it
87 | public func asFloat() -> Float? {
88 | switch self {
89 | case .string(let string): nil
| `- warning: immutable value 'string' was never used; consider replacing with '_' or removing it
90 | case .int(let v): Float(v)
91 | case .float(let float): float
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:118:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
116 |
117 | return AsyncThrowingStream { continuation in
118 | Task { [model, continuation] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
119 | switch model {
120 | case .container(let container):
121 | await container.perform { context in
122 | await stream(context: context, continuation: continuation)
| `- note: closure captures 'stream(context:continuation:)' which is accessible to code in the current task
123 | }
124 | case .context(let context):
[436/446] Compiling MLXLMCommon Tokenizer.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:160:58: warning: initializer 'init(width:height:)' cannot be used in a default argument value because 'CoreGraphics' was not imported by this file; this is an error in the Swift 6 language mode
158 | _ model: ModelContainer, instructions: String? = nil,
159 | generateParameters: GenerateParameters = .init(),
160 | processing: UserInput.Processing = .init(resize: CGSize(width: 512, height: 512))
| |- warning: initializer 'init(width:height:)' cannot be used in a default argument value because 'CoreGraphics' was not imported by this file; this is an error in the Swift 6 language mode
| `- note: The missing import of module 'CoreGraphics' will be added implicitly
161 | ) {
162 | self.generator = .init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:177:58: warning: initializer 'init(width:height:)' cannot be used in a default argument value because 'CoreGraphics' was not imported by this file; this is an error in the Swift 6 language mode
175 | _ model: ModelContext, instructions: String? = nil,
176 | generateParameters: GenerateParameters = .init(),
177 | processing: UserInput.Processing = .init(resize: CGSize(width: 512, height: 512))
| |- warning: initializer 'init(width:height:)' cannot be used in a default argument value because 'CoreGraphics' was not imported by this file; this is an error in the Swift 6 language mode
| `- note: The missing import of module 'CoreGraphics' will be added implicitly
178 | ) {
179 | self.generator = .init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:78:27: warning: capture of 'generate(context:)' with non-sendable type '(ModelContext) async throws -> String' in a `@Sendable` closure; this is an error in the Swift 6 language mode
76 | case .container(let container):
77 | return try await container.perform { context in
78 | try await generate(context: context)
| |- warning: capture of 'generate(context:)' with non-sendable type '(ModelContext) async throws -> 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'
79 | }
80 | case .context(let context):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:53:14: warning: concurrently-executed local function 'generate(context:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
51 |
52 | func generate() async throws -> String {
53 | func generate(context: ModelContext) async throws -> String {
| `- warning: concurrently-executed local function 'generate(context:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
54 | // prepare the input -- first the structured messages,
55 | // next the tokens
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:122:31: warning: capture of 'stream(context:continuation:)' with non-sendable type '(ModelContext, AsyncThrowingStream<String, any Error>.Continuation) async -> ()' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 | case .container(let container):
121 | await container.perform { context in
122 | await stream(context: context, continuation: continuation)
| |- warning: capture of 'stream(context:continuation:)' with non-sendable type '(ModelContext, AsyncThrowingStream<String, any Error>.Continuation) async -> ()' 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'
123 | }
124 | case .context(let context):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:86:14: warning: concurrently-executed local function 'stream(context:continuation:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
84 |
85 | func stream() -> AsyncThrowingStream<String, Error> {
86 | func stream(
| `- warning: concurrently-executed local function 'stream(context:continuation:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode
87 | context: ModelContext,
88 | continuation: AsyncThrowingStream<String, Error>.Continuation
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:50:26: warning: immutable value 'string' was never used; consider replacing with '_' or removing it
48 | public func asInts() -> [Int]? {
49 | switch self {
50 | case .string(let string): nil
| `- warning: immutable value 'string' was never used; consider replacing with '_' or removing it
51 | case .int(let v): [v]
52 | case .float(let float): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:52:25: warning: immutable value 'float' was never used; consider replacing with '_' or removing it
50 | case .string(let string): nil
51 | case .int(let v): [v]
52 | case .float(let float): nil
| `- warning: immutable value 'float' was never used; consider replacing with '_' or removing it
53 | case .ints(let array): array
54 | case .floats(let array): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:54:26: warning: immutable value 'array' was never used; consider replacing with '_' or removing it
52 | case .float(let float): nil
53 | case .ints(let array): array
54 | case .floats(let array): nil
| `- warning: immutable value 'array' was never used; consider replacing with '_' or removing it
55 | }
56 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:63:26: warning: immutable value 'string' was never used; consider replacing with '_' or removing it
61 | public func asInt() -> Int? {
62 | switch self {
63 | case .string(let string): nil
| `- warning: immutable value 'string' was never used; consider replacing with '_' or removing it
64 | case .int(let v): v
65 | case .float(let float): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:65:25: warning: immutable value 'float' was never used; consider replacing with '_' or removing it
63 | case .string(let string): nil
64 | case .int(let v): v
65 | case .float(let float): nil
| `- warning: immutable value 'float' was never used; consider replacing with '_' or removing it
66 | case .ints(let array): array.count == 1 ? array[0] : nil
67 | case .floats(let array): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:67:26: warning: immutable value 'array' was never used; consider replacing with '_' or removing it
65 | case .float(let float): nil
66 | case .ints(let array): array.count == 1 ? array[0] : nil
67 | case .floats(let array): nil
| `- warning: immutable value 'array' was never used; consider replacing with '_' or removing it
68 | }
69 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:76:26: warning: immutable value 'string' was never used; consider replacing with '_' or removing it
74 | public func asFloats() -> [Float]? {
75 | switch self {
76 | case .string(let string): nil
| `- warning: immutable value 'string' was never used; consider replacing with '_' or removing it
77 | case .int(let v): [Float(v)]
78 | case .float(let float): [float]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:89:26: warning: immutable value 'string' was never used; consider replacing with '_' or removing it
87 | public func asFloat() -> Float? {
88 | switch self {
89 | case .string(let string): nil
| `- warning: immutable value 'string' was never used; consider replacing with '_' or removing it
90 | case .int(let v): Float(v)
91 | case .float(let float): float
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:118:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
116 |
117 | return AsyncThrowingStream { continuation in
118 | Task { [model, continuation] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
119 | switch model {
120 | case .container(let container):
121 | await container.perform { context in
122 | await stream(context: context, continuation: continuation)
| `- note: closure captures 'stream(context:continuation:)' which is accessible to code in the current task
123 | }
124 | case .context(let context):
[437/446] Compiling MLXLMCommon ModelAdapter.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:43:35: warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
41 | public static let shared = ModelAdapterFactory(
42 | registry: ModelAdapterTypeRegistry(creators: [
43 | "lora": LoRAContainer.from(directory:),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
44 | "dora": LoRAContainer.from(directory:),
45 | ])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:44:35: warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
42 | registry: ModelAdapterTypeRegistry(creators: [
43 | "lora": LoRAContainer.from(directory:),
44 | "dora": LoRAContainer.from(directory:),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
45 | ])
46 | )
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:41:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ModelAdapterFactory' may have shared mutable state; this is an error in the Swift 6 language mode
36 |
37 | /// A factory responsible for loading and creating model adapters from hub configurations.
38 | public final class ModelAdapterFactory {
| `- note: class 'ModelAdapterFactory' does not conform to the 'Sendable' protocol
39 |
40 | /// Shared instance of the adapter factory.
41 | public static let shared = ModelAdapterFactory(
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ModelAdapterFactory' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' 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
42 | registry: ModelAdapterTypeRegistry(creators: [
43 | "lora": LoRAContainer.from(directory:),
[438/446] Compiling MLXLMCommon ModelAdapterFactory.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:43:35: warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
41 | public static let shared = ModelAdapterFactory(
42 | registry: ModelAdapterTypeRegistry(creators: [
43 | "lora": LoRAContainer.from(directory:),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
44 | "dora": LoRAContainer.from(directory:),
45 | ])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:44:35: warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
42 | registry: ModelAdapterTypeRegistry(creators: [
43 | "lora": LoRAContainer.from(directory:),
44 | "dora": LoRAContainer.from(directory:),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
45 | ])
46 | )
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:41:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ModelAdapterFactory' may have shared mutable state; this is an error in the Swift 6 language mode
36 |
37 | /// A factory responsible for loading and creating model adapters from hub configurations.
38 | public final class ModelAdapterFactory {
| `- note: class 'ModelAdapterFactory' does not conform to the 'Sendable' protocol
39 |
40 | /// Shared instance of the adapter factory.
41 | public static let shared = ModelAdapterFactory(
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ModelAdapterFactory' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' 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
42 | registry: ModelAdapterTypeRegistry(creators: [
43 | "lora": LoRAContainer.from(directory:),
[439/446] Compiling MLXLMCommon ModelAdapterTypeRegistry.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:43:35: warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
41 | public static let shared = ModelAdapterFactory(
42 | registry: ModelAdapterTypeRegistry(creators: [
43 | "lora": LoRAContainer.from(directory:),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
44 | "dora": LoRAContainer.from(directory:),
45 | ])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:44:35: warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
42 | registry: ModelAdapterTypeRegistry(creators: [
43 | "lora": LoRAContainer.from(directory:),
44 | "dora": LoRAContainer.from(directory:),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
45 | ])
46 | )
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:41:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ModelAdapterFactory' may have shared mutable state; this is an error in the Swift 6 language mode
36 |
37 | /// A factory responsible for loading and creating model adapters from hub configurations.
38 | public final class ModelAdapterFactory {
| `- note: class 'ModelAdapterFactory' does not conform to the 'Sendable' protocol
39 |
40 | /// Shared instance of the adapter factory.
41 | public static let shared = ModelAdapterFactory(
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ModelAdapterFactory' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' 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
42 | registry: ModelAdapterTypeRegistry(creators: [
43 | "lora": LoRAContainer.from(directory:),
[440/446] Compiling MLXLMCommon AttentionUtils.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:43:35: warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
41 | public static let shared = ModelAdapterFactory(
42 | registry: ModelAdapterTypeRegistry(creators: [
43 | "lora": LoRAContainer.from(directory:),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
44 | "dora": LoRAContainer.from(directory:),
45 | ])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:44:35: warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
42 | registry: ModelAdapterTypeRegistry(creators: [
43 | "lora": LoRAContainer.from(directory:),
44 | "dora": LoRAContainer.from(directory:),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races
45 | ])
46 | )
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:41:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ModelAdapterFactory' may have shared mutable state; this is an error in the Swift 6 language mode
36 |
37 | /// A factory responsible for loading and creating model adapters from hub configurations.
38 | public final class ModelAdapterFactory {
| `- note: class 'ModelAdapterFactory' does not conform to the 'Sendable' protocol
39 |
40 | /// Shared instance of the adapter factory.
41 | public static let shared = ModelAdapterFactory(
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'ModelAdapterFactory' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' 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
42 | registry: ModelAdapterTypeRegistry(creators: [
43 | "lora": LoRAContainer.from(directory:),
[441/446] Compiling MLXLMCommon Encodable+toolResult.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/KVCache.swift:757:17: warning: initialization of immutable value 'expectedStep' was never used; consider replacing with assignment to '_' or removing it
755 |
756 | // Validate that step, groupSize, and bits match current instance
757 | let expectedStep = Int(newValue[0]) ?? 256
| `- warning: initialization of immutable value 'expectedStep' was never used; consider replacing with assignment to '_' or removing it
758 | let expectedGroupSize = Int(newValue[2]) ?? 64
759 | let expectedBits = Int(newValue[3]) ?? 8
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/KVCache.swift:758:17: warning: initialization of immutable value 'expectedGroupSize' was never used; consider replacing with assignment to '_' or removing it
756 | // Validate that step, groupSize, and bits match current instance
757 | let expectedStep = Int(newValue[0]) ?? 256
758 | let expectedGroupSize = Int(newValue[2]) ?? 64
| `- warning: initialization of immutable value 'expectedGroupSize' was never used; consider replacing with assignment to '_' or removing it
759 | let expectedBits = Int(newValue[3]) ?? 8
760 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/KVCache.swift:759:17: warning: initialization of immutable value 'expectedBits' was never used; consider replacing with assignment to '_' or removing it
757 | let expectedStep = Int(newValue[0]) ?? 256
758 | let expectedGroupSize = Int(newValue[2]) ?? 64
759 | let expectedBits = Int(newValue[3]) ?? 8
| `- warning: initialization of immutable value 'expectedBits' was never used; consider replacing with assignment to '_' or removing it
760 | }
761 | }
[442/446] Compiling MLXLMCommon KVCache.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/KVCache.swift:757:17: warning: initialization of immutable value 'expectedStep' was never used; consider replacing with assignment to '_' or removing it
755 |
756 | // Validate that step, groupSize, and bits match current instance
757 | let expectedStep = Int(newValue[0]) ?? 256
| `- warning: initialization of immutable value 'expectedStep' was never used; consider replacing with assignment to '_' or removing it
758 | let expectedGroupSize = Int(newValue[2]) ?? 64
759 | let expectedBits = Int(newValue[3]) ?? 8
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/KVCache.swift:758:17: warning: initialization of immutable value 'expectedGroupSize' was never used; consider replacing with assignment to '_' or removing it
756 | // Validate that step, groupSize, and bits match current instance
757 | let expectedStep = Int(newValue[0]) ?? 256
758 | let expectedGroupSize = Int(newValue[2]) ?? 64
| `- warning: initialization of immutable value 'expectedGroupSize' was never used; consider replacing with assignment to '_' or removing it
759 | let expectedBits = Int(newValue[3]) ?? 8
760 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/KVCache.swift:759:17: warning: initialization of immutable value 'expectedBits' was never used; consider replacing with assignment to '_' or removing it
757 | let expectedStep = Int(newValue[0]) ?? 256
758 | let expectedGroupSize = Int(newValue[2]) ?? 64
759 | let expectedBits = Int(newValue[3]) ?? 8
| `- warning: initialization of immutable value 'expectedBits' was never used; consider replacing with assignment to '_' or removing it
760 | }
761 | }
[443/446] Compiling MLXLMCommon LanguageModel.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/KVCache.swift:757:17: warning: initialization of immutable value 'expectedStep' was never used; consider replacing with assignment to '_' or removing it
755 |
756 | // Validate that step, groupSize, and bits match current instance
757 | let expectedStep = Int(newValue[0]) ?? 256
| `- warning: initialization of immutable value 'expectedStep' was never used; consider replacing with assignment to '_' or removing it
758 | let expectedGroupSize = Int(newValue[2]) ?? 64
759 | let expectedBits = Int(newValue[3]) ?? 8
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/KVCache.swift:758:17: warning: initialization of immutable value 'expectedGroupSize' was never used; consider replacing with assignment to '_' or removing it
756 | // Validate that step, groupSize, and bits match current instance
757 | let expectedStep = Int(newValue[0]) ?? 256
758 | let expectedGroupSize = Int(newValue[2]) ?? 64
| `- warning: initialization of immutable value 'expectedGroupSize' was never used; consider replacing with assignment to '_' or removing it
759 | let expectedBits = Int(newValue[3]) ?? 8
760 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/KVCache.swift:759:17: warning: initialization of immutable value 'expectedBits' was never used; consider replacing with assignment to '_' or removing it
757 | let expectedStep = Int(newValue[0]) ?? 256
758 | let expectedGroupSize = Int(newValue[2]) ?? 64
759 | let expectedBits = Int(newValue[3]) ?? 8
| `- warning: initialization of immutable value 'expectedBits' was never used; consider replacing with assignment to '_' or removing it
760 | }
761 | }
[444/446] Compiling MLXLMCommon ToolParameter.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:26:14: warning: associated value 'messages' of 'Sendable'-conforming enum 'Prompt' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
24 |
25 | /// model specific array of dictionaries
26 | case messages([Message])
| `- warning: associated value 'messages' of 'Sendable'-conforming enum 'Prompt' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
27 |
28 | /// model agnostic structured chat (series of messages)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:29:14: warning: associated value 'chat' of 'Sendable'-conforming enum 'Prompt' has non-sendable type 'Chat.Message'; this is an error in the Swift 6 language mode
27 |
28 | /// model agnostic structured chat (series of messages)
29 | case chat([Chat.Message])
| `- warning: associated value 'chat' of 'Sendable'-conforming enum 'Prompt' has non-sendable type 'Chat.Message'; this is an error in the Swift 6 language mode
30 |
31 | public var description: String {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Chat.swift:4:19: note: consider making struct 'Message' conform to the 'Sendable' protocol
2 |
3 | public enum Chat {
4 | public struct Message {
| `- note: consider making struct 'Message' conform to the 'Sendable' protocol
5 | /// The role of the message sender.
6 | public var role: Role
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:45:14: warning: associated value 'avAsset' of 'Sendable'-conforming enum 'Video' has non-sendable type 'AVAsset'; this is an error in the Swift 6 language mode
43 | /// Representation of a video resource.
44 | public enum Video: Sendable {
45 | case avAsset(AVAsset)
| `- warning: associated value 'avAsset' of 'Sendable'-conforming enum 'Video' has non-sendable type 'AVAsset'; this is an error in the Swift 6 language mode
46 | case url(URL)
47 |
AVFoundation.AVAsset:2:12: note: class 'AVAsset' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class AVAsset : NSObject, NSCopying, AVAsynchronousKeyValueLoading {
| `- note: class 'AVAsset' does not conform to the 'Sendable' protocol
3 | @available(macOS, introduced: 10.7, deprecated: 15.0, message: "Use AVURLAsset(url:) instead")
4 | public convenience init(url URL: URL)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'
1 | // Copyright © 2024 Apple Inc.
2 |
3 | import AVFoundation
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'
4 | import CoreImage
5 | import Foundation
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:60:14: warning: associated value 'ciImage' of 'Sendable'-conforming enum 'Image' has non-sendable type 'CIImage'; this is an error in the Swift 6 language mode
58 | /// Representation of an image resource.
59 | public enum Image: Sendable {
60 | case ciImage(CIImage)
| `- warning: associated value 'ciImage' of 'Sendable'-conforming enum 'Image' has non-sendable type 'CIImage'; this is an error in the Swift 6 language mode
61 | case url(URL)
62 | case array(MLXArray)
CoreImage.CIImage:2:12: note: class 'CIImage' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.4, *)
2 | open class CIImage : NSObject, NSSecureCoding, NSCopying {
| `- note: class 'CIImage' does not conform to the 'Sendable' protocol
3 | @available(*, unavailable, message: "superseded by import of -[CIImage initWithCGImage:]")
4 | public /*not inherited*/ init(cgImage image: CGImage)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:4:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreImage'
2 |
3 | import AVFoundation
4 | import CoreImage
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreImage'
5 | import Foundation
6 | import MLX
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:62:14: warning: associated value 'array' of 'Sendable'-conforming enum 'Image' has non-sendable type 'MLXArray'; this is an error in the Swift 6 language mode
60 | case ciImage(CIImage)
61 | case url(URL)
62 | case array(MLXArray)
| `- warning: associated value 'array' of 'Sendable'-conforming enum 'Image' has non-sendable type 'MLXArray'; this is an error in the Swift 6 language mode
63 |
64 | public func asCIImage() throws -> CIImage {
/Users/admin/builder/spi-builder-workspace/.build/checkouts/mlx-swift/Source/MLX/MLXArray.swift:8:20: note: class 'MLXArray' does not conform to the 'Sendable' protocol
6 | import Numerics
7 |
8 | public final class MLXArray {
| `- note: class 'MLXArray' does not conform to the 'Sendable' protocol
9 |
10 | /// Internal pointer to the mlx-c wrapper on `mlx::core::array`, used with `Cmlx` interop.
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:6:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'
4 | import CoreImage
5 | import Foundation
6 | import MLX
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'
7 | import Tokenizers
8 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:162:16: warning: stored property 'tools' of 'Sendable'-conforming struct 'UserInput' has non-sendable type '[ToolSpec]?' (aka 'Optional<Array<Dictionary<String, Any>>>'); this is an error in the Swift 6 language mode
160 | public var videos = [Video]()
161 |
162 | public var tools: [ToolSpec]?
| `- warning: stored property 'tools' of 'Sendable'-conforming struct 'UserInput' has non-sendable type '[ToolSpec]?' (aka 'Optional<Array<Dictionary<String, Any>>>'); this is an error in the Swift 6 language mode
163 |
164 | /// Additional values provided for the chat template rendering context
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:165:16: warning: stored property 'additionalContext' of 'Sendable'-conforming struct 'UserInput' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
163 |
164 | /// Additional values provided for the chat template rendering context
165 | public var additionalContext: [String: Any]?
| `- warning: stored property 'additionalContext' of 'Sendable'-conforming struct 'UserInput' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
166 | public var processing: Processing = .init()
167 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:111:28: warning: immutable value 'C' was never used; consider replacing with '_' or removing it
109 |
110 | let arrayData = array.asData()
111 | let (H, W, C) = array.shape3
| `- warning: immutable value 'C' was never used; consider replacing with '_' or removing it
112 | let cs = CGColorSpace(name: CGColorSpace.sRGB)!
113 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:107:21: warning: code after 'throw' will never be executed
105 | throw UserInputError.arrayError(
106 | "channel dimension must be last and 3/4: \(array.shape)")
107 | break
| `- warning: code after 'throw' will never be executed
108 | }
109 |
[445/446] Compiling MLXLMCommon Value.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:26:14: warning: associated value 'messages' of 'Sendable'-conforming enum 'Prompt' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
24 |
25 | /// model specific array of dictionaries
26 | case messages([Message])
| `- warning: associated value 'messages' of 'Sendable'-conforming enum 'Prompt' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
27 |
28 | /// model agnostic structured chat (series of messages)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:29:14: warning: associated value 'chat' of 'Sendable'-conforming enum 'Prompt' has non-sendable type 'Chat.Message'; this is an error in the Swift 6 language mode
27 |
28 | /// model agnostic structured chat (series of messages)
29 | case chat([Chat.Message])
| `- warning: associated value 'chat' of 'Sendable'-conforming enum 'Prompt' has non-sendable type 'Chat.Message'; this is an error in the Swift 6 language mode
30 |
31 | public var description: String {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Chat.swift:4:19: note: consider making struct 'Message' conform to the 'Sendable' protocol
2 |
3 | public enum Chat {
4 | public struct Message {
| `- note: consider making struct 'Message' conform to the 'Sendable' protocol
5 | /// The role of the message sender.
6 | public var role: Role
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:45:14: warning: associated value 'avAsset' of 'Sendable'-conforming enum 'Video' has non-sendable type 'AVAsset'; this is an error in the Swift 6 language mode
43 | /// Representation of a video resource.
44 | public enum Video: Sendable {
45 | case avAsset(AVAsset)
| `- warning: associated value 'avAsset' of 'Sendable'-conforming enum 'Video' has non-sendable type 'AVAsset'; this is an error in the Swift 6 language mode
46 | case url(URL)
47 |
AVFoundation.AVAsset:2:12: note: class 'AVAsset' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class AVAsset : NSObject, NSCopying, AVAsynchronousKeyValueLoading {
| `- note: class 'AVAsset' does not conform to the 'Sendable' protocol
3 | @available(macOS, introduced: 10.7, deprecated: 15.0, message: "Use AVURLAsset(url:) instead")
4 | public convenience init(url URL: URL)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'
1 | // Copyright © 2024 Apple Inc.
2 |
3 | import AVFoundation
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'
4 | import CoreImage
5 | import Foundation
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:60:14: warning: associated value 'ciImage' of 'Sendable'-conforming enum 'Image' has non-sendable type 'CIImage'; this is an error in the Swift 6 language mode
58 | /// Representation of an image resource.
59 | public enum Image: Sendable {
60 | case ciImage(CIImage)
| `- warning: associated value 'ciImage' of 'Sendable'-conforming enum 'Image' has non-sendable type 'CIImage'; this is an error in the Swift 6 language mode
61 | case url(URL)
62 | case array(MLXArray)
CoreImage.CIImage:2:12: note: class 'CIImage' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.4, *)
2 | open class CIImage : NSObject, NSSecureCoding, NSCopying {
| `- note: class 'CIImage' does not conform to the 'Sendable' protocol
3 | @available(*, unavailable, message: "superseded by import of -[CIImage initWithCGImage:]")
4 | public /*not inherited*/ init(cgImage image: CGImage)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:4:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreImage'
2 |
3 | import AVFoundation
4 | import CoreImage
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreImage'
5 | import Foundation
6 | import MLX
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:62:14: warning: associated value 'array' of 'Sendable'-conforming enum 'Image' has non-sendable type 'MLXArray'; this is an error in the Swift 6 language mode
60 | case ciImage(CIImage)
61 | case url(URL)
62 | case array(MLXArray)
| `- warning: associated value 'array' of 'Sendable'-conforming enum 'Image' has non-sendable type 'MLXArray'; this is an error in the Swift 6 language mode
63 |
64 | public func asCIImage() throws -> CIImage {
/Users/admin/builder/spi-builder-workspace/.build/checkouts/mlx-swift/Source/MLX/MLXArray.swift:8:20: note: class 'MLXArray' does not conform to the 'Sendable' protocol
6 | import Numerics
7 |
8 | public final class MLXArray {
| `- note: class 'MLXArray' does not conform to the 'Sendable' protocol
9 |
10 | /// Internal pointer to the mlx-c wrapper on `mlx::core::array`, used with `Cmlx` interop.
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:6:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'
4 | import CoreImage
5 | import Foundation
6 | import MLX
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'
7 | import Tokenizers
8 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:162:16: warning: stored property 'tools' of 'Sendable'-conforming struct 'UserInput' has non-sendable type '[ToolSpec]?' (aka 'Optional<Array<Dictionary<String, Any>>>'); this is an error in the Swift 6 language mode
160 | public var videos = [Video]()
161 |
162 | public var tools: [ToolSpec]?
| `- warning: stored property 'tools' of 'Sendable'-conforming struct 'UserInput' has non-sendable type '[ToolSpec]?' (aka 'Optional<Array<Dictionary<String, Any>>>'); this is an error in the Swift 6 language mode
163 |
164 | /// Additional values provided for the chat template rendering context
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:165:16: warning: stored property 'additionalContext' of 'Sendable'-conforming struct 'UserInput' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
163 |
164 | /// Additional values provided for the chat template rendering context
165 | public var additionalContext: [String: Any]?
| `- warning: stored property 'additionalContext' of 'Sendable'-conforming struct 'UserInput' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
166 | public var processing: Processing = .init()
167 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:111:28: warning: immutable value 'C' was never used; consider replacing with '_' or removing it
109 |
110 | let arrayData = array.asData()
111 | let (H, W, C) = array.shape3
| `- warning: immutable value 'C' was never used; consider replacing with '_' or removing it
112 | let cs = CGColorSpace(name: CGColorSpace.sRGB)!
113 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:107:21: warning: code after 'throw' will never be executed
105 | throw UserInputError.arrayError(
106 | "channel dimension must be last and 3/4: \(array.shape)")
107 | break
| `- warning: code after 'throw' will never be executed
108 | }
109 |
[446/446] Compiling MLXLMCommon UserInput.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:26:14: warning: associated value 'messages' of 'Sendable'-conforming enum 'Prompt' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
24 |
25 | /// model specific array of dictionaries
26 | case messages([Message])
| `- warning: associated value 'messages' of 'Sendable'-conforming enum 'Prompt' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
27 |
28 | /// model agnostic structured chat (series of messages)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:29:14: warning: associated value 'chat' of 'Sendable'-conforming enum 'Prompt' has non-sendable type 'Chat.Message'; this is an error in the Swift 6 language mode
27 |
28 | /// model agnostic structured chat (series of messages)
29 | case chat([Chat.Message])
| `- warning: associated value 'chat' of 'Sendable'-conforming enum 'Prompt' has non-sendable type 'Chat.Message'; this is an error in the Swift 6 language mode
30 |
31 | public var description: String {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Chat.swift:4:19: note: consider making struct 'Message' conform to the 'Sendable' protocol
2 |
3 | public enum Chat {
4 | public struct Message {
| `- note: consider making struct 'Message' conform to the 'Sendable' protocol
5 | /// The role of the message sender.
6 | public var role: Role
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:45:14: warning: associated value 'avAsset' of 'Sendable'-conforming enum 'Video' has non-sendable type 'AVAsset'; this is an error in the Swift 6 language mode
43 | /// Representation of a video resource.
44 | public enum Video: Sendable {
45 | case avAsset(AVAsset)
| `- warning: associated value 'avAsset' of 'Sendable'-conforming enum 'Video' has non-sendable type 'AVAsset'; this is an error in the Swift 6 language mode
46 | case url(URL)
47 |
AVFoundation.AVAsset:2:12: note: class 'AVAsset' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class AVAsset : NSObject, NSCopying, AVAsynchronousKeyValueLoading {
| `- note: class 'AVAsset' does not conform to the 'Sendable' protocol
3 | @available(macOS, introduced: 10.7, deprecated: 15.0, message: "Use AVURLAsset(url:) instead")
4 | public convenience init(url URL: URL)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'
1 | // Copyright © 2024 Apple Inc.
2 |
3 | import AVFoundation
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'
4 | import CoreImage
5 | import Foundation
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:60:14: warning: associated value 'ciImage' of 'Sendable'-conforming enum 'Image' has non-sendable type 'CIImage'; this is an error in the Swift 6 language mode
58 | /// Representation of an image resource.
59 | public enum Image: Sendable {
60 | case ciImage(CIImage)
| `- warning: associated value 'ciImage' of 'Sendable'-conforming enum 'Image' has non-sendable type 'CIImage'; this is an error in the Swift 6 language mode
61 | case url(URL)
62 | case array(MLXArray)
CoreImage.CIImage:2:12: note: class 'CIImage' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.4, *)
2 | open class CIImage : NSObject, NSSecureCoding, NSCopying {
| `- note: class 'CIImage' does not conform to the 'Sendable' protocol
3 | @available(*, unavailable, message: "superseded by import of -[CIImage initWithCGImage:]")
4 | public /*not inherited*/ init(cgImage image: CGImage)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:4:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreImage'
2 |
3 | import AVFoundation
4 | import CoreImage
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreImage'
5 | import Foundation
6 | import MLX
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:62:14: warning: associated value 'array' of 'Sendable'-conforming enum 'Image' has non-sendable type 'MLXArray'; this is an error in the Swift 6 language mode
60 | case ciImage(CIImage)
61 | case url(URL)
62 | case array(MLXArray)
| `- warning: associated value 'array' of 'Sendable'-conforming enum 'Image' has non-sendable type 'MLXArray'; this is an error in the Swift 6 language mode
63 |
64 | public func asCIImage() throws -> CIImage {
/Users/admin/builder/spi-builder-workspace/.build/checkouts/mlx-swift/Source/MLX/MLXArray.swift:8:20: note: class 'MLXArray' does not conform to the 'Sendable' protocol
6 | import Numerics
7 |
8 | public final class MLXArray {
| `- note: class 'MLXArray' does not conform to the 'Sendable' protocol
9 |
10 | /// Internal pointer to the mlx-c wrapper on `mlx::core::array`, used with `Cmlx` interop.
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:6:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'
4 | import CoreImage
5 | import Foundation
6 | import MLX
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'
7 | import Tokenizers
8 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:162:16: warning: stored property 'tools' of 'Sendable'-conforming struct 'UserInput' has non-sendable type '[ToolSpec]?' (aka 'Optional<Array<Dictionary<String, Any>>>'); this is an error in the Swift 6 language mode
160 | public var videos = [Video]()
161 |
162 | public var tools: [ToolSpec]?
| `- warning: stored property 'tools' of 'Sendable'-conforming struct 'UserInput' has non-sendable type '[ToolSpec]?' (aka 'Optional<Array<Dictionary<String, Any>>>'); this is an error in the Swift 6 language mode
163 |
164 | /// Additional values provided for the chat template rendering context
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:165:16: warning: stored property 'additionalContext' of 'Sendable'-conforming struct 'UserInput' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
163 |
164 | /// Additional values provided for the chat template rendering context
165 | public var additionalContext: [String: Any]?
| `- warning: stored property 'additionalContext' of 'Sendable'-conforming struct 'UserInput' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
166 | public var processing: Processing = .init()
167 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:111:28: warning: immutable value 'C' was never used; consider replacing with '_' or removing it
109 |
110 | let arrayData = array.asData()
111 | let (H, W, C) = array.shape3
| `- warning: immutable value 'C' was never used; consider replacing with '_' or removing it
112 | let cs = CGColorSpace(name: CGColorSpace.sRGB)!
113 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:107:21: warning: code after 'throw' will never be executed
105 | throw UserInputError.arrayError(
106 | "channel dimension must be last and 3/4: \(array.shape)")
107 | break
| `- warning: code after 'throw' will never be executed
108 | }
109 |
[447/478] Compiling MLXVLM QwenVL.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/QwenVL.swift:180:33: warning: no calls to throwing functions occur within 'try' expression
178 | ) throws -> [Int] {
179 | // Replace single padding token with correct number for each image or video frame
180 | let placeholderTokens = try tokenizer.encode(
| `- warning: no calls to throwing functions occur within 'try' expression
181 | text: "<|vision_start|>\(paddingToken)<|vision_end|>")
182 | let placeholderRanges = promptTokens.ranges(of: placeholderTokens)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/QwenVL.swift:190:20: warning: no calls to throwing functions occur within 'try' expression
188 | let replacementSequences = try frames.map { frame in
189 | let paddingCount = frame.product / mergeLength
190 | return try tokenizer.encode(
| `- warning: no calls to throwing functions occur within 'try' expression
191 | text:
192 | "<|vision_start|>\(Array(repeating: paddingToken, count: paddingCount).joined())<|vision_end|>"
[448/478] Compiling MLXVLM VLMModel.swift
[449/479] Compiling MLXVLM SmolVLM2.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:313:35: warning: 'try' must precede 'await'
311 | var video = try input.videos[0].asAVAsset()
312 |
313 | let processedFrames = await try MediaProcessing.asProcessedSequence(
| `- warning: 'try' must precede 'await'
314 | video,
315 | maxFrames: maxVideoFrames,
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:157:13: warning: variable 'targetSize' was never mutated; consider changing to 'let' constant
155 | func aspectRatioSize(for size: CGSize, longestEdge: CGFloat, multiple: CGFloat? = nil) -> CGSize
156 | {
157 | var targetSize = MediaProcessing.bestFit(
| `- warning: variable 'targetSize' was never mutated; consider changing to 'let' constant
158 | size, in: CGSize(width: longestEdge, height: longestEdge))
159 | guard let multiple = multiple else { return targetSize }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:292:39: warning: trailing closure in this context is confusable with the body of the statement; pass as a parenthesized argument to silence this warning
290 | // Insert a default system message if the input doesn't have one
291 | func messagesWithSystem(_ messages: [Message]) -> [Message] {
292 | guard messages.filter { $0["role"] as? String == "system" }.isEmpty else {
| `- warning: trailing closure in this context is confusable with the body of the statement; pass as a parenthesized argument to silence this warning
293 | return messages
294 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:306:17: warning: initialization of immutable value 'finalMessages' was never used; consider replacing with assignment to '_' or removing it
304 |
305 | // Unfortunately we don't have a "render" option in Tokenizers yet, so decoding
306 | let finalMessages = messagesWithSystem(messages)
| `- warning: initialization of immutable value 'finalMessages' was never used; consider replacing with assignment to '_' or removing it
307 | let promptTokens = try tokenizer.applyChatTemplate(
308 | messages: messagesWithSystem(messages))
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:311:17: warning: variable 'video' was never mutated; consider changing to 'let' constant
309 | let decoded = try tokenizer.decode(tokens: promptTokens, skipSpecialTokens: false)
310 |
311 | var video = try input.videos[0].asAVAsset()
| `- warning: variable 'video' was never mutated; consider changing to 'let' constant
312 |
313 | let processedFrames = await try MediaProcessing.asProcessedSequence(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:240:27: warning: no calls to throwing functions occur within 'try' expression
238 | // Unfortunately we don't have a "render" option in Tokenizers yet, so decoding
239 | let promptTokens = try tokenizer.applyChatTemplate(messages: messages)
240 | let decoded = try tokenizer.decode(tokens: promptTokens, skipSpecialTokens: false)
| `- warning: no calls to throwing functions occur within 'try' expression
241 |
242 | let image = try input.images[0].asCIImage().toSRGB()
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:272:37: warning: no calls to throwing functions occur within 'try' expression
270 | let splitPrompt = decoded.split(by: imageToken, options: .literal)
271 | let prompt = splitPrompt.joined(separator: imagePromptString)
272 | let finalPromptTokens = try tokenizer.encode(text: prompt)
| `- warning: no calls to throwing functions occur within 'try' expression
273 |
274 | let promptArray = MLXArray(finalPromptTokens).expandedDimensions(axis: 0)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:309:27: warning: no calls to throwing functions occur within 'try' expression
307 | let promptTokens = try tokenizer.applyChatTemplate(
308 | messages: messagesWithSystem(messages))
309 | let decoded = try tokenizer.decode(tokens: promptTokens, skipSpecialTokens: false)
| `- warning: no calls to throwing functions occur within 'try' expression
310 |
311 | var video = try input.videos[0].asAVAsset()
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:311:25: warning: no calls to throwing functions occur within 'try' expression
309 | let decoded = try tokenizer.decode(tokens: promptTokens, skipSpecialTokens: false)
310 |
311 | var video = try input.videos[0].asAVAsset()
| `- warning: no calls to throwing functions occur within 'try' expression
312 |
313 | let processedFrames = await try MediaProcessing.asProcessedSequence(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:347:37: warning: no calls to throwing functions occur within 'try' expression
345 | let splitPrompt = decoded.split(by: "User: ", options: .literal)
346 | let prompt = splitPrompt[0] + "User: " + videoPromptString + splitPrompt[1]
347 | let finalPromptTokens = try tokenizer.encode(text: prompt)
| `- warning: no calls to throwing functions occur within 'try' expression
348 |
349 | let promptArray = MLXArray(finalPromptTokens).expandedDimensions(axis: 0)
[450/479] Emitting module MLXLLM
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Gemma3Text.swift:13:8: warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
11 | import MLX
12 | import MLXFast
13 | import MLXLLM
| `- warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
14 | import MLXLMCommon
15 | import MLXNN
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:311:14: warning: non-final class 'LLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
309 | /// configuration: LLMRegistry.llama3_8B_4bit)
310 | /// ```
311 | public class LLMModelFactory: ModelFactory {
| `- warning: non-final class 'LLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
312 |
313 | public init(typeRegistry: ModelTypeRegistry, modelRegistry: AbstractModelRegistry) {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:328:17: warning: returning a task-isolated 'HubApi' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
326 | public let modelRegistry: AbstractModelRegistry
327 |
328 | public func _load(
| |- warning: returning a task-isolated 'HubApi' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
| |- note: returning a task-isolated 'HubApi' value risks causing races since the caller assumes the value can be safely sent to other isolation domains
| `- note: 'HubApi' is a non-Sendable type
329 | hub: HubApi, configuration: ModelConfiguration,
330 | progressHandler: @Sendable @escaping (Progress) -> Void
[451/481] Compiling MLXLLM Qwen3MoE.swift
[452/481] Compiling MLXLLM Starcoder2.swift
[453/481] Compiling MLXLLM Qwen2.swift
[454/481] Compiling MLXLLM Qwen3.swift
[455/481] Compiling MLXLLM Phi3.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Phi3.swift:63:17: warning: immutable value 'shortFactor' was never used; consider replacing with '_' or removing it
61 | if let ropeScaling = args.ropeScaling,
62 | ropeScaling.type == "su" || ropeScaling.type == "longrope",
63 | let shortFactor = ropeScaling.shortFactor, let longFactor = ropeScaling.longFactor
| `- warning: immutable value 'shortFactor' was never used; consider replacing with '_' or removing it
64 | {
65 | self.rope = .suScaledRotaryEmbedding(
[456/481] Compiling MLXLLM PhiMoE.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Phi3.swift:63:17: warning: immutable value 'shortFactor' was never used; consider replacing with '_' or removing it
61 | if let ropeScaling = args.ropeScaling,
62 | ropeScaling.type == "su" || ropeScaling.type == "longrope",
63 | let shortFactor = ropeScaling.shortFactor, let longFactor = ropeScaling.longFactor
| `- warning: immutable value 'shortFactor' was never used; consider replacing with '_' or removing it
64 | {
65 | self.rope = .suScaledRotaryEmbedding(
[457/481] Compiling MLXVLM VLMModelFactory.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:202:14: warning: non-final class 'VLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
200 | /// configuration: VLMRegistry.paligemma3bMix4488bit)
201 | /// ```
202 | public class VLMModelFactory: ModelFactory {
| `- warning: non-final class 'VLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
203 |
204 | public init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:84:26: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
82 | private static func all() -> [String: @Sendable (URL) throws -> any LanguageModel] {
83 | [
84 | "paligemma": create(PaliGemmaConfiguration.self, PaliGemma.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
85 | "qwen2_vl": create(Qwen2VLConfiguration.self, Qwen2VL.init),
86 | "qwen2_5_vl": create(Qwen25VLConfiguration.self, Qwen25VL.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:85:25: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
83 | [
84 | "paligemma": create(PaliGemmaConfiguration.self, PaliGemma.init),
85 | "qwen2_vl": create(Qwen2VLConfiguration.self, Qwen2VL.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
86 | "qwen2_5_vl": create(Qwen25VLConfiguration.self, Qwen25VL.init),
87 | "idefics3": create(Idefics3Configuration.self, Idefics3.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:86:27: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
84 | "paligemma": create(PaliGemmaConfiguration.self, PaliGemma.init),
85 | "qwen2_vl": create(Qwen2VLConfiguration.self, Qwen2VL.init),
86 | "qwen2_5_vl": create(Qwen25VLConfiguration.self, Qwen25VL.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
87 | "idefics3": create(Idefics3Configuration.self, Idefics3.init),
88 | "gemma3": create(Gemma3Configuration.self, Gemma3.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:87:25: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
85 | "qwen2_vl": create(Qwen2VLConfiguration.self, Qwen2VL.init),
86 | "qwen2_5_vl": create(Qwen25VLConfiguration.self, Qwen25VL.init),
87 | "idefics3": create(Idefics3Configuration.self, Idefics3.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
88 | "gemma3": create(Gemma3Configuration.self, Gemma3.init),
89 | "smolvlm": create(SmolVLM2Configuration.self, SmolVLM2.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:88:23: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
86 | "qwen2_5_vl": create(Qwen25VLConfiguration.self, Qwen25VL.init),
87 | "idefics3": create(Idefics3Configuration.self, Idefics3.init),
88 | "gemma3": create(Gemma3Configuration.self, Gemma3.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
89 | "smolvlm": create(SmolVLM2Configuration.self, SmolVLM2.init),
90 | ]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:89:24: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
87 | "idefics3": create(Idefics3Configuration.self, Idefics3.init),
88 | "gemma3": create(Gemma3Configuration.self, Gemma3.init),
89 | "smolvlm": create(SmolVLM2Configuration.self, SmolVLM2.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
90 | ]
91 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:104:35: warning: converting non-sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races
102 | {
103 | [
104 | "PaliGemmaProcessor": create(
| `- warning: converting non-sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races
105 | PaliGemmaProcessorConfiguration.self, PaliGemmaProcessor.init),
106 | "Qwen2VLProcessor": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:106:33: warning: converting non-sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races
104 | "PaliGemmaProcessor": create(
105 | PaliGemmaProcessorConfiguration.self, PaliGemmaProcessor.init),
106 | "Qwen2VLProcessor": create(
| `- warning: converting non-sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races
107 | Qwen2VLProcessorConfiguration.self, Qwen2VLProcessor.init),
108 | "Qwen2_5_VLProcessor": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:108:36: warning: converting non-sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races
106 | "Qwen2VLProcessor": create(
107 | Qwen2VLProcessorConfiguration.self, Qwen2VLProcessor.init),
108 | "Qwen2_5_VLProcessor": create(
| `- warning: converting non-sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races
109 | Qwen25VLProcessorConfiguration.self, Qwen25VLProcessor.init),
110 | "Idefics3Processor": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:110:34: warning: converting non-sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races
108 | "Qwen2_5_VLProcessor": create(
109 | Qwen25VLProcessorConfiguration.self, Qwen25VLProcessor.init),
110 | "Idefics3Processor": create(
| `- warning: converting non-sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races
111 | Idefics3ProcessorConfiguration.self, Idefics3Processor.init),
112 | "Gemma3Processor": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:112:32: warning: converting non-sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races
110 | "Idefics3Processor": create(
111 | Idefics3ProcessorConfiguration.self, Idefics3Processor.init),
112 | "Gemma3Processor": create(
| `- warning: converting non-sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races
113 | Gemma3ProcessorConfiguration.self, Gemma3Processor.init),
114 | "SmolVLMProcessor": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:114:33: warning: converting non-sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races
112 | "Gemma3Processor": create(
113 | Gemma3ProcessorConfiguration.self, Gemma3Processor.init),
114 | "SmolVLMProcessor": create(
| `- warning: converting non-sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races
115 | SmolVLMProcessorConfiguration.self, SmolVLMProcessor.init),
116 | ]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:227:17: warning: returning a task-isolated 'HubApi' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
225 | public let modelRegistry: AbstractModelRegistry
226 |
227 | public func _load(
| |- warning: returning a task-isolated 'HubApi' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
| |- note: returning a task-isolated 'HubApi' value risks causing races since the caller assumes the value can be safely sent to other isolation domains
| `- note: 'HubApi' is a non-Sendable type
228 | hub: HubApi, configuration: ModelConfiguration,
229 | progressHandler: @Sendable @escaping (Progress) -> Void
[458/481] Compiling MLXLLM LLMModel.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModel.swift:27:13: warning: variable 'state' was never mutated; consider changing to 'let' constant
25 | let prefillStepSize = windowSize ?? 512
26 | var y = input.text
27 | var state: LMOutput.State? = nil
| `- warning: variable 'state' was never mutated; consider changing to 'let' constant
28 |
29 | // prepare the prompt in chunks if larger than the prefill size
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModel.swift:32:17: warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
30 | while y.tokens.size > prefillStepSize {
31 | let input = y[.newAxis, ..<prefillStepSize]
32 | let result = self(input, cache: cache.isEmpty ? nil : cache, state: state)
| `- warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
33 | eval(cache)
34 | y = y[prefillStepSize...]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:311:14: warning: non-final class 'LLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
309 | /// configuration: LLMRegistry.llama3_8B_4bit)
310 | /// ```
311 | public class LLMModelFactory: ModelFactory {
| `- warning: non-final class 'LLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
312 |
313 | public init(typeRegistry: ModelTypeRegistry, modelRegistry: AbstractModelRegistry) {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:31:24: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
29 | private static func all() -> [String: @Sendable (URL) throws -> any LanguageModel] {
30 | [
31 | "mistral": create(LlamaConfiguration.self, LlamaModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
32 | "llama": create(LlamaConfiguration.self, LlamaModel.init),
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:32:22: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
30 | [
31 | "mistral": create(LlamaConfiguration.self, LlamaModel.init),
32 | "llama": create(LlamaConfiguration.self, LlamaModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:33:20: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
31 | "mistral": create(LlamaConfiguration.self, LlamaModel.init),
32 | "llama": create(LlamaConfiguration.self, LlamaModel.init),
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:34:21: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
32 | "llama": create(LlamaConfiguration.self, LlamaModel.init),
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:35:23: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:36:22: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:37:23: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:38:22: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:39:22: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:40:26: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:41:27: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:42:23: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:43:24: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:44:26: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:45:28: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:46:24: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
48 | "glm4": create(GLM4Configuration.self, GLM4Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:47:21: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
48 | "glm4": create(GLM4Configuration.self, GLM4Model.init),
49 | "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:48:21: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
48 | "glm4": create(GLM4Configuration.self, GLM4Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
49 | "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
50 | ]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:49:26: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
48 | "glm4": create(GLM4Configuration.self, GLM4Model.init),
49 | "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
50 | ]
51 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:375:17: warning: returning task-isolated 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
373 | messageGenerator: messageGenerator)
374 |
375 | return .init(
| |- warning: returning task-isolated 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
| `- note: returning task-isolated 'model' risks causing data races since the caller assumes that 'model' can be safely sent to other isolation domains
376 | configuration: configuration, model: model, processor: processor, tokenizer: tokenizer)
377 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:328:17: warning: returning a task-isolated 'HubApi' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
326 | public let modelRegistry: AbstractModelRegistry
327 |
328 | public func _load(
| |- warning: returning a task-isolated 'HubApi' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
| |- note: returning a task-isolated 'HubApi' value risks causing races since the caller assumes the value can be safely sent to other isolation domains
| `- note: 'HubApi' is a non-Sendable type
329 | hub: HubApi, configuration: ModelConfiguration,
330 | progressHandler: @Sendable @escaping (Progress) -> Void
[459/481] Compiling MLXLLM LLMModelFactory.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModel.swift:27:13: warning: variable 'state' was never mutated; consider changing to 'let' constant
25 | let prefillStepSize = windowSize ?? 512
26 | var y = input.text
27 | var state: LMOutput.State? = nil
| `- warning: variable 'state' was never mutated; consider changing to 'let' constant
28 |
29 | // prepare the prompt in chunks if larger than the prefill size
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModel.swift:32:17: warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
30 | while y.tokens.size > prefillStepSize {
31 | let input = y[.newAxis, ..<prefillStepSize]
32 | let result = self(input, cache: cache.isEmpty ? nil : cache, state: state)
| `- warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
33 | eval(cache)
34 | y = y[prefillStepSize...]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:311:14: warning: non-final class 'LLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
309 | /// configuration: LLMRegistry.llama3_8B_4bit)
310 | /// ```
311 | public class LLMModelFactory: ModelFactory {
| `- warning: non-final class 'LLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
312 |
313 | public init(typeRegistry: ModelTypeRegistry, modelRegistry: AbstractModelRegistry) {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:31:24: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
29 | private static func all() -> [String: @Sendable (URL) throws -> any LanguageModel] {
30 | [
31 | "mistral": create(LlamaConfiguration.self, LlamaModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
32 | "llama": create(LlamaConfiguration.self, LlamaModel.init),
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:32:22: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
30 | [
31 | "mistral": create(LlamaConfiguration.self, LlamaModel.init),
32 | "llama": create(LlamaConfiguration.self, LlamaModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:33:20: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
31 | "mistral": create(LlamaConfiguration.self, LlamaModel.init),
32 | "llama": create(LlamaConfiguration.self, LlamaModel.init),
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:34:21: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
32 | "llama": create(LlamaConfiguration.self, LlamaModel.init),
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:35:23: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:36:22: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:37:23: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:38:22: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:39:22: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:40:26: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:41:27: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:42:23: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:43:24: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:44:26: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:45:28: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:46:24: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
48 | "glm4": create(GLM4Configuration.self, GLM4Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:47:21: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
48 | "glm4": create(GLM4Configuration.self, GLM4Model.init),
49 | "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:48:21: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
48 | "glm4": create(GLM4Configuration.self, GLM4Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
49 | "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
50 | ]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:49:26: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
48 | "glm4": create(GLM4Configuration.self, GLM4Model.init),
49 | "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
50 | ]
51 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:375:17: warning: returning task-isolated 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
373 | messageGenerator: messageGenerator)
374 |
375 | return .init(
| |- warning: returning task-isolated 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
| `- note: returning task-isolated 'model' risks causing data races since the caller assumes that 'model' can be safely sent to other isolation domains
376 | configuration: configuration, model: model, processor: processor, tokenizer: tokenizer)
377 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:328:17: warning: returning a task-isolated 'HubApi' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
326 | public let modelRegistry: AbstractModelRegistry
327 |
328 | public func _load(
| |- warning: returning a task-isolated 'HubApi' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
| |- note: returning a task-isolated 'HubApi' value risks causing races since the caller assumes the value can be safely sent to other isolation domains
| `- note: 'HubApi' is a non-Sendable type
329 | hub: HubApi, configuration: ModelConfiguration,
330 | progressHandler: @Sendable @escaping (Progress) -> Void
[460/481] Compiling MLXLLM Lora+Data.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModel.swift:27:13: warning: variable 'state' was never mutated; consider changing to 'let' constant
25 | let prefillStepSize = windowSize ?? 512
26 | var y = input.text
27 | var state: LMOutput.State? = nil
| `- warning: variable 'state' was never mutated; consider changing to 'let' constant
28 |
29 | // prepare the prompt in chunks if larger than the prefill size
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModel.swift:32:17: warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
30 | while y.tokens.size > prefillStepSize {
31 | let input = y[.newAxis, ..<prefillStepSize]
32 | let result = self(input, cache: cache.isEmpty ? nil : cache, state: state)
| `- warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it
33 | eval(cache)
34 | y = y[prefillStepSize...]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:311:14: warning: non-final class 'LLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
309 | /// configuration: LLMRegistry.llama3_8B_4bit)
310 | /// ```
311 | public class LLMModelFactory: ModelFactory {
| `- warning: non-final class 'LLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
312 |
313 | public init(typeRegistry: ModelTypeRegistry, modelRegistry: AbstractModelRegistry) {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:31:24: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
29 | private static func all() -> [String: @Sendable (URL) throws -> any LanguageModel] {
30 | [
31 | "mistral": create(LlamaConfiguration.self, LlamaModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
32 | "llama": create(LlamaConfiguration.self, LlamaModel.init),
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:32:22: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
30 | [
31 | "mistral": create(LlamaConfiguration.self, LlamaModel.init),
32 | "llama": create(LlamaConfiguration.self, LlamaModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:33:20: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
31 | "mistral": create(LlamaConfiguration.self, LlamaModel.init),
32 | "llama": create(LlamaConfiguration.self, LlamaModel.init),
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:34:21: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
32 | "llama": create(LlamaConfiguration.self, LlamaModel.init),
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:35:23: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
33 | "phi": create(PhiConfiguration.self, PhiModel.init),
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:36:22: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
34 | "phi3": create(Phi3Configuration.self, Phi3Model.init),
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:37:23: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
35 | "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:38:22: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
36 | "gemma": create(GemmaConfiguration.self, GemmaModel.init),
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:39:22: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
37 | "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:40:26: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
38 | "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:41:27: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
39 | "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:42:23: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
40 | "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:43:24: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
41 | "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:44:26: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
42 | "cohere": create(CohereConfiguration.self, CohereModel.init),
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:45:28: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
43 | "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:46:24: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
44 | "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
48 | "glm4": create(GLM4Configuration.self, GLM4Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:47:21: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
45 | "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
48 | "glm4": create(GLM4Configuration.self, GLM4Model.init),
49 | "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:48:21: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
46 | "granite": create(GraniteConfiguration.self, GraniteModel.init),
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
48 | "glm4": create(GLM4Configuration.self, GLM4Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
49 | "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
50 | ]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:49:26: warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
47 | "mimo": create(MiMoConfiguration.self, MiMoModel.init),
48 | "glm4": create(GLM4Configuration.self, GLM4Model.init),
49 | "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
| `- warning: converting non-sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
50 | ]
51 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:375:17: warning: returning task-isolated 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
373 | messageGenerator: messageGenerator)
374 |
375 | return .init(
| |- warning: returning task-isolated 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
| `- note: returning task-isolated 'model' risks causing data races since the caller assumes that 'model' can be safely sent to other isolation domains
376 | configuration: configuration, model: model, processor: processor, tokenizer: tokenizer)
377 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:328:17: warning: returning a task-isolated 'HubApi' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
326 | public let modelRegistry: AbstractModelRegistry
327 |
328 | public func _load(
| |- warning: returning a task-isolated 'HubApi' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
| |- note: returning a task-isolated 'HubApi' value risks causing races since the caller assumes the value can be safely sent to other isolation domains
| `- note: 'HubApi' is a non-Sendable type
329 | hub: HubApi, configuration: ModelConfiguration,
330 | progressHandler: @Sendable @escaping (Progress) -> Void
[461/481] Compiling MLXLLM OpenELM.swift
[462/481] Compiling MLXLLM Phi.swift
[463/481] Compiling MLXLLM Granite.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:120:13: warning: initialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it
118 |
119 | public init(_ args: GraniteConfiguration) {
120 | let attentionHeads = args.attentionHeads
| `- warning: initialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it
121 | let hiddenSize = args.hiddenSize
122 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:270:74: warning: left side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used
268 | self.kvHeads = try container.decode(Int.self, forKey: .kvHeads)
269 | self.attentionBias = try container.decode(Bool.self, forKey: .attentionBias)
270 | self.mlpBias = try container.decode(Bool.self, forKey: .mlpBias) ?? false
| `- warning: left side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used
271 | self.ropeTheta = try container.decodeIfPresent(Float.self, forKey: .ropeTheta) ?? 10000000.0
272 | self.ropeScaling = try container.decodeIfPresent(
[464/481] Compiling MLXLLM Internlm2.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:120:13: warning: initialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it
118 |
119 | public init(_ args: GraniteConfiguration) {
120 | let attentionHeads = args.attentionHeads
| `- warning: initialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it
121 | let hiddenSize = args.hiddenSize
122 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:270:74: warning: left side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used
268 | self.kvHeads = try container.decode(Int.self, forKey: .kvHeads)
269 | self.attentionBias = try container.decode(Bool.self, forKey: .attentionBias)
270 | self.mlpBias = try container.decode(Bool.self, forKey: .mlpBias) ?? false
| `- warning: left side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used
271 | self.ropeTheta = try container.decodeIfPresent(Float.self, forKey: .ropeTheta) ?? 10000000.0
272 | self.ropeScaling = try container.decodeIfPresent(
[465/481] Compiling MLXLLM LoraTrain.swift
[466/481] Compiling MLXLLM Cohere.swift
[467/481] Compiling MLXLLM GLM4.swift
[468/481] Compiling MLXLLM Gemma.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Gemma3Text.swift:13:8: warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
11 | import MLX
12 | import MLXFast
13 | import MLXLLM
| `- warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
14 | import MLXLMCommon
15 | import MLXNN
[469/481] Compiling MLXLLM Gemma2.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Gemma3Text.swift:13:8: warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
11 | import MLX
12 | import MLXFast
13 | import MLXLLM
| `- warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
14 | import MLXLMCommon
15 | import MLXNN
[470/481] Compiling MLXLLM Gemma3Text.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Gemma3Text.swift:13:8: warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
11 | import MLX
12 | import MLXFast
13 | import MLXLLM
| `- warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
14 | import MLXLMCommon
15 | import MLXNN
[471/481] Compiling MLXLLM Llama.swift
[472/481] Compiling MLXLLM MiMo.swift
[473/481] Compiling MLXLLM SuScaledRotaryEmbedding.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/SuScaledRotaryEmbedding.swift:42:13: warning: variable 'scaledX' was never mutated; consider changing to 'let' constant
40 | public func callAsFunction(_ x: MLXArray, offset: Int = 0) -> MLXArray {
41 | // Apply scaling only to the dimensions that will be rotated
42 | var scaledX = x
| `- warning: variable 'scaledX' was never mutated; consider changing to 'let' constant
43 | let sliceToScale = scaledX[.ellipsis, 0 ..< dimensions]
44 | scaledX[.ellipsis, 0 ..< dimensions] = scale * sliceToScale
[474/481] Compiling MLXLLM SwitchLayers.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/SuScaledRotaryEmbedding.swift:42:13: warning: variable 'scaledX' was never mutated; consider changing to 'let' constant
40 | public func callAsFunction(_ x: MLXArray, offset: Int = 0) -> MLXArray {
41 | // Apply scaling only to the dimensions that will be rotated
42 | var scaledX = x
| `- warning: variable 'scaledX' was never mutated; consider changing to 'let' constant
43 | let sliceToScale = scaledX[.ellipsis, 0 ..< dimensions]
44 | scaledX[.ellipsis, 0 ..< dimensions] = scale * sliceToScale
[475/481] Compiling MLXVLM Paligemma.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:448:17: warning: no calls to throwing functions occur within 'try' expression
446 | image = MediaProcessing.apply(image, processing: processing)
447 |
448 | image = try MediaProcessing.resampleBicubic(image, to: config.size.cgSize)
| `- warning: no calls to throwing functions occur within 'try' expression
449 | image = MediaProcessing.normalize(
450 | image, mean: config.imageMeanTuple, std: config.imageStdTuple)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:471:28: warning: no calls to throwing functions occur within 'try' expression
469 | + "\n"
470 |
471 | let promptTokens = try tokenizer.encode(text: prompt)
| `- warning: no calls to throwing functions occur within 'try' expression
472 | let promptArray = MLXArray(promptTokens).expandedDimensions(axis: 0)
473 | let mask = ones(like: promptArray).asType(.int8)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:560:13: warning: initialization of immutable value 'embedDimension' was never used; consider replacing with assignment to '_' or removing it
558 | attentionMask: MLXArray
559 | ) -> (MLXArray, MLXArray) {
560 | let embedDimension = imageFeatures.dim(2)
| `- warning: initialization of immutable value 'embedDimension' was never used; consider replacing with assignment to '_' or removing it
561 | let (batchSize, sequenceLength) = inputIds.shape2
562 | var scaledImageFeatures = imageFeatures / pow(Float(config.hiddenSize), 0.5)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:561:14: warning: immutable value 'batchSize' was never used; consider replacing with '_' or removing it
559 | ) -> (MLXArray, MLXArray) {
560 | let embedDimension = imageFeatures.dim(2)
561 | let (batchSize, sequenceLength) = inputIds.shape2
| `- warning: immutable value 'batchSize' was never used; consider replacing with '_' or removing it
562 | var scaledImageFeatures = imageFeatures / pow(Float(config.hiddenSize), 0.5)
563 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:561:25: warning: immutable value 'sequenceLength' was never used; consider replacing with '_' or removing it
559 | ) -> (MLXArray, MLXArray) {
560 | let embedDimension = imageFeatures.dim(2)
561 | let (batchSize, sequenceLength) = inputIds.shape2
| `- warning: immutable value 'sequenceLength' was never used; consider replacing with '_' or removing it
562 | var scaledImageFeatures = imageFeatures / pow(Float(config.hiddenSize), 0.5)
563 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:569:13: warning: variable 'textMaskExpanded' was never mutated; consider changing to 'let' constant
567 |
568 | // expand masks to match embedding dimension
569 | var textMaskExpanded = expandedDimensions(textMask, axis: -1)
| `- warning: variable 'textMaskExpanded' was never mutated; consider changing to 'let' constant
570 | var padMaskExpanded = expandedDimensions(padMask, axis: -1)
571 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:570:13: warning: variable 'padMaskExpanded' was never mutated; consider changing to 'let' constant
568 | // expand masks to match embedding dimension
569 | var textMaskExpanded = expandedDimensions(textMask, axis: -1)
570 | var padMaskExpanded = expandedDimensions(padMask, axis: -1)
| `- warning: variable 'padMaskExpanded' was never mutated; consider changing to 'let' constant
571 |
572 | // insert padding and text token embeddings
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:580:13: warning: variable 'imageMaskExpanded' was never mutated; consider changing to 'let' constant
578 |
579 | // insert image embeddings - the image mask is always less or equal to the sentence in length
580 | var imageMaskExpanded = expandedDimensions(imageMask, axis: -1)
| `- warning: variable 'imageMaskExpanded' was never mutated; consider changing to 'let' constant
581 | finalEmbedding = which(imageMaskExpanded, scaledImageFeatures, finalEmbedding)
582 |
[476/481] Emitting module MLXVLM
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:19:13: warning: let 'context' is not concurrency-safe because non-'Sendable' type 'CIContext' may have shared mutable state; this is an error in the Swift 6 language mode
17 | }
18 |
19 | private let context = CIContext()
| `- warning: let 'context' is not concurrency-safe because non-'Sendable' type 'CIContext' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Collection of methods for processing media (images, video, etc.).
CoreImage.CIContext:2:12: note: class 'CIContext' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.4, *)
2 | open class CIContext : NSObject {
| `- note: class 'CIContext' does not conform to the 'Sendable' protocol
3 | @available(macOS, introduced: 10.6, deprecated: 10.14, message: "Core Image OpenGL API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)")
4 | public /*not inherited*/ init(cglContext cglctx: CGLContextObj, pixelFormat: CGLPixelFormatObj?, colorSpace: CGColorSpace?, options: [CIContextOption : Any]? = nil)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:4:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreImage'
2 |
3 | import AVFoundation
4 | import CoreImage.CIFilterBuiltins
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreImage'
5 | import MLX
6 | import MLXLMCommon
:
17 | }
18 |
19 | private let context = CIContext()
| |- note: annotate 'context' 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
20 |
21 | /// Collection of methods for processing media (images, video, etc.).
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:202:14: warning: non-final class 'VLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
200 | /// configuration: VLMRegistry.paligemma3bMix4488bit)
201 | /// ```
202 | public class VLMModelFactory: ModelFactory {
| `- warning: non-final class 'VLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
203 |
204 | public init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:227:17: warning: returning a task-isolated 'HubApi' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
225 | public let modelRegistry: AbstractModelRegistry
226 |
227 | public func _load(
| |- warning: returning a task-isolated 'HubApi' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
| |- note: returning a task-isolated 'HubApi' value risks causing races since the caller assumes the value can be safely sent to other isolation domains
| `- note: 'HubApi' is a non-Sendable type
228 | hub: HubApi, configuration: ModelConfiguration,
229 | progressHandler: @Sendable @escaping (Progress) -> Void
[477/481] Compiling MLXVLM Qwen2VL.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen2VL.swift:465:17: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it
463 | let rotaryPositionEmbedding = rotaryPositionEmbedding(frames)
464 |
465 | let batchSize = frames.count
| `- warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it
466 |
467 | for block in blocks {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen2VL.swift:552:31: warning: no calls to throwing functions occur within 'try' expression
550 | let resizedSize = CGSize(width: resizedWidth, height: resizedHeight)
551 |
552 | let processedImages = try images.map { image in
| `- warning: no calls to throwing functions occur within 'try' expression
553 | preprocess(image: image, resizedSize: resizedSize).asMLXArray()
554 | }
[478/481] Compiling MLXVLM Idefics3.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Idefics3.swift:847:17: warning: initialization of immutable value 'count' was never used; consider replacing with assignment to '_' or removing it
845 | }
846 |
847 | let count = config.imageSequenceLength ?? 1
| `- warning: initialization of immutable value 'count' was never used; consider replacing with assignment to '_' or removing it
848 |
849 | // Encode only the text part of the prompt, without <image>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Idefics3.swift:837:26: warning: no calls to throwing functions occur within 'try' expression
835 | if input.images.isEmpty {
836 | // No image scenario
837 | let tokens = try tokenizer.encode(text: prompt)
| `- warning: no calls to throwing functions occur within 'try' expression
838 | let tokensArray = MLXArray(tokens).expandedDimensions(axis: 0)
839 | let mask = ones(like: tokensArray)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Idefics3.swift:850:32: warning: no calls to throwing functions occur within 'try' expression
848 |
849 | // Encode only the text part of the prompt, without <image>
850 | var promptTokens = try tokenizer.encode(text: prompt)
| `- warning: no calls to throwing functions occur within 'try' expression
851 |
852 | let imageTokenIndex = promptTokens.count / 2
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Idefics3.swift:865:21: warning: no calls to throwing functions occur within 'try' expression
863 | )
864 | image = MediaProcessing.apply(image, processing: input.processing)
865 | image = try MediaProcessing.resampleBicubic(image, to: targetSize)
| `- warning: no calls to throwing functions occur within 'try' expression
866 | image = MediaProcessing.normalize(
867 | image,
[479/481] Compiling MLXVLM MediaProcessing.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:19:13: warning: let 'context' is not concurrency-safe because non-'Sendable' type 'CIContext' may have shared mutable state; this is an error in the Swift 6 language mode
17 | }
18 |
19 | private let context = CIContext()
| `- warning: let 'context' is not concurrency-safe because non-'Sendable' type 'CIContext' may have shared mutable state; this is an error in the Swift 6 language mode
20 |
21 | /// Collection of methods for processing media (images, video, etc.).
CoreImage.CIContext:2:12: note: class 'CIContext' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.4, *)
2 | open class CIContext : NSObject {
| `- note: class 'CIContext' does not conform to the 'Sendable' protocol
3 | @available(macOS, introduced: 10.6, deprecated: 10.14, message: "Core Image OpenGL API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)")
4 | public /*not inherited*/ init(cglContext cglctx: CGLContextObj, pixelFormat: CGLPixelFormatObj?, colorSpace: CGColorSpace?, options: [CIContextOption : Any]? = nil)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:4:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreImage'
2 |
3 | import AVFoundation
4 | import CoreImage.CIFilterBuiltins
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreImage'
5 | import MLX
6 | import MLXLMCommon
:
17 | }
18 |
19 | private let context = CIContext()
| |- note: annotate 'context' 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
20 |
21 | /// Collection of methods for processing media (images, video, etc.).
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:287:13: warning: initialization of immutable value 'secondsPerSample' was never used; consider replacing with assignment to '_' or removing it
285 | let durationInSeconds = duration.seconds
286 | let samplesPerSecond = Double(samplesPerSecond)
287 | let secondsPerSample = 1.0 / samplesPerSecond
| `- warning: initialization of immutable value 'secondsPerSample' was never used; consider replacing with assignment to '_' or removing it
288 | let totalFramesToSample = durationInSeconds * samplesPerSecond
289 | let durationTimeValue = duration.value
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:302:46: warning: immutable value 'requested' was never used; consider replacing with '_' or removing it
300 | for await result in await generator.images(for: sampledTimes) {
301 | switch result {
302 | case .success(requestedTime: let requested, let image, actualTime: let actual):
| `- warning: immutable value 'requested' was never used; consider replacing with '_' or removing it
303 | let ciImage = CIImage(
304 | cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:302:84: warning: immutable value 'actual' was never used; consider replacing with '_' or removing it
300 | for await result in await generator.images(for: sampledTimes) {
301 | switch result {
302 | case .success(requestedTime: let requested, let image, actualTime: let actual):
| `- warning: immutable value 'actual' was never used; consider replacing with '_' or removing it
303 | let ciImage = CIImage(
304 | cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:306:46: warning: immutable value 'requested' was never used; consider replacing with '_' or removing it
304 | cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
305 | ciImages.append(ciImage)
306 | case .failure(requestedTime: let requested, let error):
| `- warning: immutable value 'requested' was never used; consider replacing with '_' or removing it
307 | break
308 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:306:61: warning: immutable value 'error' was never used; consider replacing with '_' or removing it
304 | cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
305 | ciImages.append(ciImage)
306 | case .failure(requestedTime: let requested, let error):
| `- warning: immutable value 'error' was never used; consider replacing with '_' or removing it
307 | break
308 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:300:29: warning: no 'async' operations occur within 'await' expression
298 | // Collect the frames
299 | var ciImages: [CIImage] = []
300 | for await result in await generator.images(for: sampledTimes) {
| `- warning: no 'async' operations occur within 'await' expression
301 | switch result {
302 | case .success(requestedTime: let requested, let image, actualTime: let actual):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:341:13: warning: variable 'desiredFrames' was never mutated; consider changing to 'let' constant
339 | // Note: the round was not present in `asCIImageSequence`, so we may now be passing 1 more frame to Qwen depending on video duration.
340 | let estimatedFrames = Int(round(fps * duration.seconds))
341 | var desiredFrames = min(estimatedFrames, maxFrames)
| `- warning: variable 'desiredFrames' was never mutated; consider changing to 'let' constant
342 | let finalFrameCount = max(desiredFrames, 1)
343 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:356:13: warning: variable 'frames' was never used; consider replacing with '_' or removing it
354 | var timestamps: [CMTime] = []
355 |
356 | var frames: [VideoFrame] = []
| `- warning: variable 'frames' was never used; consider replacing with '_' or removing it
357 |
358 | for await result in await generator.images(for: sampledTimes) {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:360:46: warning: immutable value 'requested' was never used; consider replacing with '_' or removing it
358 | for await result in await generator.images(for: sampledTimes) {
359 | switch result {
360 | case .success(requestedTime: let requested, let image, actualTime: let actual):
| `- warning: immutable value 'requested' was never used; consider replacing with '_' or removing it
361 | let ciImage = CIImage(
362 | cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:366:46: warning: immutable value 'requested' was never used; consider replacing with '_' or removing it
364 | ciImages.append(frame.frame)
365 | timestamps.append(frame.timeStamp)
366 | case .failure(requestedTime: let requested, let error):
| `- warning: immutable value 'requested' was never used; consider replacing with '_' or removing it
367 | break
368 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:366:61: warning: immutable value 'error' was never used; consider replacing with '_' or removing it
364 | ciImages.append(frame.frame)
365 | timestamps.append(frame.timeStamp)
366 | case .failure(requestedTime: let requested, let error):
| `- warning: immutable value 'error' was never used; consider replacing with '_' or removing it
367 | break
368 | }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:358:29: warning: no 'async' operations occur within 'await' expression
356 | var frames: [VideoFrame] = []
357 |
358 | for await result in await generator.images(for: sampledTimes) {
| `- warning: no 'async' operations occur within 'await' expression
359 | switch result {
360 | case .success(requestedTime: let requested, let image, actualTime: let actual):
[480/481] Compiling MLXVLM Gemma3.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:973:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it
971 | ) -> (MLXArray, MLXArray?) {
972 | let embedDim = inputsEmbeds.dim(2)
973 | let batchSize = inputIds.dim(0)
| `- warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it
974 | let sequenceLength = inputIds.dim(1)
975 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:974:13: warning: initialization of immutable value 'sequenceLength' was never used; consider replacing with assignment to '_' or removing it
972 | let embedDim = inputsEmbeds.dim(2)
973 | let batchSize = inputIds.dim(0)
974 | let sequenceLength = inputIds.dim(1)
| `- warning: initialization of immutable value 'sequenceLength' was never used; consider replacing with assignment to '_' or removing it
975 |
976 | // Scale image features to match text embedding magnitude
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:986:13: warning: initialization of immutable value 'textMask' was never used; consider replacing with assignment to '_' or removing it
984 |
985 | // Create masks for different token types
986 | let textMask = MLX.logicalAnd(
| `- warning: initialization of immutable value 'textMask' was never used; consider replacing with assignment to '_' or removing it
987 | MLX.notEqual(inputIds, MLXArray(imageTokenId)),
988 | MLX.notEqual(inputIds, MLXArray(padTokenId))
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1026:56: warning: conditional cast from 'any KVCache' to 'any KVCache' always succeeds
1024 | guard let imagePixels = input.image?.pixels else {
1025 | // Text-only input
1026 | let convertedCache = cache.compactMap { $0 as? KVCache }
| `- warning: conditional cast from 'any KVCache' to 'any KVCache' always succeeds
1027 | let result = languageModel(
1028 | input.text.tokens, cache: convertedCache, inputEmbedding: nil, mask: nil)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1038:52: warning: conditional cast from 'any KVCache' to 'any KVCache' always succeeds
1036 | )
1037 |
1038 | let convertedCache = cache.compactMap { $0 as? KVCache }
| `- warning: conditional cast from 'any KVCache' to 'any KVCache' always succeeds
1039 | // Use causal masking for text generation
1040 | let maskMode: MLXFast.ScaledDotProductAttentionMaskMode = .causal
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1057:13: warning: initialization of immutable value 'lmHeadKeys' was never used; consider replacing with assignment to '_' or removing it
1055 |
1056 | public func sanitize(weights: [String: MLXArray]) -> [String: MLXArray] {
1057 | let lmHeadKeys = weights.keys.filter { $0.contains("lm_head") }
| `- warning: initialization of immutable value 'lmHeadKeys' was never used; consider replacing with assignment to '_' or removing it
1058 |
1059 | // Also check attention layer structures
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1060:13: warning: initialization of immutable value 'attnKeys' was never used; consider replacing with assignment to '_' or removing it
1058 |
1059 | // Also check attention layer structures
1060 | let attnKeys = weights.keys.filter {
| `- warning: initialization of immutable value 'attnKeys' was never used; consider replacing with assignment to '_' or removing it
1061 | $0.contains("self_attn")
1062 | && ($0.contains("q_proj") || $0.contains("k_proj") || $0.contains("v_proj")
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1099:32: warning: no calls to throwing functions occur within 'try' expression
1097 | let processedImage = MediaProcessing.apply(image, processing: userProcessing)
1098 | let srgbImage = MediaProcessing.inSRGBToneCurveSpace(processedImage)
1099 | let resizedImage = try MediaProcessing.resampleBicubic(srgbImage, to: targetSize)
| `- warning: no calls to throwing functions occur within 'try' expression
1100 | let normalizedImage = MediaProcessing.normalize(
1101 | resizedImage, mean: config.imageMeanTuple, std: config.imageStdTuple)
[481/481] Compiling MLXVLM Qwen25VL.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen25VL.swift:704:24: warning: no calls to throwing functions occur within 'try' expression
702 | }
703 | .map {
704 | return try MediaProcessing.resampleBicubic($0, to: resizedSize)
| `- warning: no calls to throwing functions occur within 'try' expression
705 | }
706 | .map {
Build complete! (68.13s)
Fetching https://github.com/huggingface/swift-transformers
Fetching https://github.com/1024jp/GzipSwift
Fetching https://github.com/ml-explore/mlx-swift
[1/3303] Fetching swift-transformers
[68/4860] Fetching swift-transformers, gzipswift
[1264/15770] Fetching swift-transformers, gzipswift, mlx-swift
Fetched https://github.com/1024jp/GzipSwift from cache (1.44s)
Fetched https://github.com/huggingface/swift-transformers from cache (1.44s)
Fetched https://github.com/ml-explore/mlx-swift from cache (1.44s)
Computing version for https://github.com/1024jp/GzipSwift
Computed https://github.com/1024jp/GzipSwift at 6.0.1 (3.30s)
Computing version for https://github.com/huggingface/swift-transformers
Computed https://github.com/huggingface/swift-transformers at 0.1.21 (0.49s)
Fetching https://github.com/johnmai-dev/Jinja
Fetching https://github.com/apple/swift-argument-parser.git
[1/393] Fetching jinja
Fetched https://github.com/johnmai-dev/Jinja from cache (0.81s)
[1/15380] Fetching swift-argument-parser
Fetched https://github.com/apple/swift-argument-parser.git from cache (1.54s)
Computing version for https://github.com/apple/swift-argument-parser.git
Computed https://github.com/apple/swift-argument-parser.git at 1.4.0 (0.50s)
Computing version for https://github.com/ml-explore/mlx-swift
Computed https://github.com/ml-explore/mlx-swift at 0.25.5 (0.50s)
Fetching https://github.com/apple/swift-numerics
[1/5757] Fetching swift-numerics
Fetched https://github.com/apple/swift-numerics from cache (1.03s)
Computing version for https://github.com/johnmai-dev/Jinja
Computed https://github.com/johnmai-dev/Jinja at 1.1.2 (0.48s)
Fetching https://github.com/apple/swift-collections.git
[1/16650] Fetching swift-collections
Fetched https://github.com/apple/swift-collections.git from cache (1.60s)
Computing version for https://github.com/apple/swift-collections.git
Computed https://github.com/apple/swift-collections.git at 1.2.0 (0.54s)
Computing version for https://github.com/apple/swift-numerics
Computed https://github.com/apple/swift-numerics at 1.0.3 (0.60s)
Creating working copy for https://github.com/huggingface/swift-transformers
Working copy of https://github.com/huggingface/swift-transformers resolved at 0.1.21
Creating working copy for https://github.com/apple/swift-collections.git
Working copy of https://github.com/apple/swift-collections.git resolved at 1.2.0
Creating working copy for https://github.com/apple/swift-argument-parser.git
Working copy of https://github.com/apple/swift-argument-parser.git resolved at 1.4.0
Creating working copy for https://github.com/johnmai-dev/Jinja
Working copy of https://github.com/johnmai-dev/Jinja resolved at 1.1.2
Creating working copy for https://github.com/apple/swift-numerics
Working copy of https://github.com/apple/swift-numerics resolved at 1.0.3
Creating working copy for https://github.com/1024jp/GzipSwift
Working copy of https://github.com/1024jp/GzipSwift resolved at 6.0.1
Creating working copy for https://github.com/ml-explore/mlx-swift
Working copy of https://github.com/ml-explore/mlx-swift resolved at 0.25.5
Build complete.
{
"dependencies" : [
{
"identity" : "mlx-swift",
"requirement" : {
"range" : [
{
"lower_bound" : "0.25.4",
"upper_bound" : "0.26.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/ml-explore/mlx-swift"
},
{
"identity" : "swift-transformers",
"requirement" : {
"range" : [
{
"lower_bound" : "0.1.21",
"upper_bound" : "0.2.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/huggingface/swift-transformers"
},
{
"identity" : "gzipswift",
"requirement" : {
"range" : [
{
"lower_bound" : "6.0.1",
"upper_bound" : "6.0.2"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/1024jp/GzipSwift"
}
],
"manifest_display_name" : "mlx-libraries",
"name" : "mlx-libraries",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "14.0"
},
{
"name" : "ios",
"version" : "16.0"
}
],
"products" : [
{
"name" : "MLXLLM",
"targets" : [
"MLXLLM"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "MLXVLM",
"targets" : [
"MLXVLM"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "MLXLMCommon",
"targets" : [
"MLXLMCommon"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "MLXMNIST",
"targets" : [
"MLXMNIST"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "MLXEmbedders",
"targets" : [
"MLXEmbedders"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "StableDiffusion",
"targets" : [
"StableDiffusion"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "StableDiffusion",
"module_type" : "SwiftTarget",
"name" : "StableDiffusion",
"path" : "Libraries/StableDiffusion",
"product_dependencies" : [
"MLX",
"MLXNN",
"MLXRandom",
"Transformers"
],
"product_memberships" : [
"StableDiffusion"
],
"sources" : [
"Clip.swift",
"Configuration.swift",
"Image.swift",
"Load.swift",
"Sampler.swift",
"StableDiffusion.swift",
"Tokenizer.swift",
"UNet.swift",
"VAE.swift"
],
"type" : "library"
},
{
"c99name" : "MLXVLM",
"module_type" : "SwiftTarget",
"name" : "MLXVLM",
"path" : "Libraries/MLXVLM",
"product_dependencies" : [
"MLX",
"MLXFast",
"MLXNN",
"MLXOptimizers",
"MLXRandom",
"Transformers"
],
"product_memberships" : [
"MLXVLM"
],
"sources" : [
"MediaProcessing.swift",
"Models/Gemma3.swift",
"Models/Idefics3.swift",
"Models/Paligemma.swift",
"Models/Qwen25VL.swift",
"Models/Qwen2VL.swift",
"Models/QwenVL.swift",
"Models/SmolVLM2.swift",
"VLMModel.swift",
"VLMModelFactory.swift"
],
"target_dependencies" : [
"MLXLMCommon"
],
"type" : "library"
},
{
"c99name" : "MLXMNIST",
"module_type" : "SwiftTarget",
"name" : "MLXMNIST",
"path" : "Libraries/MLXMNIST",
"product_dependencies" : [
"MLX",
"MLXFast",
"MLXNN",
"MLXOptimizers",
"MLXRandom",
"Transformers",
"Gzip"
],
"product_memberships" : [
"MLXMNIST"
],
"sources" : [
"Files.swift",
"MNIST.swift",
"Random.swift"
],
"type" : "library"
},
{
"c99name" : "MLXLMTests",
"module_type" : "SwiftTarget",
"name" : "MLXLMTests",
"path" : "Tests/MLXLMTests",
"product_dependencies" : [
"MLX",
"MLXNN",
"MLXOptimizers",
"MLXRandom",
"Transformers"
],
"sources" : [
"BaseConfigurationTests.swift",
"EvalTests.swift",
"StreamlinedTests.swift",
"ToolTests.swift",
"UserInputTests.swift"
],
"target_dependencies" : [
"MLXLMCommon",
"MLXLLM",
"MLXVLM"
],
"type" : "test"
},
{
"c99name" : "MLXLMCommon",
"module_type" : "SwiftTarget",
"name" : "MLXLMCommon",
"path" : "Libraries/MLXLMCommon",
"product_dependencies" : [
"MLX",
"MLXNN",
"MLXOptimizers",
"MLXRandom",
"MLXLinalg",
"Transformers"
],
"product_memberships" : [
"MLXLLM",
"MLXVLM",
"MLXLMCommon"
],
"sources" : [
"Adapters/LoRA/DoRA+Layers.swift",
"Adapters/LoRA/LoRA+Layers.swift",
"Adapters/LoRA/LoRAContainer.swift",
"Adapters/LoRA/LoRAModel.swift",
"Adapters/ModelAdapter.swift",
"Adapters/ModelAdapterFactory.swift",
"Adapters/ModelAdapterTypeRegistry.swift",
"AttentionUtils.swift",
"BaseConfiguration.swift",
"Chat.swift",
"Evaluate.swift",
"Extensions/Encodable+toolResult.swift",
"KVCache.swift",
"LanguageModel.swift",
"Load.swift",
"ModelConfiguration.swift",
"ModelContainer.swift",
"ModelFactory.swift",
"Models/Gemma.swift",
"Module+Extensions.swift",
"Registries/AbstractModelRegistry.swift",
"Registries/ModelTypeRegistry.swift",
"Registries/ProcessorTypeRegistry.swift",
"Streamlined.swift",
"StringOrNumber.swift",
"Tokenizer.swift",
"Tool/Tool.swift",
"Tool/ToolCall.swift",
"Tool/ToolCallProcessor.swift",
"Tool/ToolParameter.swift",
"Tool/Value.swift",
"UserInput.swift"
],
"type" : "library"
},
{
"c99name" : "MLXLLM",
"module_type" : "SwiftTarget",
"name" : "MLXLLM",
"path" : "Libraries/MLXLLM",
"product_dependencies" : [
"MLX",
"MLXFast",
"MLXNN",
"MLXOptimizers",
"MLXRandom",
"Transformers"
],
"product_memberships" : [
"MLXLLM"
],
"sources" : [
"LLMModel.swift",
"LLMModelFactory.swift",
"Lora+Data.swift",
"LoraTrain.swift",
"Models/Cohere.swift",
"Models/GLM4.swift",
"Models/Gemma.swift",
"Models/Gemma2.swift",
"Models/Gemma3Text.swift",
"Models/Granite.swift",
"Models/Internlm2.swift",
"Models/Llama.swift",
"Models/MiMo.swift",
"Models/OpenELM.swift",
"Models/Phi.swift",
"Models/Phi3.swift",
"Models/PhiMoE.swift",
"Models/Qwen2.swift",
"Models/Qwen3.swift",
"Models/Qwen3MoE.swift",
"Models/Starcoder2.swift",
"SuScaledRotaryEmbedding.swift",
"SwitchLayers.swift"
],
"target_dependencies" : [
"MLXLMCommon"
],
"type" : "library"
},
{
"c99name" : "MLXEmbedders",
"module_type" : "SwiftTarget",
"name" : "MLXEmbedders",
"path" : "Libraries/Embedders",
"product_dependencies" : [
"MLX",
"MLXFast",
"MLXNN",
"Transformers",
"MLXLinalg"
],
"product_memberships" : [
"MLXEmbedders"
],
"sources" : [
"BaseConfiguration.swift",
"Bert.swift",
"Configuration.swift",
"EmbeddingModel.swift",
"Load.swift",
"Models.swift",
"NomicBert.swift",
"Pooling.swift",
"Tokenizer.swift"
],
"type" : "library"
}
],
"tools_version" : "5.9"
}
Done.