Build Information
Successful build of mlx-libraries, reference 2.29.1 (9bff95), with Swift 6.4 for macOS (SPM) on 23 Sep 2026 05:24:45 UTC.
Swift 6 data race errors: 0
Build Command
env DEVELOPER_DIR=/Applications/Xcode-27.0.0-Release.Candidate.app xcrun swift build --arch arm64Build Log
[0;36m18 |[0;0m
[0;36m19 |[0;0m /// The name of the tool extracted from the schema
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Tool/ToolCallProcessor.swift:24:24: [1;33mwarning: [1;39mstatic property 'toolCallRegex' is not concurrency-safe because non-'Sendable' type 'Regex<(Substring, Substring)>' may have shared mutable state; this is an error in the Swift 6 language mode[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
[0;36m22 |[0;0m private static let toolUseEndTag = "</tool_call>"
[0;36m23 |[0;0m
[0;36m24 |[0;0m private static let toolCallRegex = #/<tool_call>\s*(\{.*?\})\s*<\/tool_call>/#
[0;36m|[0;0m |- [1;33mwarning: [1;39mstatic property 'toolCallRegex' is not concurrency-safe because non-'Sendable' type 'Regex<(Substring, Substring)>' may have shared mutable state; this is an error in the Swift 6 language mode[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
[0;36m|[0;0m |- [1;39mnote: [1;39madd '@MainActor' to make static property 'toolCallRegex' part of global actor 'MainActor'[0;0m
[0;36m|[0;0m `- [1;39mnote: [1;39mdisable concurrency-safety checks if accesses are protected by an external synchronization mechanism[0;0m
[0;36m25 |[0;0m
[0;36m26 |[0;0m /// The current parsed tool call, if any
_StringProcessing.Regex:2:15: [1;39mnote: [1;39mgeneric struct 'Regex' does not conform to the 'Sendable' protocol[0;0m
[0;36m1 |[0;0m @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
[0;36m2 |[0;0m public struct Regex<Output> : RegexComponent {
[0;36m|[0;0m `- [1;39mnote: [1;39mgeneric struct 'Regex' does not conform to the 'Sendable' protocol[0;0m
[0;36m3 |[0;0m public var regex: Regex<Output> { get }
[0;36m4 |[0;0m @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 9.0, *)
[#MutableGlobalVariable]: <https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/LoRA/LoRAContainer.swift:72:16: [1;33mwarning: [1;39mstored property 'configuration' of 'Sendable'-conforming struct 'LoRAContainer' has non-Sendable type 'LoRAConfiguration'; this is an error in the Swift 6 language mode[0;0m
[0;36m25 |[0;0m /// }
[0;36m26 |[0;0m /// ```
[0;36m27 |[0;0m public struct LoRAConfiguration: Codable {
[0;36m|[0;0m `- [1;39mnote: [1;39mconsider making struct 'LoRAConfiguration' conform to the 'Sendable' protocol[0;0m
[0;36m28 |[0;0m
[0;36m29 |[0;0m public enum FineTuneType: String, Codable {
[0;36m:[0;0m
[0;36m70 |[0;0m
[0;36m71 |[0;0m /// The configuration used to construct this adapter container.
[0;36m72 |[0;0m public let configuration: LoRAConfiguration
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'configuration' of 'Sendable'-conforming struct 'LoRAContainer' has non-Sendable type 'LoRAConfiguration'; this is an error in the Swift 6 language mode[0;0m
[0;36m73 |[0;0m /// The parameter values for the adapter modules.
[0;36m74 |[0;0m public let parameters: ModuleParameters
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/LoRA/LoRAContainer.swift:74:16: [1;33mwarning: [1;39mstored property 'parameters' of 'Sendable'-conforming struct 'LoRAContainer' contains non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m72 |[0;0m public let configuration: LoRAConfiguration
[0;36m73 |[0;0m /// The parameter values for the adapter modules.
[0;36m74 |[0;0m public let parameters: ModuleParameters
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'parameters' of 'Sendable'-conforming struct 'LoRAContainer' contains non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m75 |[0;0m
[0;36m76 |[0;0m public init(
MLX.MLXArray:1:20: [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m1 |[0;0m final public class MLXArray {
[0;36m|[0;0m `- [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m2 |[0;0m public package(set) var ctx: mlx_array { get }
[0;36m3 |[0;0m public init(_ ctx: consuming mlx_array)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/LoRA/LoRAContainer.swift:9:1: [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m7 |[0;0m
[0;36m8 |[0;0m import Foundation
[0;36m9 |[0;0m import MLX
[0;36m|[0;0m `- [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m10 |[0;0m import MLXNN
[0;36m11 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:43:35: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races[0;0m
[0;36m41 |[0;0m public static let shared = ModelAdapterFactory(
[0;36m42 |[0;0m registry: ModelAdapterTypeRegistry(creators: [
[0;36m43 |[0;0m "lora": LoRAContainer.from(directory:),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races[0;0m
[0;36m44 |[0;0m "dora": LoRAContainer.from(directory:),
[0;36m45 |[0;0m ])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:44:35: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races[0;0m
[0;36m42 |[0;0m registry: ModelAdapterTypeRegistry(creators: [
[0;36m43 |[0;0m "lora": LoRAContainer.from(directory:),
[0;36m44 |[0;0m "dora": LoRAContainer.from(directory:),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any ModelAdapter' may introduce data races[0;0m
[0;36m45 |[0;0m ])
[0;36m46 |[0;0m )
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/ModelAdapterFactory.swift:41:23: [1;33mwarning: [1;39mstatic 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[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
[0;36m36 |[0;0m
[0;36m37 |[0;0m /// A factory responsible for loading and creating model adapters from hub configurations.
[0;36m38 |[0;0m public final class ModelAdapterFactory {
[0;36m|[0;0m `- [1;39mnote: [1;39mclass 'ModelAdapterFactory' does not conform to the 'Sendable' protocol[0;0m
[0;36m39 |[0;0m
[0;36m40 |[0;0m /// Shared instance of the adapter factory.
[0;36m41 |[0;0m public static let shared = ModelAdapterFactory(
[0;36m|[0;0m |- [1;33mwarning: [1;39mstatic 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[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
[0;36m|[0;0m |- [1;39mnote: [1;39madd '@MainActor' to make static property 'shared' part of global actor 'MainActor'[0;0m
[0;36m|[0;0m `- [1;39mnote: [1;39mdisable concurrency-safety checks if accesses are protected by an external synchronization mechanism[0;0m
[0;36m42 |[0;0m registry: ModelAdapterTypeRegistry(creators: [
[0;36m43 |[0;0m "lora": LoRAContainer.from(directory:),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Evaluate.swift:138:9: [1;33mwarning: [1;39mstored property 'temp' of 'Sendable'-conforming struct 'TopPSampler' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m136 |[0;0m /// Sampler that uses `topP` and `temperature` to sample the logits.
[0;36m137 |[0;0m public struct TopPSampler: LogitSampler {
[0;36m138 |[0;0m let temp: MLXArray
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'temp' of 'Sendable'-conforming struct 'TopPSampler' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m139 |[0;0m let topP: MLXArray
[0;36m140 |[0;0m let randomState: MLXRandom.RandomState
MLX.MLXArray:1:20: [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m1 |[0;0m final public class MLXArray {
[0;36m|[0;0m `- [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m2 |[0;0m public package(set) var ctx: mlx_array { get }
[0;36m3 |[0;0m public init(_ ctx: consuming mlx_array)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Evaluate.swift:4:1: [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m2 |[0;0m
[0;36m3 |[0;0m import Foundation
[0;36m4 |[0;0m import MLX
[0;36m|[0;0m `- [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m5 |[0;0m import Tokenizers
[0;36m6 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Evaluate.swift:139:9: [1;33mwarning: [1;39mstored property 'topP' of 'Sendable'-conforming struct 'TopPSampler' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m137 |[0;0m public struct TopPSampler: LogitSampler {
[0;36m138 |[0;0m let temp: MLXArray
[0;36m139 |[0;0m let topP: MLXArray
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'topP' of 'Sendable'-conforming struct 'TopPSampler' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m140 |[0;0m let randomState: MLXRandom.RandomState
[0;36m141 |[0;0m
MLX.MLXArray:1:20: [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m1 |[0;0m final public class MLXArray {
[0;36m|[0;0m `- [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m2 |[0;0m public package(set) var ctx: mlx_array { get }
[0;36m3 |[0;0m public init(_ ctx: consuming mlx_array)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Evaluate.swift:174:9: [1;33mwarning: [1;39mstored property 'temp' of 'Sendable'-conforming struct 'CategoricalSampler' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m172 |[0;0m /// Processor that uses `temperature` to sample the logits
[0;36m173 |[0;0m public struct CategoricalSampler: LogitSampler {
[0;36m174 |[0;0m let temp: MLXArray
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'temp' of 'Sendable'-conforming struct 'CategoricalSampler' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m175 |[0;0m let randomState: MLXRandom.RandomState
[0;36m176 |[0;0m
MLX.MLXArray:1:20: [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m1 |[0;0m final public class MLXArray {
[0;36m|[0;0m `- [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m2 |[0;0m public package(set) var ctx: mlx_array { get }
[0;36m3 |[0;0m public init(_ ctx: consuming mlx_array)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Evaluate.swift:465:16: [1;33mwarning: [1;39mstored property 'inputText' of 'Sendable'-conforming struct 'GenerateResult' has non-Sendable type 'LMInput.Text'; this is an error in the Swift 6 language mode[0;0m
[0;36m463 |[0;0m
[0;36m464 |[0;0m /// input (prompt, images, etc.)
[0;36m465 |[0;0m public let inputText: LMInput.Text
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'inputText' of 'Sendable'-conforming struct 'GenerateResult' has non-Sendable type 'LMInput.Text'; this is an error in the Swift 6 language mode[0;0m
[0;36m466 |[0;0m
[0;36m467 |[0;0m @available(*, deprecated, message: "use inputText")
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/LanguageModel.swift:43:19: [1;39mnote: [1;39mconsider making struct 'Text' conform to the 'Sendable' protocol[0;0m
[0;36m41 |[0;0m
[0;36m42 |[0;0m /// Representation of tokenized input text.
[0;36m43 |[0;0m public struct Text {
[0;36m|[0;0m `- [1;39mnote: [1;39mconsider making struct 'Text' conform to the 'Sendable' protocol[0;0m
[0;36m44 |[0;0m
[0;36m45 |[0;0m /// input token array
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/ModelFactory.swift:125:12: [1;33mwarning: [1;39mvar 'defaultHubApi' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
[0;36m123 |[0;0m
[0;36m124 |[0;0m /// Default instance of HubApi to use. This is configured to save downloads into the caches directory.
[0;36m125 |[0;0m public var defaultHubApi: HubApi = {
[0;36m|[0;0m |- [1;33mwarning: [1;39mvar 'defaultHubApi' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
[0;36m|[0;0m |- [1;39mnote: [1;39mconvert 'defaultHubApi' to a 'let' constant to make 'Sendable' shared state immutable[0;0m
[0;36m|[0;0m |- [1;39mnote: [1;39madd '@MainActor' to make var 'defaultHubApi' part of global actor 'MainActor'[0;0m
[0;36m|[0;0m `- [1;39mnote: [1;39mdisable concurrency-safety checks if accesses are protected by an external synchronization mechanism[0;0m
[0;36m126 |[0;0m HubApi(downloadBase: FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first)
[0;36m127 |[0;0m }()
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:160:58: [1;33mwarning: [1;39minitializer '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[0;0m
[0;36m158 |[0;0m _ model: ModelContainer, instructions: String? = nil,
[0;36m159 |[0;0m generateParameters: GenerateParameters = .init(),
[0;36m160 |[0;0m processing: UserInput.Processing = .init(resize: CGSize(width: 512, height: 512))
[0;36m|[0;0m |- [1;33mwarning: [1;39minitializer '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[0;0m
[0;36m|[0;0m `- [1;39mnote: [1;39mThe missing import of module 'CoreGraphics' will be added implicitly[0;0m
[0;36m161 |[0;0m ) {
[0;36m162 |[0;0m self.generator = .init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:177:58: [1;33mwarning: [1;39minitializer '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[0;0m
[0;36m175 |[0;0m _ model: ModelContext, instructions: String? = nil,
[0;36m176 |[0;0m generateParameters: GenerateParameters = .init(),
[0;36m177 |[0;0m processing: UserInput.Processing = .init(resize: CGSize(width: 512, height: 512))
[0;36m|[0;0m |- [1;33mwarning: [1;39minitializer '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[0;0m
[0;36m|[0;0m `- [1;39mnote: [1;39mThe missing import of module 'CoreGraphics' will be added implicitly[0;0m
[0;36m178 |[0;0m ) {
[0;36m179 |[0;0m self.generator = .init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Tool/Tool.swift:14:16: [1;33mwarning: [1;39mstored property 'schema' of 'Sendable'-conforming generic struct 'Tool' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m12 |[0;0m public struct Tool<Input: Codable, Output: Codable>: ToolProtocol {
[0;36m13 |[0;0m /// The JSON Schema describing the tool's interface.
[0;36m14 |[0;0m public let schema: ToolSpec
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'schema' of 'Sendable'-conforming generic struct 'Tool' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m15 |[0;0m
[0;36m16 |[0;0m /// The handler for the tool.
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Tool/Tool.swift:17:16: [1;33mwarning: [1;39mstored property 'handler' of 'Sendable'-conforming generic struct 'Tool' has non-Sendable type '(Input) async throws -> Output'; this is an error in the Swift 6 language mode[0;0m
[0;36m15 |[0;0m
[0;36m16 |[0;0m /// The handler for the tool.
[0;36m17 |[0;0m public let handler: (Input) async throws -> Output
[0;36m|[0;0m |- [1;33mwarning: [1;39mstored property 'handler' of 'Sendable'-conforming generic struct 'Tool' has non-Sendable type '(Input) async throws -> Output'; this is an error in the Swift 6 language mode[0;0m
[0;36m|[0;0m `- [1;39mnote: [1;39ma function type must be marked '@Sendable' to conform to 'Sendable'[0;0m
[0;36m18 |[0;0m
[0;36m19 |[0;0m /// The name of the tool extracted from the schema
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Tool/ToolCallProcessor.swift:24:24: [1;33mwarning: [1;39mstatic property 'toolCallRegex' is not concurrency-safe because non-'Sendable' type 'Regex<(Substring, Substring)>' may have shared mutable state; this is an error in the Swift 6 language mode[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
[0;36m22 |[0;0m private static let toolUseEndTag = "</tool_call>"
[0;36m23 |[0;0m
[0;36m24 |[0;0m private static let toolCallRegex = #/<tool_call>\s*(\{.*?\})\s*<\/tool_call>/#
[0;36m|[0;0m |- [1;33mwarning: [1;39mstatic property 'toolCallRegex' is not concurrency-safe because non-'Sendable' type 'Regex<(Substring, Substring)>' may have shared mutable state; this is an error in the Swift 6 language mode[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
[0;36m|[0;0m |- [1;39mnote: [1;39madd '@MainActor' to make static property 'toolCallRegex' part of global actor 'MainActor'[0;0m
[0;36m|[0;0m `- [1;39mnote: [1;39mdisable concurrency-safety checks if accesses are protected by an external synchronization mechanism[0;0m
[0;36m25 |[0;0m
[0;36m26 |[0;0m /// The current parsed tool call, if any
_StringProcessing.Regex:2:15: [1;39mnote: [1;39mgeneric struct 'Regex' does not conform to the 'Sendable' protocol[0;0m
[0;36m1 |[0;0m @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
[0;36m2 |[0;0m public struct Regex<Output> : RegexComponent {
[0;36m|[0;0m `- [1;39mnote: [1;39mgeneric struct 'Regex' does not conform to the 'Sendable' protocol[0;0m
[0;36m3 |[0;0m public var regex: Regex<Output> { get }
[0;36m4 |[0;0m @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 9.0, *)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:26:14: [1;33mwarning: [1;39massociated value 'messages' of 'Sendable'-conforming enum 'Prompt' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m24 |[0;0m
[0;36m25 |[0;0m /// model specific array of dictionaries
[0;36m26 |[0;0m case messages([Message])
[0;36m|[0;0m `- [1;33mwarning: [1;39massociated value 'messages' of 'Sendable'-conforming enum 'Prompt' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m27 |[0;0m
[0;36m28 |[0;0m /// model agnostic structured chat (series of messages)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:29:14: [1;33mwarning: [1;39massociated value 'chat' of 'Sendable'-conforming enum 'Prompt' contains non-Sendable type 'Chat.Message'; this is an error in the Swift 6 language mode[0;0m
[0;36m27 |[0;0m
[0;36m28 |[0;0m /// model agnostic structured chat (series of messages)
[0;36m29 |[0;0m case chat([Chat.Message])
[0;36m|[0;0m `- [1;33mwarning: [1;39massociated value 'chat' of 'Sendable'-conforming enum 'Prompt' contains non-Sendable type 'Chat.Message'; this is an error in the Swift 6 language mode[0;0m
[0;36m30 |[0;0m
[0;36m31 |[0;0m public var description: String {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Chat.swift:4:19: [1;39mnote: [1;39mconsider making struct 'Message' conform to the 'Sendable' protocol[0;0m
[0;36m2 |[0;0m
[0;36m3 |[0;0m public enum Chat {
[0;36m4 |[0;0m public struct Message {
[0;36m|[0;0m `- [1;39mnote: [1;39mconsider making struct 'Message' conform to the 'Sendable' protocol[0;0m
[0;36m5 |[0;0m /// The role of the message sender.
[0;36m6 |[0;0m public var role: Role
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:45:14: [1;33mwarning: [1;39massociated value 'avAsset' of 'Sendable'-conforming enum 'Video' has non-Sendable type 'AVAsset'; this is an error in the Swift 6 language mode[0;0m
[0;36m43 |[0;0m /// Representation of a video resource.
[0;36m44 |[0;0m public enum Video: Sendable {
[0;36m45 |[0;0m case avAsset(AVAsset)
[0;36m|[0;0m `- [1;33mwarning: [1;39massociated value 'avAsset' of 'Sendable'-conforming enum 'Video' has non-Sendable type 'AVAsset'; this is an error in the Swift 6 language mode[0;0m
[0;36m46 |[0;0m case url(URL)
[0;36m47 |[0;0m
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAsset.h:56:12: [1;39mnote: [1;39mclass 'AVAsset' does not conform to the 'Sendable' protocol[0;0m
[0;36m54 |[0;0m /// AVAssets can also be inserted into AVMutableCompositions in order to assemble audiovisual constructs from one or more source assets.
[0;36m55 |[0;0m API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), watchos(1.0), visionos(1.0))
[0;36m56 |[0;0m @interface AVAsset : NSObject <NSCopying, AVAsynchronousKeyValueLoading>
[0;36m|[0;0m `- [1;39mnote: [1;39mclass 'AVAsset' does not conform to the 'Sendable' protocol[0;0m
[0;36m57 |[0;0m {
[0;36m58 |[0;0m @private
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:3:1: [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m1 |[0;0m // Copyright © 2024 Apple Inc.
[0;36m2 |[0;0m
[0;36m3 |[0;0m import AVFoundation
[0;36m|[0;0m `- [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m4 |[0;0m import CoreImage
[0;36m5 |[0;0m import Foundation
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:62:14: [1;33mwarning: [1;39massociated value 'array' of 'Sendable'-conforming enum 'Image' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m60 |[0;0m case ciImage(CIImage)
[0;36m61 |[0;0m case url(URL)
[0;36m62 |[0;0m case array(MLXArray)
[0;36m|[0;0m `- [1;33mwarning: [1;39massociated value 'array' of 'Sendable'-conforming enum 'Image' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m63 |[0;0m
[0;36m64 |[0;0m public func asCIImage() throws -> CIImage {
MLX.MLXArray:1:20: [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m1 |[0;0m final public class MLXArray {
[0;36m|[0;0m `- [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m2 |[0;0m public package(set) var ctx: mlx_array { get }
[0;36m3 |[0;0m public init(_ ctx: consuming mlx_array)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:6:1: [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m4 |[0;0m import CoreImage
[0;36m5 |[0;0m import Foundation
[0;36m6 |[0;0m import MLX
[0;36m|[0;0m `- [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m7 |[0;0m import Tokenizers
[0;36m8 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:162:16: [1;33mwarning: [1;39mstored property 'tools' of 'Sendable'-conforming struct 'UserInput' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m160 |[0;0m public var videos = [Video]()
[0;36m161 |[0;0m
[0;36m162 |[0;0m public var tools: [ToolSpec]?
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'tools' of 'Sendable'-conforming struct 'UserInput' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m163 |[0;0m
[0;36m164 |[0;0m /// Additional values provided for the chat template rendering context
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:165:16: [1;33mwarning: [1;39mstored property 'additionalContext' of 'Sendable'-conforming struct 'UserInput' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m163 |[0;0m
[0;36m164 |[0;0m /// Additional values provided for the chat template rendering context
[0;36m165 |[0;0m public var additionalContext: [String: Any]?
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'additionalContext' of 'Sendable'-conforming struct 'UserInput' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m166 |[0;0m public var processing: Processing = .init()
[0;36m167 |[0;0m
[#AddPreconcurrencyImport]: <https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import>
[#MutableGlobalVariable]: <https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:160:58: [1;33mwarning: [1;39minitializer '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[0;0m
[0;36m158 |[0;0m _ model: ModelContainer, instructions: String? = nil,
[0;36m159 |[0;0m generateParameters: GenerateParameters = .init(),
[0;36m160 |[0;0m processing: UserInput.Processing = .init(resize: CGSize(width: 512, height: 512))
[0;36m|[0;0m |- [1;33mwarning: [1;39minitializer '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[0;0m
[0;36m|[0;0m `- [1;39mnote: [1;39mThe missing import of module 'CoreGraphics' will be added implicitly[0;0m
[0;36m161 |[0;0m ) {
[0;36m162 |[0;0m self.generator = .init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:177:58: [1;33mwarning: [1;39minitializer '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[0;0m
[0;36m175 |[0;0m _ model: ModelContext, instructions: String? = nil,
[0;36m176 |[0;0m generateParameters: GenerateParameters = .init(),
[0;36m177 |[0;0m processing: UserInput.Processing = .init(resize: CGSize(width: 512, height: 512))
[0;36m|[0;0m |- [1;33mwarning: [1;39minitializer '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[0;0m
[0;36m|[0;0m `- [1;39mnote: [1;39mThe missing import of module 'CoreGraphics' will be added implicitly[0;0m
[0;36m178 |[0;0m ) {
[0;36m179 |[0;0m self.generator = .init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:78:27: [1;33mwarning: [1;39mcapture 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[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
[0;36m76 |[0;0m case .container(let container):
[0;36m77 |[0;0m return try await container.perform { context in
[0;36m78 |[0;0m try await generate(context: context)
[0;36m|[0;0m |- [1;33mwarning: [1;39mcapture 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[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
[0;36m|[0;0m `- [1;39mnote: [1;39ma function type must be marked '@Sendable' to conform to 'Sendable'[0;0m
[0;36m79 |[0;0m }
[0;36m80 |[0;0m case .context(let context):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:53:14: [1;33mwarning: [1;39mconcurrently-executed local function 'generate(context:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode[0;0m
[0;36m51 |[0;0m
[0;36m52 |[0;0m func generate() async throws -> String {
[0;36m53 |[0;0m func generate(context: ModelContext) async throws -> String {
[0;36m|[0;0m `- [1;33mwarning: [1;39mconcurrently-executed local function 'generate(context:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode[0;0m
[0;36m54 |[0;0m // prepare the input -- first the structured messages,
[0;36m55 |[0;0m // next the tokens
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:122:31: [1;33mwarning: [1;39mcapture 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[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
[0;36m120 |[0;0m case .container(let container):
[0;36m121 |[0;0m await container.perform { context in
[0;36m122 |[0;0m await stream(context: context, continuation: continuation)
[0;36m|[0;0m |- [1;33mwarning: [1;39mcapture 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[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
[0;36m|[0;0m `- [1;39mnote: [1;39ma function type must be marked '@Sendable' to conform to 'Sendable'[0;0m
[0;36m123 |[0;0m }
[0;36m124 |[0;0m case .context(let context):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:86:14: [1;33mwarning: [1;39mconcurrently-executed local function 'stream(context:continuation:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode[0;0m
[0;36m84 |[0;0m
[0;36m85 |[0;0m func stream() -> AsyncThrowingStream<String, Error> {
[0;36m86 |[0;0m func stream(
[0;36m|[0;0m `- [1;33mwarning: [1;39mconcurrently-executed local function 'stream(context:continuation:)' must be marked as '@Sendable'; this is an error in the Swift 6 language mode[0;0m
[0;36m87 |[0;0m context: ModelContext,
[0;36m88 |[0;0m continuation: AsyncThrowingStream<String, Error>.Continuation
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:54:26: [1;33mwarning: [1;39mimmutable value 'string' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m52 |[0;0m public func asInts() -> [Int]? {
[0;36m53 |[0;0m switch self {
[0;36m54 |[0;0m case .string(let string): nil
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'string' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m55 |[0;0m case .int(let v): [v]
[0;36m56 |[0;0m case .float(let float): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:56:25: [1;33mwarning: [1;39mimmutable value 'float' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m54 |[0;0m case .string(let string): nil
[0;36m55 |[0;0m case .int(let v): [v]
[0;36m56 |[0;0m case .float(let float): nil
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'float' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m57 |[0;0m case .ints(let array): array
[0;36m58 |[0;0m case .floats(let array): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:58:26: [1;33mwarning: [1;39mimmutable value 'array' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m56 |[0;0m case .float(let float): nil
[0;36m57 |[0;0m case .ints(let array): array
[0;36m58 |[0;0m case .floats(let array): nil
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'array' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m59 |[0;0m case .bool(let bool): nil
[0;36m60 |[0;0m }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:59:24: [1;33mwarning: [1;39mimmutable value 'bool' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m57 |[0;0m case .ints(let array): array
[0;36m58 |[0;0m case .floats(let array): nil
[0;36m59 |[0;0m case .bool(let bool): nil
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'bool' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m60 |[0;0m }
[0;36m61 |[0;0m }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:68:26: [1;33mwarning: [1;39mimmutable value 'string' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m66 |[0;0m public func asInt() -> Int? {
[0;36m67 |[0;0m switch self {
[0;36m68 |[0;0m case .string(let string): nil
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'string' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m69 |[0;0m case .int(let v): v
[0;36m70 |[0;0m case .float(let float): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:70:25: [1;33mwarning: [1;39mimmutable value 'float' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m68 |[0;0m case .string(let string): nil
[0;36m69 |[0;0m case .int(let v): v
[0;36m70 |[0;0m case .float(let float): nil
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'float' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m71 |[0;0m case .ints(let array): array.count == 1 ? array[0] : nil
[0;36m72 |[0;0m case .floats(let array): nil
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:72:26: [1;33mwarning: [1;39mimmutable value 'array' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m70 |[0;0m case .float(let float): nil
[0;36m71 |[0;0m case .ints(let array): array.count == 1 ? array[0] : nil
[0;36m72 |[0;0m case .floats(let array): nil
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'array' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m73 |[0;0m case .bool(let bool): bool ? 1 : 0
[0;36m74 |[0;0m }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:82:26: [1;33mwarning: [1;39mimmutable value 'string' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m80 |[0;0m public func asFloats() -> [Float]? {
[0;36m81 |[0;0m switch self {
[0;36m82 |[0;0m case .string(let string): nil
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'string' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m83 |[0;0m case .int(let v): [Float(v)]
[0;36m84 |[0;0m case .float(let float): [float]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/StringOrNumber.swift:96:26: [1;33mwarning: [1;39mimmutable value 'string' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m94 |[0;0m public func asFloat() -> Float? {
[0;36m95 |[0;0m switch self {
[0;36m96 |[0;0m case .string(let string): nil
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'string' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m97 |[0;0m case .int(let v): Float(v)
[0;36m98 |[0;0m case .float(let float): float
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Streamlined.swift:118:13: [1;33mwarning: [1;39mpassing closure as a 'sending' parameter risks causing data races between code in the current isolation context and concurrent execution of the closure; this is an error in the Swift 6 language mode[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-closure-risks-data-race\SendingClosureRisksDataRace]8;;\]
[0;36m91 |[0;0m // prepare the input -- first the structured messages,
[0;36m92 |[0;0m // next the tokens
[0;36m93 |[0;0m let userInput = UserInput(chat: messages, processing: processing)
[0;36m|[0;0m `- [1;39mnote: [1;39mclosure captures 'self' which is accessible to code in the current isolation context[0;0m
[0;36m94 |[0;0m let input = try await context.processor.prepare(input: userInput)
[0;36m95 |[0;0m
[0;36m:[0;0m
[0;36m116 |[0;0m
[0;36m117 |[0;0m return AsyncThrowingStream { continuation in
[0;36m118 |[0;0m Task { [model, continuation] in
[0;36m|[0;0m `- [1;33mwarning: [1;39mpassing closure as a 'sending' parameter risks causing data races between code in the current isolation context and concurrent execution of the closure; this is an error in the Swift 6 language mode[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-closure-risks-data-race\SendingClosureRisksDataRace]8;;\]
[0;36m119 |[0;0m switch model {
[0;36m120 |[0;0m case .container(let container):
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
[#RegionIsolation]: <https://docs.swift.org/compiler/documentation/diagnostics/region-isolation>
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendingClosureRisksDataRace]: <https://docs.swift.org/compiler/documentation/diagnostics/sending-closure-risks-data-race>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/LoRA/LoRAContainer.swift:72:16: [1;33mwarning: [1;39mstored property 'configuration' of 'Sendable'-conforming struct 'LoRAContainer' has non-Sendable type 'LoRAConfiguration'; this is an error in the Swift 6 language mode[0;0m
[0;36m25 |[0;0m /// }
[0;36m26 |[0;0m /// ```
[0;36m27 |[0;0m public struct LoRAConfiguration: Codable {
[0;36m|[0;0m `- [1;39mnote: [1;39mconsider making struct 'LoRAConfiguration' conform to the 'Sendable' protocol[0;0m
[0;36m28 |[0;0m
[0;36m29 |[0;0m public enum FineTuneType: String, Codable {
[0;36m:[0;0m
[0;36m70 |[0;0m
[0;36m71 |[0;0m /// The configuration used to construct this adapter container.
[0;36m72 |[0;0m public let configuration: LoRAConfiguration
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'configuration' of 'Sendable'-conforming struct 'LoRAContainer' has non-Sendable type 'LoRAConfiguration'; this is an error in the Swift 6 language mode[0;0m
[0;36m73 |[0;0m /// The parameter values for the adapter modules.
[0;36m74 |[0;0m public let parameters: ModuleParameters
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/LoRA/LoRAContainer.swift:74:16: [1;33mwarning: [1;39mstored property 'parameters' of 'Sendable'-conforming struct 'LoRAContainer' contains non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m72 |[0;0m public let configuration: LoRAConfiguration
[0;36m73 |[0;0m /// The parameter values for the adapter modules.
[0;36m74 |[0;0m public let parameters: ModuleParameters
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'parameters' of 'Sendable'-conforming struct 'LoRAContainer' contains non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m75 |[0;0m
[0;36m76 |[0;0m public init(
MLX.MLXArray:1:20: [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m1 |[0;0m final public class MLXArray {
[0;36m|[0;0m `- [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m2 |[0;0m public package(set) var ctx: mlx_array { get }
[0;36m3 |[0;0m public init(_ ctx: consuming mlx_array)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/LoRA/LoRAContainer.swift:9:1: [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m7 |[0;0m
[0;36m8 |[0;0m import Foundation
[0;36m9 |[0;0m import MLX
[0;36m|[0;0m `- [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m10 |[0;0m import MLXNN
[0;36m11 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Adapters/LoRA/LoRAContainer.swift:95:9: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m93 |[0;0m }
[0;36m94 |[0;0m
[0;36m95 |[0;0m try model.freeze()
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m96 |[0;0m let layers = lora.loraLinearLayers(configuration.numLayers)
[0;36m97 |[0;0m replaceLayers(layers: layers) { (layer: Module) in
[#AddPreconcurrencyImport]: <https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import>
[#UnnecessaryEffectMarker]: <https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Evaluate.swift:138:9: [1;33mwarning: [1;39mstored property 'temp' of 'Sendable'-conforming struct 'TopPSampler' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m136 |[0;0m /// Sampler that uses `topP` and `temperature` to sample the logits.
[0;36m137 |[0;0m public struct TopPSampler: LogitSampler {
[0;36m138 |[0;0m let temp: MLXArray
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'temp' of 'Sendable'-conforming struct 'TopPSampler' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m139 |[0;0m let topP: MLXArray
[0;36m140 |[0;0m let randomState: MLXRandom.RandomState
MLX.MLXArray:1:20: [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m1 |[0;0m final public class MLXArray {
[0;36m|[0;0m `- [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m2 |[0;0m public package(set) var ctx: mlx_array { get }
[0;36m3 |[0;0m public init(_ ctx: consuming mlx_array)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Evaluate.swift:4:1: [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m2 |[0;0m
[0;36m3 |[0;0m import Foundation
[0;36m4 |[0;0m import MLX
[0;36m|[0;0m `- [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m5 |[0;0m import Tokenizers
[0;36m6 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Evaluate.swift:139:9: [1;33mwarning: [1;39mstored property 'topP' of 'Sendable'-conforming struct 'TopPSampler' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m137 |[0;0m public struct TopPSampler: LogitSampler {
[0;36m138 |[0;0m let temp: MLXArray
[0;36m139 |[0;0m let topP: MLXArray
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'topP' of 'Sendable'-conforming struct 'TopPSampler' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m140 |[0;0m let randomState: MLXRandom.RandomState
[0;36m141 |[0;0m
MLX.MLXArray:1:20: [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m1 |[0;0m final public class MLXArray {
[0;36m|[0;0m `- [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m2 |[0;0m public package(set) var ctx: mlx_array { get }
[0;36m3 |[0;0m public init(_ ctx: consuming mlx_array)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Evaluate.swift:174:9: [1;33mwarning: [1;39mstored property 'temp' of 'Sendable'-conforming struct 'CategoricalSampler' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m172 |[0;0m /// Processor that uses `temperature` to sample the logits
[0;36m173 |[0;0m public struct CategoricalSampler: LogitSampler {
[0;36m174 |[0;0m let temp: MLXArray
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'temp' of 'Sendable'-conforming struct 'CategoricalSampler' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m175 |[0;0m let randomState: MLXRandom.RandomState
[0;36m176 |[0;0m
MLX.MLXArray:1:20: [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m1 |[0;0m final public class MLXArray {
[0;36m|[0;0m `- [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m2 |[0;0m public package(set) var ctx: mlx_array { get }
[0;36m3 |[0;0m public init(_ ctx: consuming mlx_array)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Evaluate.swift:465:16: [1;33mwarning: [1;39mstored property 'inputText' of 'Sendable'-conforming struct 'GenerateResult' has non-Sendable type 'LMInput.Text'; this is an error in the Swift 6 language mode[0;0m
[0;36m463 |[0;0m
[0;36m464 |[0;0m /// input (prompt, images, etc.)
[0;36m465 |[0;0m public let inputText: LMInput.Text
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'inputText' of 'Sendable'-conforming struct 'GenerateResult' has non-Sendable type 'LMInput.Text'; this is an error in the Swift 6 language mode[0;0m
[0;36m466 |[0;0m
[0;36m467 |[0;0m @available(*, deprecated, message: "use inputText")
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/LanguageModel.swift:43:19: [1;39mnote: [1;39mconsider making struct 'Text' conform to the 'Sendable' protocol[0;0m
[0;36m41 |[0;0m
[0;36m42 |[0;0m /// Representation of tokenized input text.
[0;36m43 |[0;0m public struct Text {
[0;36m|[0;0m `- [1;39mnote: [1;39mconsider making struct 'Text' conform to the 'Sendable' protocol[0;0m
[0;36m44 |[0;0m
[0;36m45 |[0;0m /// input token array
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Evaluate.swift:606:47: [1;33mwarning: [1;39mleft side of nil coalescing operator '??' has non-optional type 'Set<String>', so the right side is never used[0;0m
[0;36m604 |[0;0m
[0;36m605 |[0;0m let additionalEOSTokenIds = Set(
[0;36m606 |[0;0m ([4;39mcontext.configuration.extraEOSTokens[0;0m ?? [])
[0;36m|[0;0m `- [1;33mwarning: [1;39mleft side of nil coalescing operator '??' has non-optional type 'Set<String>', so the right side is never used[0;0m
[0;36m607 |[0;0m .compactMap {
[0;36m608 |[0;0m context.tokenizer.convertTokenToId($0)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Evaluate.swift:693:47: [1;33mwarning: [1;39mleft side of nil coalescing operator '??' has non-optional type 'Set<String>', so the right side is never used[0;0m
[0;36m691 |[0;0m
[0;36m692 |[0;0m let additionalEOSTokenIds = Set(
[0;36m693 |[0;0m ([4;39mcontext.configuration.extraEOSTokens[0;0m ?? [])
[0;36m|[0;0m `- [1;33mwarning: [1;39mleft side of nil coalescing operator '??' has non-optional type 'Set<String>', so the right side is never used[0;0m
[0;36m694 |[0;0m .compactMap {
[0;36m695 |[0;0m context.tokenizer.convertTokenToId($0)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Evaluate.swift:792:20: [1;33mwarning: [1;39mpassing closure as a 'sending' parameter risks causing data races between code in the current isolation context and concurrent execution of the closure; this is an error in the Swift 6 language mode[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-closure-risks-data-race\SendingClosureRisksDataRace]8;;\]
[0;36m790 |[0;0m
[0;36m791 |[0;0m // Launch a Task to perform iteration asynchronously.
[0;36m792 |[0;0m let task = Task {
[0;36m|[0;0m `- [1;33mwarning: [1;39mpassing closure as a 'sending' parameter risks causing data races between code in the current isolation context and concurrent execution of the closure; this is an error in the Swift 6 language mode[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-closure-risks-data-race\SendingClosureRisksDataRace]8;;\]
[0;36m793 |[0;0m var start = Date.timeIntervalSinceReferenceDate
[0;36m794 |[0;0m var promptTime: TimeInterval = 0
[0;36m:[0;0m
[0;36m842 |[0;0m
[0;36m843 |[0;0m let info = GenerateCompletionInfo(
[0;36m844 |[0;0m promptTokenCount: input.text.tokens.size,
[0;36m|[0;0m `- [1;39mnote: [1;39mclosure captures 'input' which is accessible to code in the current isolation context[0;0m
[0;36m845 |[0;0m generationTokenCount: tokenCount,
[0;36m846 |[0;0m promptTime: promptTime,
[#AddPreconcurrencyImport]: <https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import>
[#RegionIsolation]: <https://docs.swift.org/compiler/documentation/diagnostics/region-isolation>
[#SendingClosureRisksDataRace]: <https://docs.swift.org/compiler/documentation/diagnostics/sending-closure-risks-data-race>
warning: /Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:312:35 'try' must precede 'await': FixIt(sourceRange: XCBuild.SwiftBuildMessage.DiagnosticInfo.SourceRange(path: "/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift", startLine: 312, startColumn: 35, endLine: 312, endColumn: 41), textToInsert: ""), FixIt(sourceRange: XCBuild.SwiftBuildMessage.DiagnosticInfo.SourceRange(path: "/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift", startLine: 312, startColumn: 45, endLine: 312, endColumn: 45), textToInsert: "await ")
warning: /Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:6:8 file 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import
warning: /Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Gemma3Text.swift:13:8 file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/KVCache.swift:795:17: [1;33mwarning: [1;39minitialization of immutable value 'expectedStep' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m793 |[0;0m
[0;36m794 |[0;0m // Validate that step, groupSize, and bits match current instance
[0;36m795 |[0;0m let expectedStep = Int(newValue[0]) ?? 256
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'expectedStep' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m796 |[0;0m let expectedGroupSize = Int(newValue[2]) ?? 64
[0;36m797 |[0;0m let expectedBits = Int(newValue[3]) ?? 8
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/KVCache.swift:796:17: [1;33mwarning: [1;39minitialization of immutable value 'expectedGroupSize' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m794 |[0;0m // Validate that step, groupSize, and bits match current instance
[0;36m795 |[0;0m let expectedStep = Int(newValue[0]) ?? 256
[0;36m796 |[0;0m let expectedGroupSize = Int(newValue[2]) ?? 64
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'expectedGroupSize' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m797 |[0;0m let expectedBits = Int(newValue[3]) ?? 8
[0;36m798 |[0;0m }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/KVCache.swift:797:17: [1;33mwarning: [1;39minitialization of immutable value 'expectedBits' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m795 |[0;0m let expectedStep = Int(newValue[0]) ?? 256
[0;36m796 |[0;0m let expectedGroupSize = Int(newValue[2]) ?? 64
[0;36m797 |[0;0m let expectedBits = Int(newValue[3]) ?? 8
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'expectedBits' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m798 |[0;0m }
[0;36m799 |[0;0m }
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:26:14: [1;33mwarning: [1;39massociated value 'messages' of 'Sendable'-conforming enum 'Prompt' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m24 |[0;0m
[0;36m25 |[0;0m /// model specific array of dictionaries
[0;36m26 |[0;0m case messages([Message])
[0;36m|[0;0m `- [1;33mwarning: [1;39massociated value 'messages' of 'Sendable'-conforming enum 'Prompt' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m27 |[0;0m
[0;36m28 |[0;0m /// model agnostic structured chat (series of messages)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:29:14: [1;33mwarning: [1;39massociated value 'chat' of 'Sendable'-conforming enum 'Prompt' contains non-Sendable type 'Chat.Message'; this is an error in the Swift 6 language mode[0;0m
[0;36m27 |[0;0m
[0;36m28 |[0;0m /// model agnostic structured chat (series of messages)
[0;36m29 |[0;0m case chat([Chat.Message])
[0;36m|[0;0m `- [1;33mwarning: [1;39massociated value 'chat' of 'Sendable'-conforming enum 'Prompt' contains non-Sendable type 'Chat.Message'; this is an error in the Swift 6 language mode[0;0m
[0;36m30 |[0;0m
[0;36m31 |[0;0m public var description: String {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/Chat.swift:4:19: [1;39mnote: [1;39mconsider making struct 'Message' conform to the 'Sendable' protocol[0;0m
[0;36m2 |[0;0m
[0;36m3 |[0;0m public enum Chat {
[0;36m4 |[0;0m public struct Message {
[0;36m|[0;0m `- [1;39mnote: [1;39mconsider making struct 'Message' conform to the 'Sendable' protocol[0;0m
[0;36m5 |[0;0m /// The role of the message sender.
[0;36m6 |[0;0m public var role: Role
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:45:14: [1;33mwarning: [1;39massociated value 'avAsset' of 'Sendable'-conforming enum 'Video' has non-Sendable type 'AVAsset'; this is an error in the Swift 6 language mode[0;0m
[0;36m43 |[0;0m /// Representation of a video resource.
[0;36m44 |[0;0m public enum Video: Sendable {
[0;36m45 |[0;0m case avAsset(AVAsset)
[0;36m|[0;0m `- [1;33mwarning: [1;39massociated value 'avAsset' of 'Sendable'-conforming enum 'Video' has non-Sendable type 'AVAsset'; this is an error in the Swift 6 language mode[0;0m
[0;36m46 |[0;0m case url(URL)
[0;36m47 |[0;0m
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAsset.h:56:12: [1;39mnote: [1;39mclass 'AVAsset' does not conform to the 'Sendable' protocol[0;0m
[0;36m54 |[0;0m /// AVAssets can also be inserted into AVMutableCompositions in order to assemble audiovisual constructs from one or more source assets.
[0;36m55 |[0;0m API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), watchos(1.0), visionos(1.0))
[0;36m56 |[0;0m @interface AVAsset : NSObject <NSCopying, AVAsynchronousKeyValueLoading>
[0;36m|[0;0m `- [1;39mnote: [1;39mclass 'AVAsset' does not conform to the 'Sendable' protocol[0;0m
[0;36m57 |[0;0m {
[0;36m58 |[0;0m @private
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:3:1: [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m1 |[0;0m // Copyright © 2024 Apple Inc.
[0;36m2 |[0;0m
[0;36m3 |[0;0m import AVFoundation
[0;36m|[0;0m `- [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m4 |[0;0m import CoreImage
[0;36m5 |[0;0m import Foundation
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:62:14: [1;33mwarning: [1;39massociated value 'array' of 'Sendable'-conforming enum 'Image' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m60 |[0;0m case ciImage(CIImage)
[0;36m61 |[0;0m case url(URL)
[0;36m62 |[0;0m case array(MLXArray)
[0;36m|[0;0m `- [1;33mwarning: [1;39massociated value 'array' of 'Sendable'-conforming enum 'Image' has non-Sendable type 'MLXArray'; this is an error in the Swift 6 language mode[0;0m
[0;36m63 |[0;0m
[0;36m64 |[0;0m public func asCIImage() throws -> CIImage {
MLX.MLXArray:1:20: [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m1 |[0;0m final public class MLXArray {
[0;36m|[0;0m `- [1;39mnote: [1;39mclass 'MLXArray' does not conform to the 'Sendable' protocol[0;0m
[0;36m2 |[0;0m public package(set) var ctx: mlx_array { get }
[0;36m3 |[0;0m public init(_ ctx: consuming mlx_array)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:6:1: [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m4 |[0;0m import CoreImage
[0;36m5 |[0;0m import Foundation
[0;36m6 |[0;0m import MLX
[0;36m|[0;0m `- [1;33mwarning: [1;39madd '@preconcurrency' to suppress 'Sendable'-related warnings from module 'MLX'[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
[0;36m7 |[0;0m import Tokenizers
[0;36m8 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:162:16: [1;33mwarning: [1;39mstored property 'tools' of 'Sendable'-conforming struct 'UserInput' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m160 |[0;0m public var videos = [Video]()
[0;36m161 |[0;0m
[0;36m162 |[0;0m public var tools: [ToolSpec]?
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'tools' of 'Sendable'-conforming struct 'UserInput' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m163 |[0;0m
[0;36m164 |[0;0m /// Additional values provided for the chat template rendering context
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:165:16: [1;33mwarning: [1;39mstored property 'additionalContext' of 'Sendable'-conforming struct 'UserInput' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m163 |[0;0m
[0;36m164 |[0;0m /// Additional values provided for the chat template rendering context
[0;36m165 |[0;0m public var additionalContext: [String: Any]?
[0;36m|[0;0m `- [1;33mwarning: [1;39mstored property 'additionalContext' of 'Sendable'-conforming struct 'UserInput' contains non-Sendable type 'Any'; this is an error in the Swift 6 language mode[0;0m
[0;36m166 |[0;0m public var processing: Processing = .init()
[0;36m167 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:111:28: [1;33mwarning: [1;39mimmutable value 'C' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m109 |[0;0m
[0;36m110 |[0;0m let arrayData = array.asData()
[0;36m111 |[0;0m let (H, W, C) = array.shape3
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'C' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m112 |[0;0m let cs = CGColorSpace(name: CGColorSpace.sRGB)!
[0;36m113 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLMCommon/UserInput.swift:107:21: [1;33mwarning: [1;39mcode after 'throw' will never be executed[0;0m
[0;36m105 |[0;0m throw UserInputError.arrayError(
[0;36m106 |[0;0m "channel dimension must be last and 3/4: \(array.shape)")
[0;36m107 |[0;0m break
[0;36m|[0;0m `- [1;33mwarning: [1;39mcode after 'throw' will never be executed[0;0m
[0;36m108 |[0;0m }
[0;36m109 |[0;0m
[#AddPreconcurrencyImport]: <https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import>
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:219:14: [1;33mwarning: [1;39mnon-final class 'VLMModelFactory' cannot conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode[0;0m
[0;36m217 |[0;0m /// configuration: VLMRegistry.paligemma3bMix4488bit)
[0;36m218 |[0;0m /// ```
[0;36m219 |[0;0m public class VLMModelFactory: ModelFactory {
[0;36m|[0;0m `- [1;33mwarning: [1;39mnon-final class 'VLMModelFactory' cannot conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode[0;0m
[0;36m220 |[0;0m
[0;36m221 |[0;0m public init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:219:14: [1;33mwarning: [1;39mnon-final class 'VLMModelFactory' cannot conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode[0;0m
[0;36m217 |[0;0m /// configuration: VLMRegistry.paligemma3bMix4488bit)
[0;36m218 |[0;0m /// ```
[0;36m219 |[0;0m public class VLMModelFactory: ModelFactory {
[0;36m|[0;0m `- [1;33mwarning: [1;39mnon-final class 'VLMModelFactory' cannot conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode[0;0m
[0;36m220 |[0;0m
[0;36m221 |[0;0m public init(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:85:26: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m83 |[0;0m private static func all() -> [String: @Sendable (URL) throws -> any LanguageModel] {
[0;36m84 |[0;0m [
[0;36m85 |[0;0m "paligemma": create(PaliGemmaConfiguration.self, PaliGemma.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m86 |[0;0m "qwen2_vl": create(Qwen2VLConfiguration.self, Qwen2VL.init),
[0;36m87 |[0;0m "qwen2_5_vl": create(Qwen25VLConfiguration.self, Qwen25VL.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:86:25: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m84 |[0;0m [
[0;36m85 |[0;0m "paligemma": create(PaliGemmaConfiguration.self, PaliGemma.init),
[0;36m86 |[0;0m "qwen2_vl": create(Qwen2VLConfiguration.self, Qwen2VL.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m87 |[0;0m "qwen2_5_vl": create(Qwen25VLConfiguration.self, Qwen25VL.init),
[0;36m88 |[0;0m "qwen3_vl": create(Qwen3VLConfiguration.self, Qwen3VL.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:87:27: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m85 |[0;0m "paligemma": create(PaliGemmaConfiguration.self, PaliGemma.init),
[0;36m86 |[0;0m "qwen2_vl": create(Qwen2VLConfiguration.self, Qwen2VL.init),
[0;36m87 |[0;0m "qwen2_5_vl": create(Qwen25VLConfiguration.self, Qwen25VL.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m88 |[0;0m "qwen3_vl": create(Qwen3VLConfiguration.self, Qwen3VL.init),
[0;36m89 |[0;0m "idefics3": create(Idefics3Configuration.self, Idefics3.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:88:25: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m86 |[0;0m "qwen2_vl": create(Qwen2VLConfiguration.self, Qwen2VL.init),
[0;36m87 |[0;0m "qwen2_5_vl": create(Qwen25VLConfiguration.self, Qwen25VL.init),
[0;36m88 |[0;0m "qwen3_vl": create(Qwen3VLConfiguration.self, Qwen3VL.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m89 |[0;0m "idefics3": create(Idefics3Configuration.self, Idefics3.init),
[0;36m90 |[0;0m "gemma3": create(Gemma3Configuration.self, Gemma3.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:89:25: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m87 |[0;0m "qwen2_5_vl": create(Qwen25VLConfiguration.self, Qwen25VL.init),
[0;36m88 |[0;0m "qwen3_vl": create(Qwen3VLConfiguration.self, Qwen3VL.init),
[0;36m89 |[0;0m "idefics3": create(Idefics3Configuration.self, Idefics3.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m90 |[0;0m "gemma3": create(Gemma3Configuration.self, Gemma3.init),
[0;36m91 |[0;0m "smolvlm": create(SmolVLM2Configuration.self, SmolVLM2.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:90:23: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m88 |[0;0m "qwen3_vl": create(Qwen3VLConfiguration.self, Qwen3VL.init),
[0;36m89 |[0;0m "idefics3": create(Idefics3Configuration.self, Idefics3.init),
[0;36m90 |[0;0m "gemma3": create(Gemma3Configuration.self, Gemma3.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m91 |[0;0m "smolvlm": create(SmolVLM2Configuration.self, SmolVLM2.init),
[0;36m92 |[0;0m ]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:91:24: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m89 |[0;0m "idefics3": create(Idefics3Configuration.self, Idefics3.init),
[0;36m90 |[0;0m "gemma3": create(Gemma3Configuration.self, Gemma3.init),
[0;36m91 |[0;0m "smolvlm": create(SmolVLM2Configuration.self, SmolVLM2.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m92 |[0;0m ]
[0;36m93 |[0;0m }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:107:35: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m105 |[0;0m {
[0;36m106 |[0;0m [
[0;36m107 |[0;0m "PaliGemmaProcessor": create(
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m108 |[0;0m PaliGemmaProcessorConfiguration.self, PaliGemmaProcessor.init),
[0;36m109 |[0;0m "Qwen2VLProcessor": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:109:33: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m107 |[0;0m "PaliGemmaProcessor": create(
[0;36m108 |[0;0m PaliGemmaProcessorConfiguration.self, PaliGemmaProcessor.init),
[0;36m109 |[0;0m "Qwen2VLProcessor": create(
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m110 |[0;0m Qwen2VLProcessorConfiguration.self, Qwen2VLProcessor.init),
[0;36m111 |[0;0m "Qwen2_5_VLProcessor": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:111:36: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m109 |[0;0m "Qwen2VLProcessor": create(
[0;36m110 |[0;0m Qwen2VLProcessorConfiguration.self, Qwen2VLProcessor.init),
[0;36m111 |[0;0m "Qwen2_5_VLProcessor": create(
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m112 |[0;0m Qwen25VLProcessorConfiguration.self, Qwen25VLProcessor.init),
[0;36m113 |[0;0m "Qwen3VLProcessor": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:113:33: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m111 |[0;0m "Qwen2_5_VLProcessor": create(
[0;36m112 |[0;0m Qwen25VLProcessorConfiguration.self, Qwen25VLProcessor.init),
[0;36m113 |[0;0m "Qwen3VLProcessor": create(
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m114 |[0;0m Qwen3VLProcessorConfiguration.self, Qwen3VLProcessor.init),
[0;36m115 |[0;0m "Idefics3Processor": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:115:34: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m113 |[0;0m "Qwen3VLProcessor": create(
[0;36m114 |[0;0m Qwen3VLProcessorConfiguration.self, Qwen3VLProcessor.init),
[0;36m115 |[0;0m "Idefics3Processor": create(
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m116 |[0;0m Idefics3ProcessorConfiguration.self, Idefics3Processor.init),
[0;36m117 |[0;0m "Gemma3Processor": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:117:32: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m115 |[0;0m "Idefics3Processor": create(
[0;36m116 |[0;0m Idefics3ProcessorConfiguration.self, Idefics3Processor.init),
[0;36m117 |[0;0m "Gemma3Processor": create(
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m118 |[0;0m Gemma3ProcessorConfiguration.self, Gemma3Processor.init),
[0;36m119 |[0;0m "SmolVLMProcessor": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:119:33: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m117 |[0;0m "Gemma3Processor": create(
[0;36m118 |[0;0m Gemma3ProcessorConfiguration.self, Gemma3Processor.init),
[0;36m119 |[0;0m "SmolVLMProcessor": create(
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL, any Tokenizer) throws -> any UserInputProcessor' may introduce data races[0;0m
[0;36m120 |[0;0m SmolVLMProcessorConfiguration.self, SmolVLMProcessor.init),
[0;36m121 |[0;0m ]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:312:35: [1;33mwarning: [1;39m'try' must precede 'await'[0;0m
[0;36m310 |[0;0m var video = try input.videos[0].asAVAsset()
[0;36m311 |[0;0m
[0;36m312 |[0;0m let processedFrames = await try MediaProcessing.asProcessedSequence(
[0;36m|[0;0m `- [1;33mwarning: [1;39m'try' must precede 'await'[0;0m
[0;36m313 |[0;0m video,
[0;36m314 |[0;0m maxFrames: maxVideoFrames,
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:157:13: [1;33mwarning: [1;39mvariable 'targetSize' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m155 |[0;0m func aspectRatioSize(for size: CGSize, longestEdge: CGFloat, multiple: CGFloat? = nil) -> CGSize
[0;36m156 |[0;0m {
[0;36m157 |[0;0m var targetSize = MediaProcessing.bestFit(
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'targetSize' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m158 |[0;0m size, in: CGSize(width: longestEdge, height: longestEdge))
[0;36m159 |[0;0m guard let multiple = multiple else { return targetSize }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:291:39: [1;33mwarning: [1;39mtrailing closure in this context is confusable with the body of the statement; pass as a parenthesized argument to silence this warning[0;0m
[0;36m289 |[0;0m // Insert a default system message if the input doesn't have one
[0;36m290 |[0;0m func messagesWithSystem(_ messages: [Message]) -> [Message] {
[0;36m291 |[0;0m guard messages.filter { $0["role"] as? String == "system" }.isEmpty else {
[0;36m|[0;0m `- [1;33mwarning: [1;39mtrailing closure in this context is confusable with the body of the statement; pass as a parenthesized argument to silence this warning[0;0m
[0;36m292 |[0;0m return messages
[0;36m293 |[0;0m }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:305:17: [1;33mwarning: [1;39minitialization of immutable value 'finalMessages' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m303 |[0;0m
[0;36m304 |[0;0m // Unfortunately we don't have a "render" option in Tokenizers yet, so decoding
[0;36m305 |[0;0m let finalMessages = messagesWithSystem(messages)
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'finalMessages' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m306 |[0;0m let promptTokens = try tokenizer.applyChatTemplate(
[0;36m307 |[0;0m messages: messagesWithSystem(messages))
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:310:17: [1;33mwarning: [1;39mvariable 'video' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m308 |[0;0m let decoded = try tokenizer.decode(tokens: promptTokens, skipSpecialTokens: false)
[0;36m309 |[0;0m
[0;36m310 |[0;0m var video = try input.videos[0].asAVAsset()
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'video' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m311 |[0;0m
[0;36m312 |[0;0m let processedFrames = await try MediaProcessing.asProcessedSequence(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:240:27: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m238 |[0;0m // Unfortunately we don't have a "render" option in Tokenizers yet, so decoding
[0;36m239 |[0;0m let promptTokens = try tokenizer.applyChatTemplate(messages: messages)
[0;36m240 |[0;0m let decoded = try tokenizer.decode(tokens: promptTokens, skipSpecialTokens: false)
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m241 |[0;0m
[0;36m242 |[0;0m let image = try input.images[0].asCIImage().toSRGB()
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:271:37: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m269 |[0;0m
[0;36m270 |[0;0m let prompt = decoded.replacingOccurrences(of: imageToken, with: imagePromptString)
[0;36m271 |[0;0m let finalPromptTokens = try tokenizer.encode(text: prompt)
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m272 |[0;0m
[0;36m273 |[0;0m let promptArray = MLXArray(finalPromptTokens).expandedDimensions(axis: 0)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:308:27: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m306 |[0;0m let promptTokens = try tokenizer.applyChatTemplate(
[0;36m307 |[0;0m messages: messagesWithSystem(messages))
[0;36m308 |[0;0m let decoded = try tokenizer.decode(tokens: promptTokens, skipSpecialTokens: false)
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m309 |[0;0m
[0;36m310 |[0;0m var video = try input.videos[0].asAVAsset()
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:310:25: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m308 |[0;0m let decoded = try tokenizer.decode(tokens: promptTokens, skipSpecialTokens: false)
[0;36m309 |[0;0m
[0;36m310 |[0;0m var video = try input.videos[0].asAVAsset()
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m311 |[0;0m
[0;36m312 |[0;0m let processedFrames = await try MediaProcessing.asProcessedSequence(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/SmolVLM2.swift:353:37: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m351 |[0;0m prompt = decoded + "\n" + videoPromptString
[0;36m352 |[0;0m }
[0;36m353 |[0;0m let finalPromptTokens = try tokenizer.encode(text: prompt)
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m354 |[0;0m
[0;36m355 |[0;0m let promptArray = MLXArray(finalPromptTokens).expandedDimensions(axis: 0)
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
[#UnnecessaryEffectMarker]: <https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker>
[#VariableNeverMutated]: <https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:459:17: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m457 |[0;0m image = MediaProcessing.apply(image, processing: processing)
[0;36m458 |[0;0m
[0;36m459 |[0;0m image = try MediaProcessing.resampleBicubic(image, to: config.size.cgSize)
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m460 |[0;0m image = MediaProcessing.normalize(
[0;36m461 |[0;0m image, mean: config.imageMeanTuple, std: config.imageStdTuple)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:482:28: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m480 |[0;0m + "\n"
[0;36m481 |[0;0m
[0;36m482 |[0;0m let promptTokens = try tokenizer.encode(text: prompt)
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m483 |[0;0m let promptArray = MLXArray(promptTokens).expandedDimensions(axis: 0)
[0;36m484 |[0;0m let mask = ones(like: promptArray).asType(.int8)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:571:13: [1;33mwarning: [1;39minitialization of immutable value 'embedDimension' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m569 |[0;0m attentionMask: MLXArray
[0;36m570 |[0;0m ) -> (MLXArray, MLXArray) {
[0;36m571 |[0;0m let embedDimension = imageFeatures.dim(2)
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'embedDimension' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m572 |[0;0m let (batchSize, sequenceLength) = inputIds.shape2
[0;36m573 |[0;0m var scaledImageFeatures = imageFeatures / pow(Float(config.hiddenSize), 0.5)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:572:14: [1;33mwarning: [1;39mimmutable value 'batchSize' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m570 |[0;0m ) -> (MLXArray, MLXArray) {
[0;36m571 |[0;0m let embedDimension = imageFeatures.dim(2)
[0;36m572 |[0;0m let (batchSize, sequenceLength) = inputIds.shape2
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'batchSize' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m573 |[0;0m var scaledImageFeatures = imageFeatures / pow(Float(config.hiddenSize), 0.5)
[0;36m574 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:572:25: [1;33mwarning: [1;39mimmutable value 'sequenceLength' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m570 |[0;0m ) -> (MLXArray, MLXArray) {
[0;36m571 |[0;0m let embedDimension = imageFeatures.dim(2)
[0;36m572 |[0;0m let (batchSize, sequenceLength) = inputIds.shape2
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'sequenceLength' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m573 |[0;0m var scaledImageFeatures = imageFeatures / pow(Float(config.hiddenSize), 0.5)
[0;36m574 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:580:13: [1;33mwarning: [1;39mvariable 'textMaskExpanded' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m578 |[0;0m
[0;36m579 |[0;0m // expand masks to match embedding dimension
[0;36m580 |[0;0m var textMaskExpanded = expandedDimensions(textMask, axis: -1)
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'textMaskExpanded' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m581 |[0;0m var padMaskExpanded = expandedDimensions(padMask, axis: -1)
[0;36m582 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:581:13: [1;33mwarning: [1;39mvariable 'padMaskExpanded' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m579 |[0;0m // expand masks to match embedding dimension
[0;36m580 |[0;0m var textMaskExpanded = expandedDimensions(textMask, axis: -1)
[0;36m581 |[0;0m var padMaskExpanded = expandedDimensions(padMask, axis: -1)
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'padMaskExpanded' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m582 |[0;0m
[0;36m583 |[0;0m // insert padding and text token embeddings
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:591:13: [1;33mwarning: [1;39mvariable 'imageMaskExpanded' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m589 |[0;0m
[0;36m590 |[0;0m // insert image embeddings - the image mask is always less or equal to the sentence in length
[0;36m591 |[0;0m var imageMaskExpanded = expandedDimensions(imageMask, axis: -1)
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'imageMaskExpanded' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m592 |[0;0m finalEmbedding = which(imageMaskExpanded, scaledImageFeatures, finalEmbedding)
[0;36m593 |[0;0m
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
[#UnnecessaryEffectMarker]: <https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker>
[#VariableNeverMutated]: <https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Idefics3.swift:851:17: [1;33mwarning: [1;39minitialization of immutable value 'count' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m849 |[0;0m }
[0;36m850 |[0;0m
[0;36m851 |[0;0m let count = config.imageSequenceLength ?? 1
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'count' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m852 |[0;0m
[0;36m853 |[0;0m // Encode only the text part of the prompt, without <image>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Idefics3.swift:841:26: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m839 |[0;0m if input.images.isEmpty {
[0;36m840 |[0;0m // No image scenario
[0;36m841 |[0;0m let tokens = try tokenizer.encode(text: prompt)
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m842 |[0;0m let tokensArray = MLXArray(tokens).expandedDimensions(axis: 0)
[0;36m843 |[0;0m let mask = ones(like: tokensArray)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Idefics3.swift:854:32: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m852 |[0;0m
[0;36m853 |[0;0m // Encode only the text part of the prompt, without <image>
[0;36m854 |[0;0m var promptTokens = try tokenizer.encode(text: prompt)
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m855 |[0;0m
[0;36m856 |[0;0m let imageTokenIndex = promptTokens.count / 2
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Idefics3.swift:869:21: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m867 |[0;0m )
[0;36m868 |[0;0m image = MediaProcessing.apply(image, processing: input.processing)
[0;36m869 |[0;0m image = try MediaProcessing.resampleBicubic(image, to: targetSize)
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m870 |[0;0m image = MediaProcessing.normalize(
[0;36m871 |[0;0m image,
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
[#UnnecessaryEffectMarker]: <https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/QwenVL.swift:180:33: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m178 |[0;0m ) throws -> [Int] {
[0;36m179 |[0;0m // Replace single padding token with correct number for each image or video frame
[0;36m180 |[0;0m let placeholderTokens = try tokenizer.encode(
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m181 |[0;0m text: "<|vision_start|>\(paddingToken)<|vision_end|>")
[0;36m182 |[0;0m let placeholderRanges = promptTokens.ranges(of: placeholderTokens)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/QwenVL.swift:190:20: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m188 |[0;0m let replacementSequences = try frames.map { frame in
[0;36m189 |[0;0m let paddingCount = frame.product / mergeLength
[0;36m190 |[0;0m return try tokenizer.encode(
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m191 |[0;0m text:
[0;36m192 |[0;0m "<|vision_start|>\(Array(repeating: paddingToken, count: paddingCount).joined())<|vision_end|>"
[#UnnecessaryEffectMarker]: <https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen2VL.swift:475:17: [1;33mwarning: [1;39minitialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m473 |[0;0m let rotaryPositionEmbedding = rotaryPositionEmbedding(frames)
[0;36m474 |[0;0m
[0;36m475 |[0;0m let batchSize = frames.count
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m476 |[0;0m
[0;36m477 |[0;0m for block in blocks {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen2VL.swift:562:31: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m560 |[0;0m let resizedSize = CGSize(width: resizedWidth, height: resizedHeight)
[0;36m561 |[0;0m
[0;36m562 |[0;0m let processedImages = try images.map { image in
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m563 |[0;0m preprocess(image: image, resizedSize: resizedSize).asMLXArray()
[0;36m564 |[0;0m }
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
[#UnnecessaryEffectMarker]: <https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen25VL.swift:715:24: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m713 |[0;0m }
[0;36m714 |[0;0m .map {
[0;36m715 |[0;0m return try MediaProcessing.resampleBicubic($0, to: resizedSize)
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m716 |[0;0m }
[0;36m717 |[0;0m .map {
[#UnnecessaryEffectMarker]: <https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:6:8: [1;33mwarning: [1;39mfile 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/module-self-import\ModuleSelfImport]8;;\]
[0;36m4 |[0;0m import MLX
[0;36m5 |[0;0m import MLXFast
[0;36m6 |[0;0m import MLXLLM
[0;36m|[0;0m `- [1;33mwarning: [1;39mfile 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/module-self-import\ModuleSelfImport]8;;\]
[0;36m7 |[0;0m import MLXLMCommon
[0;36m8 |[0;0m import MLXNN
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Gemma3Text.swift:13:8: [1;33mwarning: [1;39mfile 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/module-self-import\ModuleSelfImport]8;;\]
[0;36m11 |[0;0m import MLX
[0;36m12 |[0;0m import MLXFast
[0;36m13 |[0;0m import MLXLLM
[0;36m|[0;0m `- [1;33mwarning: [1;39mfile 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/module-self-import\ModuleSelfImport]8;;\]
[0;36m14 |[0;0m import MLXLMCommon
[0;36m15 |[0;0m import MLXNN
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:451:14: [1;33mwarning: [1;39mnon-final class 'LLMModelFactory' cannot conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode[0;0m
[0;36m449 |[0;0m /// configuration: LLMRegistry.llama3_8B_4bit)
[0;36m450 |[0;0m /// ```
[0;36m451 |[0;0m public class LLMModelFactory: ModelFactory {
[0;36m|[0;0m `- [1;33mwarning: [1;39mnon-final class 'LLMModelFactory' cannot conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode[0;0m
[0;36m452 |[0;0m
[0;36m453 |[0;0m public init(typeRegistry: ModelTypeRegistry, modelRegistry: AbstractModelRegistry) {
[#ModuleSelfImport]: <https://docs.swift.org/compiler/documentation/diagnostics/module-self-import>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:287:13: [1;33mwarning: [1;39minitialization of immutable value 'secondsPerSample' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m285 |[0;0m let durationInSeconds = duration.seconds
[0;36m286 |[0;0m let samplesPerSecond = Double(samplesPerSecond)
[0;36m287 |[0;0m let secondsPerSample = 1.0 / samplesPerSecond
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'secondsPerSample' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m288 |[0;0m let totalFramesToSample = durationInSeconds * samplesPerSecond
[0;36m289 |[0;0m let durationTimeValue = duration.value
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:302:46: [1;33mwarning: [1;39mimmutable value 'requested' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m300 |[0;0m for await result in await generator.images(for: sampledTimes) {
[0;36m301 |[0;0m switch result {
[0;36m302 |[0;0m case .success(requestedTime: let requested, let image, actualTime: let actual):
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'requested' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m303 |[0;0m let ciImage = CIImage(
[0;36m304 |[0;0m cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:302:84: [1;33mwarning: [1;39mimmutable value 'actual' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m300 |[0;0m for await result in await generator.images(for: sampledTimes) {
[0;36m301 |[0;0m switch result {
[0;36m302 |[0;0m case .success(requestedTime: let requested, let image, actualTime: let actual):
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'actual' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m303 |[0;0m let ciImage = CIImage(
[0;36m304 |[0;0m cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:306:46: [1;33mwarning: [1;39mimmutable value 'requested' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m304 |[0;0m cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
[0;36m305 |[0;0m ciImages.append(ciImage)
[0;36m306 |[0;0m case .failure(requestedTime: let requested, let error):
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'requested' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m307 |[0;0m break
[0;36m308 |[0;0m }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:306:61: [1;33mwarning: [1;39mimmutable value 'error' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m304 |[0;0m cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
[0;36m305 |[0;0m ciImages.append(ciImage)
[0;36m306 |[0;0m case .failure(requestedTime: let requested, let error):
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'error' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m307 |[0;0m break
[0;36m308 |[0;0m }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:300:29: [1;33mwarning: [1;39mno 'async' operations occur within 'await' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m298 |[0;0m // Collect the frames
[0;36m299 |[0;0m var ciImages: [CIImage] = []
[0;36m300 |[0;0m for await result in await generator.images(for: sampledTimes) {
[0;36m|[0;0m `- [1;33mwarning: [1;39mno 'async' operations occur within 'await' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m301 |[0;0m switch result {
[0;36m302 |[0;0m case .success(requestedTime: let requested, let image, actualTime: let actual):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:341:13: [1;33mwarning: [1;39mvariable 'desiredFrames' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m339 |[0;0m // Note: the round was not present in `asCIImageSequence`, so we may now be passing 1 more frame to Qwen depending on video duration.
[0;36m340 |[0;0m let estimatedFrames = Int(round(fps * duration.seconds))
[0;36m341 |[0;0m var desiredFrames = min(estimatedFrames, maxFrames)
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'desiredFrames' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m342 |[0;0m let finalFrameCount = max(desiredFrames, 1)
[0;36m343 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:356:13: [1;33mwarning: [1;39mvariable 'frames' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m354 |[0;0m var timestamps: [CMTime] = []
[0;36m355 |[0;0m
[0;36m356 |[0;0m var frames: [VideoFrame] = []
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'frames' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m357 |[0;0m
[0;36m358 |[0;0m for await result in await generator.images(for: sampledTimes) {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:360:46: [1;33mwarning: [1;39mimmutable value 'requested' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m358 |[0;0m for await result in await generator.images(for: sampledTimes) {
[0;36m359 |[0;0m switch result {
[0;36m360 |[0;0m case .success(requestedTime: let requested, let image, actualTime: let actual):
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'requested' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m361 |[0;0m let ciImage = CIImage(
[0;36m362 |[0;0m cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:366:46: [1;33mwarning: [1;39mimmutable value 'requested' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m364 |[0;0m ciImages.append(frame.frame)
[0;36m365 |[0;0m timestamps.append(frame.timeStamp)
[0;36m366 |[0;0m case .failure(requestedTime: let requested, let error):
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'requested' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m367 |[0;0m break
[0;36m368 |[0;0m }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:366:61: [1;33mwarning: [1;39mimmutable value 'error' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m364 |[0;0m ciImages.append(frame.frame)
[0;36m365 |[0;0m timestamps.append(frame.timeStamp)
[0;36m366 |[0;0m case .failure(requestedTime: let requested, let error):
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'error' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m367 |[0;0m break
[0;36m368 |[0;0m }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:358:29: [1;33mwarning: [1;39mno 'async' operations occur within 'await' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m356 |[0;0m var frames: [VideoFrame] = []
[0;36m357 |[0;0m
[0;36m358 |[0;0m for await result in await generator.images(for: sampledTimes) {
[0;36m|[0;0m `- [1;33mwarning: [1;39mno 'async' operations occur within 'await' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m359 |[0;0m switch result {
[0;36m360 |[0;0m case .success(requestedTime: let requested, let image, actualTime: let actual):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:966:13: [1;33mwarning: [1;39minitialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m964 |[0;0m ) -> (MLXArray, MLXArray?) {
[0;36m965 |[0;0m let embedDim = inputsEmbeds.dim(2)
[0;36m966 |[0;0m let batchSize = inputIds.dim(0)
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m967 |[0;0m let sequenceLength = inputIds.dim(1)
[0;36m968 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:967:13: [1;33mwarning: [1;39minitialization of immutable value 'sequenceLength' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m965 |[0;0m let embedDim = inputsEmbeds.dim(2)
[0;36m966 |[0;0m let batchSize = inputIds.dim(0)
[0;36m967 |[0;0m let sequenceLength = inputIds.dim(1)
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'sequenceLength' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m968 |[0;0m
[0;36m969 |[0;0m // Scale image features to match text embedding magnitude
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:979:13: [1;33mwarning: [1;39minitialization of immutable value 'textMask' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m977 |[0;0m
[0;36m978 |[0;0m // Create masks for different token types
[0;36m979 |[0;0m let textMask = MLX.logicalAnd(
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'textMask' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m980 |[0;0m MLX.notEqual(inputIds, MLXArray(imageTokenId)),
[0;36m981 |[0;0m MLX.notEqual(inputIds, MLXArray(padTokenId))
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1019:56: [1;33mwarning: [1;39mconditional cast from 'any KVCache' to 'any KVCache' always succeeds[0;0m
[0;36m1017 |[0;0m guard let imagePixels = input.image?.pixels else {
[0;36m1018 |[0;0m // Text-only input
[0;36m1019 |[0;0m let convertedCache = cache.compactMap { $0 as? KVCache }
[0;36m|[0;0m `- [1;33mwarning: [1;39mconditional cast from 'any KVCache' to 'any KVCache' always succeeds[0;0m
[0;36m1020 |[0;0m let result = languageModel(
[0;36m1021 |[0;0m input.text.tokens, cache: convertedCache, inputEmbedding: nil, mask: nil)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1031:52: [1;33mwarning: [1;39mconditional cast from 'any KVCache' to 'any KVCache' always succeeds[0;0m
[0;36m1029 |[0;0m )
[0;36m1030 |[0;0m
[0;36m1031 |[0;0m let convertedCache = cache.compactMap { $0 as? KVCache }
[0;36m|[0;0m `- [1;33mwarning: [1;39mconditional cast from 'any KVCache' to 'any KVCache' always succeeds[0;0m
[0;36m1032 |[0;0m // Use causal masking for text generation
[0;36m1033 |[0;0m let maskMode: MLXFast.ScaledDotProductAttentionMaskMode = .causal
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1050:13: [1;33mwarning: [1;39minitialization of immutable value 'lmHeadKeys' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m1048 |[0;0m
[0;36m1049 |[0;0m public func sanitize(weights: [String: MLXArray]) -> [String: MLXArray] {
[0;36m1050 |[0;0m let lmHeadKeys = weights.keys.filter { $0.contains("lm_head") }
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'lmHeadKeys' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m1051 |[0;0m
[0;36m1052 |[0;0m // Also check attention layer structures
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1053:13: [1;33mwarning: [1;39minitialization of immutable value 'attnKeys' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m1051 |[0;0m
[0;36m1052 |[0;0m // Also check attention layer structures
[0;36m1053 |[0;0m let attnKeys = weights.keys.filter {
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'attnKeys' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m1054 |[0;0m $0.contains("self_attn")
[0;36m1055 |[0;0m && ($0.contains("q_proj") || $0.contains("k_proj") || $0.contains("v_proj")
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1092:32: [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m1090 |[0;0m let processedImage = MediaProcessing.apply(image, processing: userProcessing)
[0;36m1091 |[0;0m let srgbImage = MediaProcessing.inSRGBToneCurveSpace(processedImage)
[0;36m1092 |[0;0m let resizedImage = try MediaProcessing.resampleBicubic(srgbImage, to: targetSize)
[0;36m|[0;0m `- [1;33mwarning: [1;39mno calls to throwing functions occur within 'try' expression[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker\UnnecessaryEffectMarker]8;;\]
[0;36m1093 |[0;0m let normalizedImage = MediaProcessing.normalize(
[0;36m1094 |[0;0m resizedImage, mean: config.imageMeanTuple, std: config.imageStdTuple)
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
[#UnnecessaryEffectMarker]: <https://docs.swift.org/compiler/documentation/diagnostics/unnecessary-effect-marker>
[#VariableNeverMutated]: <https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/SuScaledRotaryEmbedding.swift:42:13: [1;33mwarning: [1;39mvariable 'scaledX' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m40 |[0;0m public func callAsFunction(_ x: MLXArray, offset: Int = 0) -> MLXArray {
[0;36m41 |[0;0m // Apply scaling only to the dimensions that will be rotated
[0;36m42 |[0;0m var scaledX = x
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'scaledX' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m43 |[0;0m let sliceToScale = scaledX[.ellipsis, 0 ..< dimensions]
[0;36m44 |[0;0m scaledX[.ellipsis, 0 ..< dimensions] = scale * sliceToScale
[#VariableNeverMutated]: <https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Phi3.swift:63:17: [1;33mwarning: [1;39mimmutable value 'shortFactor' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m61 |[0;0m if let ropeScaling = args.ropeScaling,
[0;36m62 |[0;0m ropeScaling.type == "su" || ropeScaling.type == "longrope",
[0;36m63 |[0;0m let shortFactor = ropeScaling.shortFactor, let longFactor = ropeScaling.longFactor
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'shortFactor' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m64 |[0;0m {
[0;36m65 |[0;0m self.rope = .suScaledRotaryEmbedding(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/PhiMoE.swift:90:13: [1;33mwarning: [1;39mvariable 'v' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m88 |[0;0m var q = queries.reshaped(B, L, args.attentionHeads, -1).transposed(0, 2, 1, 3)
[0;36m89 |[0;0m var k = keys.reshaped(B, L, args.kvHeads, -1).transposed(0, 2, 1, 3)
[0;36m90 |[0;0m var v = values.reshaped(B, L, args.kvHeads, -1).transposed(0, 2, 1, 3)
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'v' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m91 |[0;0m
[0;36m92 |[0;0m if let cache {
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
[#VariableNeverMutated]: <https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen3VL.swift:670:21: [1;33mwarning: [1;39mvariable 'intra' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m668 |[0;0m blockCols = blockCols.reshaped([1, mergedW, 1, 1])
[0;36m669 |[0;0m
[0;36m670 |[0;0m var intra = MLXArray(0 ..< merge).asType(.int32)
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'intra' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m671 |[0;0m let intraRow = intra.reshaped([1, 1, merge, 1])
[0;36m672 |[0;0m let intraCol = intra.reshaped([1, 1, 1, merge])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen3VL.swift:950:17: [1;33mwarning: [1;39mvariable 'emb' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m948 |[0;0m freqs = applyInterleavedMRope(freqs)
[0;36m949 |[0;0m
[0;36m950 |[0;0m var emb = concatenated([freqs, freqs], axis: -1)
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'emb' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m951 |[0;0m let cosValues = cos(emb).asType(dtype)
[0;36m952 |[0;0m let sinValues = sin(emb).asType(dtype)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen3VL.swift:1188:17: [1;33mwarning: [1;39mvariable 'result' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m1186 |[0;0m let indexArray = MLXArray(indices.map { UInt32($0) })
[0;36m1187 |[0;0m
[0;36m1188 |[0;0m var result = hiddenStates
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'result' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m1189 |[0;0m result[0..., indexArray, 0...] = result[0..., indexArray, 0...] + visualEmbeds
[0;36m1190 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen3VL.swift:1608:13: [1;33mwarning: [1;39minitialization of immutable value 'inputMask' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m1606 |[0;0m ) throws -> PrepareResult {
[0;36m1607 |[0;0m let inputIds = input.text.tokens
[0;36m1608 |[0;0m let inputMask = input.text.mask
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'inputMask' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m1609 |[0;0m
[0;36m1610 |[0;0m var pixelValues: MLXArray?
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen3VL.swift:1630:20: [1;33mwarning: [1;39mvalue 'pixelValues' was defined but never used; consider replacing with boolean test[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m1628 |[0;0m if !pixelParts.isEmpty {
[0;36m1629 |[0;0m pixelValues = concatenated(pixelParts)
[0;36m1630 |[0;0m if let pixelValues {
[0;36m|[0;0m `- [1;33mwarning: [1;39mvalue 'pixelValues' was defined but never used; consider replacing with boolean test[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m1631 |[0;0m }
[0;36m1632 |[0;0m }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen3VL.swift:1690:13: [1;33mwarning: [1;39minitialization of immutable value 'offset' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m1688 |[0;0m let typedCache = castCacheOptional(cache)
[0;36m1689 |[0;0m
[0;36m1690 |[0;0m let offset = cache?.first?.offset ?? 0
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'offset' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m1691 |[0;0m
[0;36m1692 |[0;0m let result = languageModel(
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
[#VariableNeverMutated]: <https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/RoPEUtils.swift:104:13: [1;33mwarning: [1;39mvariable 'x' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m102 |[0;0m
[0;36m103 |[0;0m public func callAsFunction(_ x: MLXArray, offset: Int = 0) -> MLXArray {
[0;36m104 |[0;0m var x = x
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'x' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m105 |[0;0m
[0;36m106 |[0;0m if _mscale != 1.0 {
[#VariableNeverMutated]: <https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated>
/Users/admin/builder/spi-builder-workspace/Libraries/Embedders/Load.swift:94:38: [1;33mwarning: [1;39m'quantization' is deprecated: Please use perLayerQuantization instead[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
[0;36m92 |[0;0m }
[0;36m93 |[0;0m
[0;36m94 |[0;0m if let quantization = baseConfig.quantization {
[0;36m|[0;0m `- [1;33mwarning: [1;39m'quantization' is deprecated: Please use perLayerQuantization instead[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
[0;36m95 |[0;0m quantize(model: model, groupSize: quantization.groupSize, bits: quantization.bits) {
[0;36m96 |[0;0m path, module in
[#DeprecatedDeclaration]: <https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModel.swift:27:13: [1;33mwarning: [1;39mvariable 'state' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m25 |[0;0m let prefillStepSize = windowSize ?? 512
[0;36m26 |[0;0m var y = input.text
[0;36m27 |[0;0m var state: LMOutput.State? = nil
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'state' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m28 |[0;0m
[0;36m29 |[0;0m // prepare the prompt in chunks if larger than the prefill size
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModel.swift:32:17: [1;33mwarning: [1;39minitialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m30 |[0;0m while y.tokens.size > prefillStepSize {
[0;36m31 |[0;0m let input = y[.newAxis, ..<prefillStepSize]
[0;36m32 |[0;0m let result = self(input, cache: cache.isEmpty ? nil : cache, state: state)
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m33 |[0;0m eval(cache)
[0;36m34 |[0;0m y = y[prefillStepSize...]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:451:14: [1;33mwarning: [1;39mnon-final class 'LLMModelFactory' cannot conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode[0;0m
[0;36m449 |[0;0m /// configuration: LLMRegistry.llama3_8B_4bit)
[0;36m450 |[0;0m /// ```
[0;36m451 |[0;0m public class LLMModelFactory: ModelFactory {
[0;36m|[0;0m `- [1;33mwarning: [1;39mnon-final class 'LLMModelFactory' cannot conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode[0;0m
[0;36m452 |[0;0m
[0;36m453 |[0;0m public init(typeRegistry: ModelTypeRegistry, modelRegistry: AbstractModelRegistry) {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:31:24: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m29 |[0;0m private static func all() -> [String: @Sendable (URL) throws -> any LanguageModel] {
[0;36m30 |[0;0m [
[0;36m31 |[0;0m "mistral": create(LlamaConfiguration.self, LlamaModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m32 |[0;0m "llama": create(LlamaConfiguration.self, LlamaModel.init),
[0;36m33 |[0;0m "phi": create(PhiConfiguration.self, PhiModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:32:22: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m30 |[0;0m [
[0;36m31 |[0;0m "mistral": create(LlamaConfiguration.self, LlamaModel.init),
[0;36m32 |[0;0m "llama": create(LlamaConfiguration.self, LlamaModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m33 |[0;0m "phi": create(PhiConfiguration.self, PhiModel.init),
[0;36m34 |[0;0m "phi3": create(Phi3Configuration.self, Phi3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:33:20: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m31 |[0;0m "mistral": create(LlamaConfiguration.self, LlamaModel.init),
[0;36m32 |[0;0m "llama": create(LlamaConfiguration.self, LlamaModel.init),
[0;36m33 |[0;0m "phi": create(PhiConfiguration.self, PhiModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m34 |[0;0m "phi3": create(Phi3Configuration.self, Phi3Model.init),
[0;36m35 |[0;0m "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:34:21: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m32 |[0;0m "llama": create(LlamaConfiguration.self, LlamaModel.init),
[0;36m33 |[0;0m "phi": create(PhiConfiguration.self, PhiModel.init),
[0;36m34 |[0;0m "phi3": create(Phi3Configuration.self, Phi3Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m35 |[0;0m "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
[0;36m36 |[0;0m "gemma": create(GemmaConfiguration.self, GemmaModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:35:23: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m33 |[0;0m "phi": create(PhiConfiguration.self, PhiModel.init),
[0;36m34 |[0;0m "phi3": create(Phi3Configuration.self, Phi3Model.init),
[0;36m35 |[0;0m "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m36 |[0;0m "gemma": create(GemmaConfiguration.self, GemmaModel.init),
[0;36m37 |[0;0m "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:36:22: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m34 |[0;0m "phi3": create(Phi3Configuration.self, Phi3Model.init),
[0;36m35 |[0;0m "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
[0;36m36 |[0;0m "gemma": create(GemmaConfiguration.self, GemmaModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m37 |[0;0m "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
[0;36m38 |[0;0m "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:37:23: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m35 |[0;0m "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
[0;36m36 |[0;0m "gemma": create(GemmaConfiguration.self, GemmaModel.init),
[0;36m37 |[0;0m "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m38 |[0;0m "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
[0;36m39 |[0;0m "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:38:23: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m36 |[0;0m "gemma": create(GemmaConfiguration.self, GemmaModel.init),
[0;36m37 |[0;0m "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
[0;36m38 |[0;0m "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m39 |[0;0m "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
[0;36m40 |[0;0m "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:39:28: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m37 |[0;0m "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
[0;36m38 |[0;0m "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
[0;36m39 |[0;0m "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m40 |[0;0m "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
[0;36m41 |[0;0m "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:40:24: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m38 |[0;0m "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
[0;36m39 |[0;0m "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
[0;36m40 |[0;0m "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m41 |[0;0m "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
[0;36m42 |[0;0m "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:41:22: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m39 |[0;0m "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
[0;36m40 |[0;0m "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
[0;36m41 |[0;0m "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m42 |[0;0m "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
[0;36m43 |[0;0m "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:42:22: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m40 |[0;0m "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
[0;36m41 |[0;0m "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
[0;36m42 |[0;0m "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m43 |[0;0m "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
[0;36m44 |[0;0m "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:43:26: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m41 |[0;0m "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
[0;36m42 |[0;0m "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
[0;36m43 |[0;0m "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m44 |[0;0m "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
[0;36m45 |[0;0m "cohere": create(CohereConfiguration.self, CohereModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:44:27: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m42 |[0;0m "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
[0;36m43 |[0;0m "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
[0;36m44 |[0;0m "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m45 |[0;0m "cohere": create(CohereConfiguration.self, CohereModel.init),
[0;36m46 |[0;0m "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:45:23: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m43 |[0;0m "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
[0;36m44 |[0;0m "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
[0;36m45 |[0;0m "cohere": create(CohereConfiguration.self, CohereModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m46 |[0;0m "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
[0;36m47 |[0;0m "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:46:24: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m44 |[0;0m "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
[0;36m45 |[0;0m "cohere": create(CohereConfiguration.self, CohereModel.init),
[0;36m46 |[0;0m "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m47 |[0;0m "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
[0;36m48 |[0;0m "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:47:26: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m45 |[0;0m "cohere": create(CohereConfiguration.self, CohereModel.init),
[0;36m46 |[0;0m "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
[0;36m47 |[0;0m "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m48 |[0;0m "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
[0;36m49 |[0;0m "granite": create(GraniteConfiguration.self, GraniteModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:48:28: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m46 |[0;0m "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
[0;36m47 |[0;0m "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
[0;36m48 |[0;0m "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m49 |[0;0m "granite": create(GraniteConfiguration.self, GraniteModel.init),
[0;36m50 |[0;0m "granitemoehybrid": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:49:24: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m47 |[0;0m "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
[0;36m48 |[0;0m "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
[0;36m49 |[0;0m "granite": create(GraniteConfiguration.self, GraniteModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m50 |[0;0m "granitemoehybrid": create(
[0;36m51 |[0;0m GraniteMoeHybridConfiguration.self, GraniteMoeHybridModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:50:33: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m48 |[0;0m "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
[0;36m49 |[0;0m "granite": create(GraniteConfiguration.self, GraniteModel.init),
[0;36m50 |[0;0m "granitemoehybrid": create(
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m51 |[0;0m GraniteMoeHybridConfiguration.self, GraniteMoeHybridModel.init),
[0;36m52 |[0;0m "mimo": create(MiMoConfiguration.self, MiMoModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:52:21: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m50 |[0;0m "granitemoehybrid": create(
[0;36m51 |[0;0m GraniteMoeHybridConfiguration.self, GraniteMoeHybridModel.init),
[0;36m52 |[0;0m "mimo": create(MiMoConfiguration.self, MiMoModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m53 |[0;0m "glm4": create(GLM4Configuration.self, GLM4Model.init),
[0;36m54 |[0;0m "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:53:21: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m51 |[0;0m GraniteMoeHybridConfiguration.self, GraniteMoeHybridModel.init),
[0;36m52 |[0;0m "mimo": create(MiMoConfiguration.self, MiMoModel.init),
[0;36m53 |[0;0m "glm4": create(GLM4Configuration.self, GLM4Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m54 |[0;0m "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
[0;36m55 |[0;0m "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:54:26: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m52 |[0;0m "mimo": create(MiMoConfiguration.self, MiMoModel.init),
[0;36m53 |[0;0m "glm4": create(GLM4Configuration.self, GLM4Model.init),
[0;36m54 |[0;0m "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m55 |[0;0m "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
[0;36m56 |[0;0m "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:55:26: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m53 |[0;0m "glm4": create(GLM4Configuration.self, GLM4Model.init),
[0;36m54 |[0;0m "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
[0;36m55 |[0;0m "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m56 |[0;0m "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
[0;36m57 |[0;0m "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:56:23: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m54 |[0;0m "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
[0;36m55 |[0;0m "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
[0;36m56 |[0;0m "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m57 |[0;0m "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
[0;36m58 |[0;0m "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:57:24: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m55 |[0;0m "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
[0;36m56 |[0;0m "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
[0;36m57 |[0;0m "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m58 |[0;0m "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
[0;36m59 |[0;0m "lfm2": create(LFM2Configuration.self, LFM2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:58:25: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m56 |[0;0m "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
[0;36m57 |[0;0m "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
[0;36m58 |[0;0m "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m59 |[0;0m "lfm2": create(LFM2Configuration.self, LFM2Model.init),
[0;36m60 |[0;0m "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:59:21: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m57 |[0;0m "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
[0;36m58 |[0;0m "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
[0;36m59 |[0;0m "lfm2": create(LFM2Configuration.self, LFM2Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m60 |[0;0m "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
[0;36m61 |[0;0m "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:60:28: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m58 |[0;0m "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
[0;36m59 |[0;0m "lfm2": create(LFM2Configuration.self, LFM2Model.init),
[0;36m60 |[0;0m "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m61 |[0;0m "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
[0;36m62 |[0;0m "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:61:24: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m59 |[0;0m "lfm2": create(LFM2Configuration.self, LFM2Model.init),
[0;36m60 |[0;0m "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
[0;36m61 |[0;0m "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m62 |[0;0m "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
[0;36m63 |[0;0m "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:62:24: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m60 |[0;0m "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
[0;36m61 |[0;0m "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
[0;36m62 |[0;0m "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m63 |[0;0m "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
[0;36m64 |[0;0m "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:63:27: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m61 |[0;0m "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
[0;36m62 |[0;0m "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
[0;36m63 |[0;0m "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m64 |[0;0m "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
[0;36m65 |[0;0m "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:64:22: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m62 |[0;0m "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
[0;36m63 |[0;0m "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
[0;36m64 |[0;0m "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m65 |[0;0m "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
[0;36m66 |[0;0m "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:65:22: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m63 |[0;0m "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
[0;36m64 |[0;0m "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
[0;36m65 |[0;0m "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m66 |[0;0m "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
[0;36m67 |[0;0m "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:66:28: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m64 |[0;0m "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
[0;36m65 |[0;0m "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
[0;36m66 |[0;0m "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m67 |[0;0m "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
[0;36m68 |[0;0m "nanochat": create(NanoChatConfiguration.self, NanoChatModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:67:25: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m65 |[0;0m "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
[0;36m66 |[0;0m "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
[0;36m67 |[0;0m "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m68 |[0;0m "nanochat": create(NanoChatConfiguration.self, NanoChatModel.init),
[0;36m69 |[0;0m ]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:68:25: [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m66 |[0;0m "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
[0;36m67 |[0;0m "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
[0;36m68 |[0;0m "nanochat": create(NanoChatConfiguration.self, NanoChatModel.init),
[0;36m|[0;0m `- [1;33mwarning: [1;39mconverting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races[0;0m
[0;36m69 |[0;0m ]
[0;36m70 |[0;0m }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:515:17: [1;33mwarning: [1;39mreturning 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\]
[0;36m513 |[0;0m messageGenerator: messageGenerator)
[0;36m514 |[0;0m
[0;36m515 |[0;0m return .init(
[0;36m|[0;0m |- [1;33mwarning: [1;39mreturning 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\]
[0;36m|[0;0m `- [1;39mnote: [1;39mreturning 'model' risks causing data races since the caller assumes that 'model' can be safely sent to other isolation domains[0;0m
[0;36m516 |[0;0m configuration: configuration, model: model, processor: processor, tokenizer: tokenizer)
[0;36m517 |[0;0m }
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
[#RegionIsolation]: <https://docs.swift.org/compiler/documentation/diagnostics/region-isolation>
[#VariableNeverMutated]: <https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Gemma3Text.swift:13:8: [1;33mwarning: [1;39mfile 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/module-self-import\ModuleSelfImport]8;;\]
[0;36m11 |[0;0m import MLX
[0;36m12 |[0;0m import MLXFast
[0;36m13 |[0;0m import MLXLLM
[0;36m|[0;0m `- [1;33mwarning: [1;39mfile 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/module-self-import\ModuleSelfImport]8;;\]
[0;36m14 |[0;0m import MLXLMCommon
[0;36m15 |[0;0m import MLXNN
[#ModuleSelfImport]: <https://docs.swift.org/compiler/documentation/diagnostics/module-self-import>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/LFM2MoE.swift:209:13: [1;33mwarning: [1;39mvariable 'B' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m207 |[0;0m let BCx = inProj(x)
[0;36m208 |[0;0m let parts = BCx.split(parts: 3, axis: -1)
[0;36m209 |[0;0m var B = parts[0]
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'B' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m210 |[0;0m let C = parts[1]
[0;36m211 |[0;0m let xComp = parts[2]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/LFM2MoE.swift:296:13: [1;33mwarning: [1;39mvariable 'indices' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m294 |[0;0m
[0;36m295 |[0;0m let k = topK
[0;36m296 |[0;0m var indices = argPartition(-gates, kth: k - 1, axis: -1)[.ellipsis, ..<k]
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'indices' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m297 |[0;0m var scores = takeAlong(gates, indices, axis: -1)
[0;36m298 |[0;0m if normTopKProb {
[#VariableNeverMutated]: <https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:124:13: [1;33mwarning: [1;39minitialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m122 |[0;0m
[0;36m123 |[0;0m public init(_ args: GraniteConfiguration) {
[0;36m124 |[0;0m let attentionHeads = args.attentionHeads
[0;36m|[0;0m `- [1;33mwarning: [1;39minitialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m125 |[0;0m let hiddenSize = args.hiddenSize
[0;36m126 |[0;0m
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:274:74: [1;33mwarning: [1;39mleft side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used[0;0m
[0;36m272 |[0;0m self.kvHeads = try container.decode(Int.self, forKey: .kvHeads)
[0;36m273 |[0;0m self.attentionBias = try container.decode(Bool.self, forKey: .attentionBias)
[0;36m274 |[0;0m self.mlpBias = try [4;39mcontainer.decode(Bool.self, forKey: .mlpBias)[0;0m ?? false
[0;36m|[0;0m `- [1;33mwarning: [1;39mleft side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used[0;0m
[0;36m275 |[0;0m self.ropeTheta = try container.decodeIfPresent(Float.self, forKey: .ropeTheta) ?? 10000000.0
[0;36m276 |[0;0m self.ropeScaling = try container.decodeIfPresent(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:122:13: [1;33mwarning: [1;39mvariable 'padded' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m120 |[0;0m }
[0;36m121 |[0;0m
[0;36m122 |[0;0m var padded = concatenated([convState!, input], axis: 1)
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'padded' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m123 |[0;0m
[0;36m124 |[0;0m if let cache {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:139:13: [1;33mwarning: [1;39mvariable 'projected' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m137 |[0;0m cache: MambaCache?
[0;36m138 |[0;0m ) -> MLXArray {
[0;36m139 |[0;0m var projected = inProj(hiddenStates)
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'projected' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m140 |[0;0m let splits = split(
[0;36m141 |[0;0m projected, indices: [intermediateSize, intermediateSize + convDim], axis: -1)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:142:13: [1;33mwarning: [1;39mvariable 'gate' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m140 |[0;0m let splits = split(
[0;36m141 |[0;0m projected, indices: [intermediateSize, intermediateSize + convDim], axis: -1)
[0;36m142 |[0;0m var gate = splits[0]
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'gate' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m143 |[0;0m var convInput = splits[1]
[0;36m144 |[0;0m var dt = splits[2]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:144:13: [1;33mwarning: [1;39mvariable 'dt' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m142 |[0;0m var gate = splits[0]
[0;36m143 |[0;0m var convInput = splits[1]
[0;36m144 |[0;0m var dt = splits[2]
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'dt' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m145 |[0;0m
[0;36m146 |[0;0m if let mask {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:554:25: [1;33mwarning: [1;39mvariable 'inputWeight' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m552 |[0;0m let prefix = "model.layers.\(layerIndex).block_sparse_moe"
[0;36m553 |[0;0m guard
[0;36m554 |[0;0m var inputWeight = sanitized.removeValue(forKey: "\(prefix).input_linear.weight")
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'inputWeight' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m555 |[0;0m else { continue }
[0;36m556 |[0;0m
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
[#VariableNeverMutated]: <https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:6:8: [1;33mwarning: [1;39mfile 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/module-self-import\ModuleSelfImport]8;;\]
[0;36m4 |[0;0m import MLX
[0;36m5 |[0;0m import MLXFast
[0;36m6 |[0;0m import MLXLLM
[0;36m|[0;0m `- [1;33mwarning: [1;39mfile 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/module-self-import\ModuleSelfImport]8;;\]
[0;36m7 |[0;0m import MLXLMCommon
[0;36m8 |[0;0m import MLXNN
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:231:17: [1;33mwarning: [1;39mleft side of nil coalescing operator '??' has non-optional type 'Int', so the right side is never used[0;0m
[0;36m229 |[0;0m let inds = argPartition(-scores, kth: k - 1, axis: -1)[.ellipsis, ..<k]
[0;36m230 |[0;0m scores = takeAlong(scores, inds, axis: -1)
[0;36m231 |[0;0m if [4;39mtopK[0;0m ?? 1 > 1, normTopkProb {
[0;36m|[0;0m `- [1;33mwarning: [1;39mleft side of nil coalescing operator '??' has non-optional type 'Int', so the right side is never used[0;0m
[0;36m232 |[0;0m let denominator = scores.sum(axis: -1, keepDims: true) + 1e-20
[0;36m233 |[0;0m scores = scores / denominator
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:215:27: [1;33mwarning: [1;39mimmutable value 'h' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m213 |[0;0m
[0;36m214 |[0;0m func groupSelect(_ x: MLXArray) -> (inds: MLXArray, scores: MLXArray) {
[0;36m215 |[0;0m let (bsz, seqLen, h) = (x.dim(0), x.dim(1), x.dim(2))
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'h' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m216 |[0;0m
[0;36m217 |[0;0m let logits = gate(x)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:224:13: [1;33mwarning: [1;39mvariable 'groupIdx' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m222 |[0;0m let topKGroup = top(groupScores, k: 2, axis: -1).sum(axis: -1, keepDims: true)
[0;36m223 |[0;0m var k = nGroup - topkGroup
[0;36m224 |[0;0m var groupIdx = argPartition(topKGroup, kth: k - 1, axis: -2)[.ellipsis, ..<k, 0...]
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'groupIdx' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m225 |[0;0m scores = putAlong(groupScores, groupIdx, values: MLXArray(0.0), axis: -2)
[0;36m226 |[0;0m scores = flattened(scores, start: -2, end: -1)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:357:27: [1;33mwarning: [1;39mimmutable value 'h' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m355 |[0;0m
[0;36m356 |[0;0m func callAsFunction(_ x: MLXArray) -> (MLXArray, MLXArray) {
[0;36m357 |[0;0m let (bsz, seqLen, h) = (x.dim(0), x.dim(1), x.dim(2))
[0;36m|[0;0m `- [1;33mwarning: [1;39mimmutable value 'h' was never used; consider replacing with '_' or removing it[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
[0;36m358 |[0;0m
[0;36m359 |[0;0m let hiddenStates = x.matmul(weight.T)
[#ModuleSelfImport]: <https://docs.swift.org/compiler/documentation/diagnostics/module-self-import>
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
[#VariableNeverMutated]: <https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/OpenELM.swift:72:13: [1;33mwarning: [1;39mvariable 'values' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m70 |[0;0m var queries = qkvSplit[0]
[0;36m71 |[0;0m var keys = qkvSplit[1]
[0;36m72 |[0;0m var values = qkvSplit[2]
[0;36m|[0;0m `- [1;33mwarning: [1;39mvariable 'values' was never mutated; consider changing to 'let' constant[0;0m [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
[0;36m73 |[0;0m
[0;36m74 |[0;0m if let qNorm, let kNorm {
[#VariableNeverMutated]: <https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated>
Build complete.
{
"dependencies" : [
{
"identity" : "mlx-swift",
"requirement" : {
"range" : [
{
"lower_bound" : "0.29.1",
"upper_bound" : "0.30.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/ml-explore/mlx-swift"
},
{
"identity" : "swift-transformers",
"requirement" : {
"range" : [
{
"lower_bound" : "1.0.0",
"upper_bound" : "1.1.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/Qwen3VL.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",
"MLXEmbedders"
],
"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/BaichuanM1.swift",
"Models/BailingMoe.swift",
"Models/Bitnet.swift",
"Models/Cohere.swift",
"Models/DeepseekV3.swift",
"Models/Ernie4_5.swift",
"Models/Exaone4.swift",
"Models/FalconH1.swift",
"Models/GLM4.swift",
"Models/GPTOSS.swift",
"Models/Gemma.swift",
"Models/Gemma2.swift",
"Models/Gemma3Text.swift",
"Models/Gemma3nText.swift",
"Models/Granite.swift",
"Models/GraniteMoeHybrid.swift",
"Models/Internlm2.swift",
"Models/LFM2.swift",
"Models/LFM2MoE.swift",
"Models/Lille130m.swift",
"Models/Llama.swift",
"Models/MiMo.swift",
"Models/NanoChat.swift",
"Models/Olmo2.swift",
"Models/OlmoE.swift",
"Models/OpenELM.swift",
"Models/Phi.swift",
"Models/Phi3.swift",
"Models/PhiMoE.swift",
"Models/Qwen2.swift",
"Models/Qwen3.swift",
"Models/Qwen3MoE.swift",
"Models/RoPEUtils.swift",
"Models/SSM.swift",
"Models/SmolLM3.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",
"Qwen3.swift",
"Tokenizer.swift"
],
"target_dependencies" : [
"MLXLMCommon"
],
"type" : "library"
}
],
"tools_version" : "5.9"
}
Done.