The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Successful build of mlx-libraries, reference 2.29.1 (9bff95), with Swift 6.2 for macOS (SPM) on 16 Oct 2025 22:47:33 UTC.

Swift 6 data race errors: 0

Build Command

env DEVELOPER_DIR=/Applications/Xcode-26.0.0.app xcrun swift build --arch arm64

Build Log

 61 |             "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:62:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 60 |             "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
 61 |             "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:63:27: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 61 |             "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
    |                           `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:64:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:65:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
 67 |             "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:66:28: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
    |                            `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 67 |             "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
 68 |             "nanochat": create(NanoChatConfiguration.self, NanoChatModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:67:25: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
 67 |             "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
    |                         `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 68 |             "nanochat": create(NanoChatConfiguration.self, NanoChatModel.init),
 69 |         ]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:68:25: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
 67 |             "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
 68 |             "nanochat": create(NanoChatConfiguration.self, NanoChatModel.init),
    |                         `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 69 |         ]
 70 |     }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:515:17: warning: returning task-isolated 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
513 |             messageGenerator: messageGenerator)
514 |
515 |         return .init(
    |                 |- warning: returning task-isolated 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
    |                 `- note: returning task-isolated 'model' risks causing data races since the caller assumes that 'model' can be safely sent to other isolation domains
516 |             configuration: configuration, model: model, processor: processor, tokenizer: tokenizer)
517 |     }
[468/510] Compiling MLXLLM LoraTrain.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModel.swift:27:13: warning: variable 'state' was never mutated; consider changing to 'let' constant
25 |         let prefillStepSize = windowSize ?? 512
26 |         var y = input.text
27 |         var state: LMOutput.State? = nil
   |             `- warning: variable 'state' was never mutated; consider changing to 'let' constant
28 |
29 |         // prepare the prompt in chunks if larger than the prefill size
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModel.swift:32:17: warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
30 |         while y.tokens.size > prefillStepSize {
31 |             let input = y[.newAxis, ..<prefillStepSize]
32 |             let result = self(input, cache: cache.isEmpty ? nil : cache, state: state)
   |                 `- warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
33 |             eval(cache)
34 |             y = y[prefillStepSize...]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:451:14: warning: non-final class 'LLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
449 | ///     configuration: LLMRegistry.llama3_8B_4bit)
450 | /// ```
451 | public class LLMModelFactory: ModelFactory {
    |              `- warning: non-final class 'LLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
452 |
453 |     public init(typeRegistry: ModelTypeRegistry, modelRegistry: AbstractModelRegistry) {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:31:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 29 |     private static func all() -> [String: @Sendable (URL) throws -> any LanguageModel] {
 30 |         [
 31 |             "mistral": create(LlamaConfiguration.self, LlamaModel.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 32 |             "llama": create(LlamaConfiguration.self, LlamaModel.init),
 33 |             "phi": create(PhiConfiguration.self, PhiModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:32:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 30 |         [
 31 |             "mistral": create(LlamaConfiguration.self, LlamaModel.init),
 32 |             "llama": create(LlamaConfiguration.self, LlamaModel.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 33 |             "phi": create(PhiConfiguration.self, PhiModel.init),
 34 |             "phi3": create(Phi3Configuration.self, Phi3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:33:20: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 31 |             "mistral": create(LlamaConfiguration.self, LlamaModel.init),
 32 |             "llama": create(LlamaConfiguration.self, LlamaModel.init),
 33 |             "phi": create(PhiConfiguration.self, PhiModel.init),
    |                    `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 34 |             "phi3": create(Phi3Configuration.self, Phi3Model.init),
 35 |             "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:34:21: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 32 |             "llama": create(LlamaConfiguration.self, LlamaModel.init),
 33 |             "phi": create(PhiConfiguration.self, PhiModel.init),
 34 |             "phi3": create(Phi3Configuration.self, Phi3Model.init),
    |                     `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 35 |             "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
 36 |             "gemma": create(GemmaConfiguration.self, GemmaModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:35:23: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 33 |             "phi": create(PhiConfiguration.self, PhiModel.init),
 34 |             "phi3": create(Phi3Configuration.self, Phi3Model.init),
 35 |             "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
    |                       `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 36 |             "gemma": create(GemmaConfiguration.self, GemmaModel.init),
 37 |             "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:36:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 34 |             "phi3": create(Phi3Configuration.self, Phi3Model.init),
 35 |             "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
 36 |             "gemma": create(GemmaConfiguration.self, GemmaModel.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 37 |             "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
 38 |             "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:37:23: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 35 |             "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
 36 |             "gemma": create(GemmaConfiguration.self, GemmaModel.init),
 37 |             "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
    |                       `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 38 |             "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
 39 |             "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:38:23: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 36 |             "gemma": create(GemmaConfiguration.self, GemmaModel.init),
 37 |             "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
 38 |             "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
    |                       `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 39 |             "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
 40 |             "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:39:28: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 37 |             "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
 38 |             "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
 39 |             "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
    |                            `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 40 |             "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
 41 |             "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:40:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 38 |             "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
 39 |             "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
 40 |             "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 41 |             "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
 42 |             "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:41:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 39 |             "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
 40 |             "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
 41 |             "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 42 |             "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
 43 |             "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:42:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 40 |             "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
 41 |             "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
 42 |             "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 43 |             "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
 44 |             "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:43:26: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 41 |             "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
 42 |             "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
 43 |             "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
    |                          `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 44 |             "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
 45 |             "cohere": create(CohereConfiguration.self, CohereModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:44:27: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 42 |             "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
 43 |             "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
 44 |             "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
    |                           `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 45 |             "cohere": create(CohereConfiguration.self, CohereModel.init),
 46 |             "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:45:23: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 43 |             "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
 44 |             "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
 45 |             "cohere": create(CohereConfiguration.self, CohereModel.init),
    |                       `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 46 |             "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
 47 |             "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:46:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 44 |             "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
 45 |             "cohere": create(CohereConfiguration.self, CohereModel.init),
 46 |             "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 47 |             "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
 48 |             "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:47:26: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 45 |             "cohere": create(CohereConfiguration.self, CohereModel.init),
 46 |             "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
 47 |             "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
    |                          `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 48 |             "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
 49 |             "granite": create(GraniteConfiguration.self, GraniteModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:48:28: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 46 |             "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
 47 |             "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
 48 |             "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
    |                            `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 49 |             "granite": create(GraniteConfiguration.self, GraniteModel.init),
 50 |             "granitemoehybrid": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:49:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 47 |             "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
 48 |             "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
 49 |             "granite": create(GraniteConfiguration.self, GraniteModel.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 50 |             "granitemoehybrid": create(
 51 |                 GraniteMoeHybridConfiguration.self, GraniteMoeHybridModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:50:33: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 48 |             "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
 49 |             "granite": create(GraniteConfiguration.self, GraniteModel.init),
 50 |             "granitemoehybrid": create(
    |                                 `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 51 |                 GraniteMoeHybridConfiguration.self, GraniteMoeHybridModel.init),
 52 |             "mimo": create(MiMoConfiguration.self, MiMoModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:52:21: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 50 |             "granitemoehybrid": create(
 51 |                 GraniteMoeHybridConfiguration.self, GraniteMoeHybridModel.init),
 52 |             "mimo": create(MiMoConfiguration.self, MiMoModel.init),
    |                     `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 53 |             "glm4": create(GLM4Configuration.self, GLM4Model.init),
 54 |             "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:53:21: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 51 |                 GraniteMoeHybridConfiguration.self, GraniteMoeHybridModel.init),
 52 |             "mimo": create(MiMoConfiguration.self, MiMoModel.init),
 53 |             "glm4": create(GLM4Configuration.self, GLM4Model.init),
    |                     `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 54 |             "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
 55 |             "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:54:26: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 52 |             "mimo": create(MiMoConfiguration.self, MiMoModel.init),
 53 |             "glm4": create(GLM4Configuration.self, GLM4Model.init),
 54 |             "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
    |                          `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 55 |             "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
 56 |             "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:55:26: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 53 |             "glm4": create(GLM4Configuration.self, GLM4Model.init),
 54 |             "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
 55 |             "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
    |                          `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 56 |             "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
 57 |             "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:56:23: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 54 |             "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
 55 |             "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
 56 |             "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
    |                       `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 57 |             "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
 58 |             "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:57:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 55 |             "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
 56 |             "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
 57 |             "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 58 |             "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
 59 |             "lfm2": create(LFM2Configuration.self, LFM2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:58:25: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 56 |             "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
 57 |             "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
 58 |             "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
    |                         `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 59 |             "lfm2": create(LFM2Configuration.self, LFM2Model.init),
 60 |             "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:59:21: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 57 |             "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
 58 |             "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
 59 |             "lfm2": create(LFM2Configuration.self, LFM2Model.init),
    |                     `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 60 |             "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
 61 |             "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:60:28: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 58 |             "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
 59 |             "lfm2": create(LFM2Configuration.self, LFM2Model.init),
 60 |             "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
    |                            `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 61 |             "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:61:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 59 |             "lfm2": create(LFM2Configuration.self, LFM2Model.init),
 60 |             "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
 61 |             "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:62:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 60 |             "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
 61 |             "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:63:27: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 61 |             "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
    |                           `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:64:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:65:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
 67 |             "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:66:28: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
    |                            `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 67 |             "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
 68 |             "nanochat": create(NanoChatConfiguration.self, NanoChatModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:67:25: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
 67 |             "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
    |                         `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 68 |             "nanochat": create(NanoChatConfiguration.self, NanoChatModel.init),
 69 |         ]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:68:25: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
 67 |             "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
 68 |             "nanochat": create(NanoChatConfiguration.self, NanoChatModel.init),
    |                         `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 69 |         ]
 70 |     }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:515:17: warning: returning task-isolated 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
513 |             messageGenerator: messageGenerator)
514 |
515 |         return .init(
    |                 |- warning: returning task-isolated 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
    |                 `- note: returning task-isolated 'model' risks causing data races since the caller assumes that 'model' can be safely sent to other isolation domains
516 |             configuration: configuration, model: model, processor: processor, tokenizer: tokenizer)
517 |     }
[469/510] Compiling MLXLLM BaichuanM1.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModel.swift:27:13: warning: variable 'state' was never mutated; consider changing to 'let' constant
25 |         let prefillStepSize = windowSize ?? 512
26 |         var y = input.text
27 |         var state: LMOutput.State? = nil
   |             `- warning: variable 'state' was never mutated; consider changing to 'let' constant
28 |
29 |         // prepare the prompt in chunks if larger than the prefill size
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModel.swift:32:17: warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
30 |         while y.tokens.size > prefillStepSize {
31 |             let input = y[.newAxis, ..<prefillStepSize]
32 |             let result = self(input, cache: cache.isEmpty ? nil : cache, state: state)
   |                 `- warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
33 |             eval(cache)
34 |             y = y[prefillStepSize...]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:451:14: warning: non-final class 'LLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
449 | ///     configuration: LLMRegistry.llama3_8B_4bit)
450 | /// ```
451 | public class LLMModelFactory: ModelFactory {
    |              `- warning: non-final class 'LLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
452 |
453 |     public init(typeRegistry: ModelTypeRegistry, modelRegistry: AbstractModelRegistry) {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:31:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 29 |     private static func all() -> [String: @Sendable (URL) throws -> any LanguageModel] {
 30 |         [
 31 |             "mistral": create(LlamaConfiguration.self, LlamaModel.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 32 |             "llama": create(LlamaConfiguration.self, LlamaModel.init),
 33 |             "phi": create(PhiConfiguration.self, PhiModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:32:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 30 |         [
 31 |             "mistral": create(LlamaConfiguration.self, LlamaModel.init),
 32 |             "llama": create(LlamaConfiguration.self, LlamaModel.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 33 |             "phi": create(PhiConfiguration.self, PhiModel.init),
 34 |             "phi3": create(Phi3Configuration.self, Phi3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:33:20: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 31 |             "mistral": create(LlamaConfiguration.self, LlamaModel.init),
 32 |             "llama": create(LlamaConfiguration.self, LlamaModel.init),
 33 |             "phi": create(PhiConfiguration.self, PhiModel.init),
    |                    `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 34 |             "phi3": create(Phi3Configuration.self, Phi3Model.init),
 35 |             "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:34:21: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 32 |             "llama": create(LlamaConfiguration.self, LlamaModel.init),
 33 |             "phi": create(PhiConfiguration.self, PhiModel.init),
 34 |             "phi3": create(Phi3Configuration.self, Phi3Model.init),
    |                     `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 35 |             "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
 36 |             "gemma": create(GemmaConfiguration.self, GemmaModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:35:23: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 33 |             "phi": create(PhiConfiguration.self, PhiModel.init),
 34 |             "phi3": create(Phi3Configuration.self, Phi3Model.init),
 35 |             "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
    |                       `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 36 |             "gemma": create(GemmaConfiguration.self, GemmaModel.init),
 37 |             "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:36:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 34 |             "phi3": create(Phi3Configuration.self, Phi3Model.init),
 35 |             "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
 36 |             "gemma": create(GemmaConfiguration.self, GemmaModel.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 37 |             "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
 38 |             "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:37:23: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 35 |             "phimoe": create(PhiMoEConfiguration.self, PhiMoEModel.init),
 36 |             "gemma": create(GemmaConfiguration.self, GemmaModel.init),
 37 |             "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
    |                       `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 38 |             "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
 39 |             "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:38:23: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 36 |             "gemma": create(GemmaConfiguration.self, GemmaModel.init),
 37 |             "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
 38 |             "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
    |                       `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 39 |             "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
 40 |             "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:39:28: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 37 |             "gemma2": create(Gemma2Configuration.self, Gemma2Model.init),
 38 |             "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
 39 |             "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
    |                            `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 40 |             "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
 41 |             "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:40:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 38 |             "gemma3": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
 39 |             "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
 40 |             "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 41 |             "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
 42 |             "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:41:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 39 |             "gemma3_text": create(Gemma3TextConfiguration.self, Gemma3TextModel.init),
 40 |             "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
 41 |             "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 42 |             "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
 43 |             "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:42:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 40 |             "gemma3n": create(Gemma3nTextConfiguration.self, Gemma3nTextModel.init),
 41 |             "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
 42 |             "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 43 |             "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
 44 |             "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:43:26: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 41 |             "qwen2": create(Qwen2Configuration.self, Qwen2Model.init),
 42 |             "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
 43 |             "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
    |                          `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 44 |             "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
 45 |             "cohere": create(CohereConfiguration.self, CohereModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:44:27: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 42 |             "qwen3": create(Qwen3Configuration.self, Qwen3Model.init),
 43 |             "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
 44 |             "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
    |                           `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 45 |             "cohere": create(CohereConfiguration.self, CohereModel.init),
 46 |             "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:45:23: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 43 |             "qwen3_moe": create(Qwen3MoEConfiguration.self, Qwen3MoEModel.init),
 44 |             "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
 45 |             "cohere": create(CohereConfiguration.self, CohereModel.init),
    |                       `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 46 |             "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
 47 |             "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:46:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 44 |             "starcoder2": create(Starcoder2Configuration.self, Starcoder2Model.init),
 45 |             "cohere": create(CohereConfiguration.self, CohereModel.init),
 46 |             "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 47 |             "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
 48 |             "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:47:26: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 45 |             "cohere": create(CohereConfiguration.self, CohereModel.init),
 46 |             "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
 47 |             "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
    |                          `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 48 |             "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
 49 |             "granite": create(GraniteConfiguration.self, GraniteModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:48:28: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 46 |             "openelm": create(OpenElmConfiguration.self, OpenELMModel.init),
 47 |             "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
 48 |             "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
    |                            `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 49 |             "granite": create(GraniteConfiguration.self, GraniteModel.init),
 50 |             "granitemoehybrid": create(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:49:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 47 |             "internlm2": create(InternLM2Configuration.self, InternLM2Model.init),
 48 |             "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
 49 |             "granite": create(GraniteConfiguration.self, GraniteModel.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 50 |             "granitemoehybrid": create(
 51 |                 GraniteMoeHybridConfiguration.self, GraniteMoeHybridModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:50:33: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 48 |             "deepseek_v3": create(DeepseekV3Configuration.self, DeepseekV3Model.init),
 49 |             "granite": create(GraniteConfiguration.self, GraniteModel.init),
 50 |             "granitemoehybrid": create(
    |                                 `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 51 |                 GraniteMoeHybridConfiguration.self, GraniteMoeHybridModel.init),
 52 |             "mimo": create(MiMoConfiguration.self, MiMoModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:52:21: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 50 |             "granitemoehybrid": create(
 51 |                 GraniteMoeHybridConfiguration.self, GraniteMoeHybridModel.init),
 52 |             "mimo": create(MiMoConfiguration.self, MiMoModel.init),
    |                     `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 53 |             "glm4": create(GLM4Configuration.self, GLM4Model.init),
 54 |             "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:53:21: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 51 |                 GraniteMoeHybridConfiguration.self, GraniteMoeHybridModel.init),
 52 |             "mimo": create(MiMoConfiguration.self, MiMoModel.init),
 53 |             "glm4": create(GLM4Configuration.self, GLM4Model.init),
    |                     `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 54 |             "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
 55 |             "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:54:26: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 52 |             "mimo": create(MiMoConfiguration.self, MiMoModel.init),
 53 |             "glm4": create(GLM4Configuration.self, GLM4Model.init),
 54 |             "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
    |                          `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 55 |             "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
 56 |             "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:55:26: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 53 |             "glm4": create(GLM4Configuration.self, GLM4Model.init),
 54 |             "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
 55 |             "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
    |                          `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 56 |             "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
 57 |             "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:56:23: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 54 |             "acereason": create(Qwen2Configuration.self, Qwen2Model.init),
 55 |             "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
 56 |             "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
    |                       `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 57 |             "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
 58 |             "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:57:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 55 |             "falcon_h1": create(FalconH1Configuration.self, FalconH1Model.init),
 56 |             "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
 57 |             "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 58 |             "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
 59 |             "lfm2": create(LFM2Configuration.self, LFM2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:58:25: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 56 |             "bitnet": create(BitnetConfiguration.self, BitnetModel.init),
 57 |             "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
 58 |             "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
    |                         `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 59 |             "lfm2": create(LFM2Configuration.self, LFM2Model.init),
 60 |             "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:59:21: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 57 |             "smollm3": create(SmolLM3Configuration.self, SmolLM3Model.init),
 58 |             "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
 59 |             "lfm2": create(LFM2Configuration.self, LFM2Model.init),
    |                     `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 60 |             "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
 61 |             "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:60:28: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 58 |             "ernie4_5": create(Ernie45Configuration.self, Ernie45Model.init),
 59 |             "lfm2": create(LFM2Configuration.self, LFM2Model.init),
 60 |             "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
    |                            `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 61 |             "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:61:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 59 |             "lfm2": create(LFM2Configuration.self, LFM2Model.init),
 60 |             "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
 61 |             "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:62:24: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 60 |             "baichuan_m1": create(BaichuanM1Configuration.self, BaichuanM1Model.init),
 61 |             "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
    |                        `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:63:27: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 61 |             "exaone4": create(Exaone4Configuration.self, Exaone4Model.init),
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
    |                           `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:64:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 62 |             "gpt_oss": create(GPTOSSConfiguration.self, GPTOSSModel.init),
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:65:22: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 63 |             "lille-130m": create(Lille130mConfiguration.self, Lille130mModel.init),
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
    |                      `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
 67 |             "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:66:28: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 64 |             "olmoe": create(OlmoEConfiguration.self, OlmoEModel.init),
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
    |                            `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 67 |             "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
 68 |             "nanochat": create(NanoChatConfiguration.self, NanoChatModel.init),
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:67:25: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 65 |             "olmo2": create(Olmo2Configuration.self, Olmo2Model.init),
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
 67 |             "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
    |                         `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 68 |             "nanochat": create(NanoChatConfiguration.self, NanoChatModel.init),
 69 |         ]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:68:25: warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 66 |             "bailing_moe": create(BailingMoeConfiguration.self, BailingMoeModel.init),
 67 |             "lfm2_moe": create(LFM2MoEConfiguration.self, LFM2MoEModel.init),
 68 |             "nanochat": create(NanoChatConfiguration.self, NanoChatModel.init),
    |                         `- warning: converting non-Sendable function value to '@Sendable (URL) throws -> any LanguageModel' may introduce data races
 69 |         ]
 70 |     }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/LLMModelFactory.swift:515:17: warning: returning task-isolated 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
513 |             messageGenerator: messageGenerator)
514 |
515 |         return .init(
    |                 |- warning: returning task-isolated 'model' as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
    |                 `- note: returning task-isolated 'model' risks causing data races since the caller assumes that 'model' can be safely sent to other isolation domains
516 |             configuration: configuration, model: model, processor: processor, tokenizer: tokenizer)
517 |     }
[470/510] Compiling MLXLLM Phi.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Phi3.swift:63:17: warning: immutable value 'shortFactor' was never used; consider replacing with '_' or removing it [#no-usage]
 61 |         if let ropeScaling = args.ropeScaling,
 62 |             ropeScaling.type == "su" || ropeScaling.type == "longrope",
 63 |             let shortFactor = ropeScaling.shortFactor, let longFactor = ropeScaling.longFactor
    |                 `- warning: immutable value 'shortFactor' was never used; consider replacing with '_' or removing it [#no-usage]
 64 |         {
 65 |             self.rope = .suScaledRotaryEmbedding(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/PhiMoE.swift:90:13: warning: variable 'v' was never mutated; consider changing to 'let' constant
 88 |         var q = queries.reshaped(B, L, args.attentionHeads, -1).transposed(0, 2, 1, 3)
 89 |         var k = keys.reshaped(B, L, args.kvHeads, -1).transposed(0, 2, 1, 3)
 90 |         var v = values.reshaped(B, L, args.kvHeads, -1).transposed(0, 2, 1, 3)
    |             `- warning: variable 'v' was never mutated; consider changing to 'let' constant
 91 |
 92 |         if let cache {
[471/510] Compiling MLXLLM Phi3.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Phi3.swift:63:17: warning: immutable value 'shortFactor' was never used; consider replacing with '_' or removing it [#no-usage]
 61 |         if let ropeScaling = args.ropeScaling,
 62 |             ropeScaling.type == "su" || ropeScaling.type == "longrope",
 63 |             let shortFactor = ropeScaling.shortFactor, let longFactor = ropeScaling.longFactor
    |                 `- warning: immutable value 'shortFactor' was never used; consider replacing with '_' or removing it [#no-usage]
 64 |         {
 65 |             self.rope = .suScaledRotaryEmbedding(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/PhiMoE.swift:90:13: warning: variable 'v' was never mutated; consider changing to 'let' constant
 88 |         var q = queries.reshaped(B, L, args.attentionHeads, -1).transposed(0, 2, 1, 3)
 89 |         var k = keys.reshaped(B, L, args.kvHeads, -1).transposed(0, 2, 1, 3)
 90 |         var v = values.reshaped(B, L, args.kvHeads, -1).transposed(0, 2, 1, 3)
    |             `- warning: variable 'v' was never mutated; consider changing to 'let' constant
 91 |
 92 |         if let cache {
[472/510] Compiling MLXLLM PhiMoE.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Phi3.swift:63:17: warning: immutable value 'shortFactor' was never used; consider replacing with '_' or removing it [#no-usage]
 61 |         if let ropeScaling = args.ropeScaling,
 62 |             ropeScaling.type == "su" || ropeScaling.type == "longrope",
 63 |             let shortFactor = ropeScaling.shortFactor, let longFactor = ropeScaling.longFactor
    |                 `- warning: immutable value 'shortFactor' was never used; consider replacing with '_' or removing it [#no-usage]
 64 |         {
 65 |             self.rope = .suScaledRotaryEmbedding(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/PhiMoE.swift:90:13: warning: variable 'v' was never mutated; consider changing to 'let' constant
 88 |         var q = queries.reshaped(B, L, args.attentionHeads, -1).transposed(0, 2, 1, 3)
 89 |         var k = keys.reshaped(B, L, args.kvHeads, -1).transposed(0, 2, 1, 3)
 90 |         var v = values.reshaped(B, L, args.kvHeads, -1).transposed(0, 2, 1, 3)
    |             `- warning: variable 'v' was never mutated; consider changing to 'let' constant
 91 |
 92 |         if let cache {
[473/510] Compiling MLXLLM Qwen2.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Phi3.swift:63:17: warning: immutable value 'shortFactor' was never used; consider replacing with '_' or removing it [#no-usage]
 61 |         if let ropeScaling = args.ropeScaling,
 62 |             ropeScaling.type == "su" || ropeScaling.type == "longrope",
 63 |             let shortFactor = ropeScaling.shortFactor, let longFactor = ropeScaling.longFactor
    |                 `- warning: immutable value 'shortFactor' was never used; consider replacing with '_' or removing it [#no-usage]
 64 |         {
 65 |             self.rope = .suScaledRotaryEmbedding(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/PhiMoE.swift:90:13: warning: variable 'v' was never mutated; consider changing to 'let' constant
 88 |         var q = queries.reshaped(B, L, args.attentionHeads, -1).transposed(0, 2, 1, 3)
 89 |         var k = keys.reshaped(B, L, args.kvHeads, -1).transposed(0, 2, 1, 3)
 90 |         var v = values.reshaped(B, L, args.kvHeads, -1).transposed(0, 2, 1, 3)
    |             `- warning: variable 'v' was never mutated; consider changing to 'let' constant
 91 |
 92 |         if let cache {
[474/510] Compiling MLXLLM LFM2MoE.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/LFM2MoE.swift:209:13: warning: variable 'B' was never mutated; consider changing to 'let' constant
207 |         let BCx = inProj(x)
208 |         let parts = BCx.split(parts: 3, axis: -1)
209 |         var B = parts[0]
    |             `- warning: variable 'B' was never mutated; consider changing to 'let' constant
210 |         let C = parts[1]
211 |         let xComp = parts[2]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/LFM2MoE.swift:296:13: warning: variable 'indices' was never mutated; consider changing to 'let' constant
294 |
295 |         let k = topK
296 |         var indices = argPartition(-gates, kth: k - 1, axis: -1)[.ellipsis, ..<k]
    |             `- warning: variable 'indices' was never mutated; consider changing to 'let' constant
297 |         var scores = takeAlong(gates, indices, axis: -1)
298 |         if normTopKProb {
[475/510] Compiling MLXLLM Lille130m.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/LFM2MoE.swift:209:13: warning: variable 'B' was never mutated; consider changing to 'let' constant
207 |         let BCx = inProj(x)
208 |         let parts = BCx.split(parts: 3, axis: -1)
209 |         var B = parts[0]
    |             `- warning: variable 'B' was never mutated; consider changing to 'let' constant
210 |         let C = parts[1]
211 |         let xComp = parts[2]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/LFM2MoE.swift:296:13: warning: variable 'indices' was never mutated; consider changing to 'let' constant
294 |
295 |         let k = topK
296 |         var indices = argPartition(-gates, kth: k - 1, axis: -1)[.ellipsis, ..<k]
    |             `- warning: variable 'indices' was never mutated; consider changing to 'let' constant
297 |         var scores = takeAlong(gates, indices, axis: -1)
298 |         if normTopKProb {
[476/510] Compiling MLXLLM Llama.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/LFM2MoE.swift:209:13: warning: variable 'B' was never mutated; consider changing to 'let' constant
207 |         let BCx = inProj(x)
208 |         let parts = BCx.split(parts: 3, axis: -1)
209 |         var B = parts[0]
    |             `- warning: variable 'B' was never mutated; consider changing to 'let' constant
210 |         let C = parts[1]
211 |         let xComp = parts[2]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/LFM2MoE.swift:296:13: warning: variable 'indices' was never mutated; consider changing to 'let' constant
294 |
295 |         let k = topK
296 |         var indices = argPartition(-gates, kth: k - 1, axis: -1)[.ellipsis, ..<k]
    |             `- warning: variable 'indices' was never mutated; consider changing to 'let' constant
297 |         var scores = takeAlong(gates, indices, axis: -1)
298 |         if normTopKProb {
[477/510] Compiling MLXLLM MiMo.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/LFM2MoE.swift:209:13: warning: variable 'B' was never mutated; consider changing to 'let' constant
207 |         let BCx = inProj(x)
208 |         let parts = BCx.split(parts: 3, axis: -1)
209 |         var B = parts[0]
    |             `- warning: variable 'B' was never mutated; consider changing to 'let' constant
210 |         let C = parts[1]
211 |         let xComp = parts[2]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/LFM2MoE.swift:296:13: warning: variable 'indices' was never mutated; consider changing to 'let' constant
294 |
295 |         let k = topK
296 |         var indices = argPartition(-gates, kth: k - 1, axis: -1)[.ellipsis, ..<k]
    |             `- warning: variable 'indices' was never mutated; consider changing to 'let' constant
297 |         var scores = takeAlong(gates, indices, axis: -1)
298 |         if normTopKProb {
[478/510] Compiling MLXLLM NanoChat.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/OpenELM.swift:72:13: warning: variable 'values' was never mutated; consider changing to 'let' constant
 70 |         var queries = qkvSplit[0]
 71 |         var keys = qkvSplit[1]
 72 |         var values = qkvSplit[2]
    |             `- warning: variable 'values' was never mutated; consider changing to 'let' constant
 73 |
 74 |         if let qNorm, let kNorm {
[479/510] Compiling MLXLLM Olmo2.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/OpenELM.swift:72:13: warning: variable 'values' was never mutated; consider changing to 'let' constant
 70 |         var queries = qkvSplit[0]
 71 |         var keys = qkvSplit[1]
 72 |         var values = qkvSplit[2]
    |             `- warning: variable 'values' was never mutated; consider changing to 'let' constant
 73 |
 74 |         if let qNorm, let kNorm {
[480/510] Compiling MLXLLM OlmoE.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/OpenELM.swift:72:13: warning: variable 'values' was never mutated; consider changing to 'let' constant
 70 |         var queries = qkvSplit[0]
 71 |         var keys = qkvSplit[1]
 72 |         var values = qkvSplit[2]
    |             `- warning: variable 'values' was never mutated; consider changing to 'let' constant
 73 |
 74 |         if let qNorm, let kNorm {
[481/510] Compiling MLXLLM OpenELM.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/OpenELM.swift:72:13: warning: variable 'values' was never mutated; consider changing to 'let' constant
 70 |         var queries = qkvSplit[0]
 71 |         var keys = qkvSplit[1]
 72 |         var values = qkvSplit[2]
    |             `- warning: variable 'values' was never mutated; consider changing to 'let' constant
 73 |
 74 |         if let qNorm, let kNorm {
[482/510] Compiling MLXLLM Granite.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:124:13: warning: initialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
122 |
123 |     public init(_ args: GraniteConfiguration) {
124 |         let attentionHeads = args.attentionHeads
    |             `- warning: initialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
125 |         let hiddenSize = args.hiddenSize
126 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:274:74: warning: left side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used
272 |         self.kvHeads = try container.decode(Int.self, forKey: .kvHeads)
273 |         self.attentionBias = try container.decode(Bool.self, forKey: .attentionBias)
274 |         self.mlpBias = try container.decode(Bool.self, forKey: .mlpBias) ?? false
    |                                                                          `- warning: left side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used
275 |         self.ropeTheta = try container.decodeIfPresent(Float.self, forKey: .ropeTheta) ?? 10000000.0
276 |         self.ropeScaling = try container.decodeIfPresent(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:122:13: warning: variable 'padded' was never mutated; consider changing to 'let' constant
120 |         }
121 |
122 |         var padded = concatenated([convState!, input], axis: 1)
    |             `- warning: variable 'padded' was never mutated; consider changing to 'let' constant
123 |
124 |         if let cache {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:139:13: warning: variable 'projected' was never mutated; consider changing to 'let' constant
137 |         cache: MambaCache?
138 |     ) -> MLXArray {
139 |         var projected = inProj(hiddenStates)
    |             `- warning: variable 'projected' was never mutated; consider changing to 'let' constant
140 |         let splits = split(
141 |             projected, indices: [intermediateSize, intermediateSize + convDim], axis: -1)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:142:13: warning: variable 'gate' was never mutated; consider changing to 'let' constant
140 |         let splits = split(
141 |             projected, indices: [intermediateSize, intermediateSize + convDim], axis: -1)
142 |         var gate = splits[0]
    |             `- warning: variable 'gate' was never mutated; consider changing to 'let' constant
143 |         var convInput = splits[1]
144 |         var dt = splits[2]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:144:13: warning: variable 'dt' was never mutated; consider changing to 'let' constant
142 |         var gate = splits[0]
143 |         var convInput = splits[1]
144 |         var dt = splits[2]
    |             `- warning: variable 'dt' was never mutated; consider changing to 'let' constant
145 |
146 |         if let mask {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:554:25: warning: variable 'inputWeight' was never mutated; consider changing to 'let' constant
552 |                 let prefix = "model.layers.\(layerIndex).block_sparse_moe"
553 |                 guard
554 |                     var inputWeight = sanitized.removeValue(forKey: "\(prefix).input_linear.weight")
    |                         `- warning: variable 'inputWeight' was never mutated; consider changing to 'let' constant
555 |                 else { continue }
556 |
[483/510] Compiling MLXLLM GraniteMoeHybrid.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:124:13: warning: initialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
122 |
123 |     public init(_ args: GraniteConfiguration) {
124 |         let attentionHeads = args.attentionHeads
    |             `- warning: initialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
125 |         let hiddenSize = args.hiddenSize
126 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:274:74: warning: left side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used
272 |         self.kvHeads = try container.decode(Int.self, forKey: .kvHeads)
273 |         self.attentionBias = try container.decode(Bool.self, forKey: .attentionBias)
274 |         self.mlpBias = try container.decode(Bool.self, forKey: .mlpBias) ?? false
    |                                                                          `- warning: left side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used
275 |         self.ropeTheta = try container.decodeIfPresent(Float.self, forKey: .ropeTheta) ?? 10000000.0
276 |         self.ropeScaling = try container.decodeIfPresent(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:122:13: warning: variable 'padded' was never mutated; consider changing to 'let' constant
120 |         }
121 |
122 |         var padded = concatenated([convState!, input], axis: 1)
    |             `- warning: variable 'padded' was never mutated; consider changing to 'let' constant
123 |
124 |         if let cache {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:139:13: warning: variable 'projected' was never mutated; consider changing to 'let' constant
137 |         cache: MambaCache?
138 |     ) -> MLXArray {
139 |         var projected = inProj(hiddenStates)
    |             `- warning: variable 'projected' was never mutated; consider changing to 'let' constant
140 |         let splits = split(
141 |             projected, indices: [intermediateSize, intermediateSize + convDim], axis: -1)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:142:13: warning: variable 'gate' was never mutated; consider changing to 'let' constant
140 |         let splits = split(
141 |             projected, indices: [intermediateSize, intermediateSize + convDim], axis: -1)
142 |         var gate = splits[0]
    |             `- warning: variable 'gate' was never mutated; consider changing to 'let' constant
143 |         var convInput = splits[1]
144 |         var dt = splits[2]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:144:13: warning: variable 'dt' was never mutated; consider changing to 'let' constant
142 |         var gate = splits[0]
143 |         var convInput = splits[1]
144 |         var dt = splits[2]
    |             `- warning: variable 'dt' was never mutated; consider changing to 'let' constant
145 |
146 |         if let mask {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:554:25: warning: variable 'inputWeight' was never mutated; consider changing to 'let' constant
552 |                 let prefix = "model.layers.\(layerIndex).block_sparse_moe"
553 |                 guard
554 |                     var inputWeight = sanitized.removeValue(forKey: "\(prefix).input_linear.weight")
    |                         `- warning: variable 'inputWeight' was never mutated; consider changing to 'let' constant
555 |                 else { continue }
556 |
[484/510] Compiling MLXLLM Internlm2.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:124:13: warning: initialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
122 |
123 |     public init(_ args: GraniteConfiguration) {
124 |         let attentionHeads = args.attentionHeads
    |             `- warning: initialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
125 |         let hiddenSize = args.hiddenSize
126 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:274:74: warning: left side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used
272 |         self.kvHeads = try container.decode(Int.self, forKey: .kvHeads)
273 |         self.attentionBias = try container.decode(Bool.self, forKey: .attentionBias)
274 |         self.mlpBias = try container.decode(Bool.self, forKey: .mlpBias) ?? false
    |                                                                          `- warning: left side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used
275 |         self.ropeTheta = try container.decodeIfPresent(Float.self, forKey: .ropeTheta) ?? 10000000.0
276 |         self.ropeScaling = try container.decodeIfPresent(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:122:13: warning: variable 'padded' was never mutated; consider changing to 'let' constant
120 |         }
121 |
122 |         var padded = concatenated([convState!, input], axis: 1)
    |             `- warning: variable 'padded' was never mutated; consider changing to 'let' constant
123 |
124 |         if let cache {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:139:13: warning: variable 'projected' was never mutated; consider changing to 'let' constant
137 |         cache: MambaCache?
138 |     ) -> MLXArray {
139 |         var projected = inProj(hiddenStates)
    |             `- warning: variable 'projected' was never mutated; consider changing to 'let' constant
140 |         let splits = split(
141 |             projected, indices: [intermediateSize, intermediateSize + convDim], axis: -1)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:142:13: warning: variable 'gate' was never mutated; consider changing to 'let' constant
140 |         let splits = split(
141 |             projected, indices: [intermediateSize, intermediateSize + convDim], axis: -1)
142 |         var gate = splits[0]
    |             `- warning: variable 'gate' was never mutated; consider changing to 'let' constant
143 |         var convInput = splits[1]
144 |         var dt = splits[2]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:144:13: warning: variable 'dt' was never mutated; consider changing to 'let' constant
142 |         var gate = splits[0]
143 |         var convInput = splits[1]
144 |         var dt = splits[2]
    |             `- warning: variable 'dt' was never mutated; consider changing to 'let' constant
145 |
146 |         if let mask {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:554:25: warning: variable 'inputWeight' was never mutated; consider changing to 'let' constant
552 |                 let prefix = "model.layers.\(layerIndex).block_sparse_moe"
553 |                 guard
554 |                     var inputWeight = sanitized.removeValue(forKey: "\(prefix).input_linear.weight")
    |                         `- warning: variable 'inputWeight' was never mutated; consider changing to 'let' constant
555 |                 else { continue }
556 |
[485/510] Compiling MLXLLM LFM2.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:124:13: warning: initialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
122 |
123 |     public init(_ args: GraniteConfiguration) {
124 |         let attentionHeads = args.attentionHeads
    |             `- warning: initialization of immutable value 'attentionHeads' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
125 |         let hiddenSize = args.hiddenSize
126 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Granite.swift:274:74: warning: left side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used
272 |         self.kvHeads = try container.decode(Int.self, forKey: .kvHeads)
273 |         self.attentionBias = try container.decode(Bool.self, forKey: .attentionBias)
274 |         self.mlpBias = try container.decode(Bool.self, forKey: .mlpBias) ?? false
    |                                                                          `- warning: left side of nil coalescing operator '??' has non-optional type 'Bool', so the right side is never used
275 |         self.ropeTheta = try container.decodeIfPresent(Float.self, forKey: .ropeTheta) ?? 10000000.0
276 |         self.ropeScaling = try container.decodeIfPresent(
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:122:13: warning: variable 'padded' was never mutated; consider changing to 'let' constant
120 |         }
121 |
122 |         var padded = concatenated([convState!, input], axis: 1)
    |             `- warning: variable 'padded' was never mutated; consider changing to 'let' constant
123 |
124 |         if let cache {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:139:13: warning: variable 'projected' was never mutated; consider changing to 'let' constant
137 |         cache: MambaCache?
138 |     ) -> MLXArray {
139 |         var projected = inProj(hiddenStates)
    |             `- warning: variable 'projected' was never mutated; consider changing to 'let' constant
140 |         let splits = split(
141 |             projected, indices: [intermediateSize, intermediateSize + convDim], axis: -1)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:142:13: warning: variable 'gate' was never mutated; consider changing to 'let' constant
140 |         let splits = split(
141 |             projected, indices: [intermediateSize, intermediateSize + convDim], axis: -1)
142 |         var gate = splits[0]
    |             `- warning: variable 'gate' was never mutated; consider changing to 'let' constant
143 |         var convInput = splits[1]
144 |         var dt = splits[2]
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:144:13: warning: variable 'dt' was never mutated; consider changing to 'let' constant
142 |         var gate = splits[0]
143 |         var convInput = splits[1]
144 |         var dt = splits[2]
    |             `- warning: variable 'dt' was never mutated; consider changing to 'let' constant
145 |
146 |         if let mask {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/GraniteMoeHybrid.swift:554:25: warning: variable 'inputWeight' was never mutated; consider changing to 'let' constant
552 |                 let prefix = "model.layers.\(layerIndex).block_sparse_moe"
553 |                 guard
554 |                     var inputWeight = sanitized.removeValue(forKey: "\(prefix).input_linear.weight")
    |                         `- warning: variable 'inputWeight' was never mutated; consider changing to 'let' constant
555 |                 else { continue }
556 |
[486/510] Compiling MLXVLM Qwen2VL.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen2VL.swift:475:17: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
473 |             let rotaryPositionEmbedding = rotaryPositionEmbedding(frames)
474 |
475 |             let batchSize = frames.count
    |                 `- warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
476 |
477 |             for block in blocks {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen2VL.swift:562:31: warning: no calls to throwing functions occur within 'try' expression
560 |         let resizedSize = CGSize(width: resizedWidth, height: resizedHeight)
561 |
562 |         let processedImages = try images.map { image in
    |                               `- warning: no calls to throwing functions occur within 'try' expression
563 |             preprocess(image: image, resizedSize: resizedSize).asMLXArray()
564 |         }
[487/510] Compiling MLXVLM Paligemma.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:459:17: warning: no calls to throwing functions occur within 'try' expression
457 |         image = MediaProcessing.apply(image, processing: processing)
458 |
459 |         image = try MediaProcessing.resampleBicubic(image, to: config.size.cgSize)
    |                 `- warning: no calls to throwing functions occur within 'try' expression
460 |         image = MediaProcessing.normalize(
461 |             image, mean: config.imageMeanTuple, std: config.imageStdTuple)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:482:28: warning: no calls to throwing functions occur within 'try' expression
480 |             + "\n"
481 |
482 |         let promptTokens = try tokenizer.encode(text: prompt)
    |                            `- warning: no calls to throwing functions occur within 'try' expression
483 |         let promptArray = MLXArray(promptTokens).expandedDimensions(axis: 0)
484 |         let mask = ones(like: promptArray).asType(.int8)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:571:13: warning: initialization of immutable value 'embedDimension' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
569 |         attentionMask: MLXArray
570 |     ) -> (MLXArray, MLXArray) {
571 |         let embedDimension = imageFeatures.dim(2)
    |             `- warning: initialization of immutable value 'embedDimension' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
572 |         let (batchSize, sequenceLength) = inputIds.shape2
573 |         var scaledImageFeatures = imageFeatures / pow(Float(config.hiddenSize), 0.5)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:572:14: warning: immutable value 'batchSize' was never used; consider replacing with '_' or removing it [#no-usage]
570 |     ) -> (MLXArray, MLXArray) {
571 |         let embedDimension = imageFeatures.dim(2)
572 |         let (batchSize, sequenceLength) = inputIds.shape2
    |              `- warning: immutable value 'batchSize' was never used; consider replacing with '_' or removing it [#no-usage]
573 |         var scaledImageFeatures = imageFeatures / pow(Float(config.hiddenSize), 0.5)
574 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:572:25: warning: immutable value 'sequenceLength' was never used; consider replacing with '_' or removing it [#no-usage]
570 |     ) -> (MLXArray, MLXArray) {
571 |         let embedDimension = imageFeatures.dim(2)
572 |         let (batchSize, sequenceLength) = inputIds.shape2
    |                         `- warning: immutable value 'sequenceLength' was never used; consider replacing with '_' or removing it [#no-usage]
573 |         var scaledImageFeatures = imageFeatures / pow(Float(config.hiddenSize), 0.5)
574 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:580:13: warning: variable 'textMaskExpanded' was never mutated; consider changing to 'let' constant
578 |
579 |         // expand masks to match embedding dimension
580 |         var textMaskExpanded = expandedDimensions(textMask, axis: -1)
    |             `- warning: variable 'textMaskExpanded' was never mutated; consider changing to 'let' constant
581 |         var padMaskExpanded = expandedDimensions(padMask, axis: -1)
582 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:581:13: warning: variable 'padMaskExpanded' was never mutated; consider changing to 'let' constant
579 |         // expand masks to match embedding dimension
580 |         var textMaskExpanded = expandedDimensions(textMask, axis: -1)
581 |         var padMaskExpanded = expandedDimensions(padMask, axis: -1)
    |             `- warning: variable 'padMaskExpanded' was never mutated; consider changing to 'let' constant
582 |
583 |         // insert padding and text token embeddings
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Paligemma.swift:591:13: warning: variable 'imageMaskExpanded' was never mutated; consider changing to 'let' constant
589 |
590 |         // insert image embeddings - the image mask is always less or equal to the sentence in length
591 |         var imageMaskExpanded = expandedDimensions(imageMask, axis: -1)
    |             `- warning: variable 'imageMaskExpanded' was never mutated; consider changing to 'let' constant
592 |         finalEmbedding = which(imageMaskExpanded, scaledImageFeatures, finalEmbedding)
593 |
[488/510] Compiling MLXVLM Qwen25VL.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen25VL.swift:715:24: warning: no calls to throwing functions occur within 'try' expression
 713 |             }
 714 |             .map {
 715 |                 return try MediaProcessing.resampleBicubic($0, to: resizedSize)
     |                        `- warning: no calls to throwing functions occur within 'try' expression
 716 |             }
 717 |             .map {
[489/510] Compiling MLXVLM Idefics3.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Idefics3.swift:851:17: warning: initialization of immutable value 'count' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
849 |             }
850 |
851 |             let count = config.imageSequenceLength ?? 1
    |                 `- warning: initialization of immutable value 'count' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
852 |
853 |             // Encode only the text part of the prompt, without <image>
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Idefics3.swift:841:26: warning: no calls to throwing functions occur within 'try' expression
839 |         if input.images.isEmpty {
840 |             // No image scenario
841 |             let tokens = try tokenizer.encode(text: prompt)
    |                          `- warning: no calls to throwing functions occur within 'try' expression
842 |             let tokensArray = MLXArray(tokens).expandedDimensions(axis: 0)
843 |             let mask = ones(like: tokensArray)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Idefics3.swift:854:32: warning: no calls to throwing functions occur within 'try' expression
852 |
853 |             // Encode only the text part of the prompt, without <image>
854 |             var promptTokens = try tokenizer.encode(text: prompt)
    |                                `- warning: no calls to throwing functions occur within 'try' expression
855 |
856 |             let imageTokenIndex = promptTokens.count / 2
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Idefics3.swift:869:21: warning: no calls to throwing functions occur within 'try' expression
867 |             )
868 |             image = MediaProcessing.apply(image, processing: input.processing)
869 |             image = try MediaProcessing.resampleBicubic(image, to: targetSize)
    |                     `- warning: no calls to throwing functions occur within 'try' expression
870 |             image = MediaProcessing.normalize(
871 |                 image,
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:287:13: warning: initialization of immutable value 'secondsPerSample' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
285 |         let durationInSeconds = duration.seconds
286 |         let samplesPerSecond = Double(samplesPerSecond)
287 |         let secondsPerSample = 1.0 / samplesPerSecond
    |             `- warning: initialization of immutable value 'secondsPerSample' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
288 |         let totalFramesToSample = durationInSeconds * samplesPerSecond
289 |         let durationTimeValue = duration.value
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:302:46: warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
300 |         for await result in await generator.images(for: sampledTimes) {
301 |             switch result {
302 |             case .success(requestedTime: let requested, let image, actualTime: let actual):
    |                                              `- warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
303 |                 let ciImage = CIImage(
304 |                     cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:302:84: warning: immutable value 'actual' was never used; consider replacing with '_' or removing it [#no-usage]
300 |         for await result in await generator.images(for: sampledTimes) {
301 |             switch result {
302 |             case .success(requestedTime: let requested, let image, actualTime: let actual):
    |                                                                                    `- warning: immutable value 'actual' was never used; consider replacing with '_' or removing it [#no-usage]
303 |                 let ciImage = CIImage(
304 |                     cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:306:46: warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
304 |                     cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
305 |                 ciImages.append(ciImage)
306 |             case .failure(requestedTime: let requested, let error):
    |                                              `- warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
307 |                 break
308 |             }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:306:61: warning: immutable value 'error' was never used; consider replacing with '_' or removing it [#no-usage]
304 |                     cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
305 |                 ciImages.append(ciImage)
306 |             case .failure(requestedTime: let requested, let error):
    |                                                             `- warning: immutable value 'error' was never used; consider replacing with '_' or removing it [#no-usage]
307 |                 break
308 |             }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:300:29: warning: no 'async' operations occur within 'await' expression
298 |         // Collect the frames
299 |         var ciImages: [CIImage] = []
300 |         for await result in await generator.images(for: sampledTimes) {
    |                             `- warning: no 'async' operations occur within 'await' expression
301 |             switch result {
302 |             case .success(requestedTime: let requested, let image, actualTime: let actual):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:341:13: warning: variable 'desiredFrames' was never mutated; consider changing to 'let' constant
339 |         // Note: the round was not present in `asCIImageSequence`, so we may now be passing 1 more frame to Qwen depending on video duration.
340 |         let estimatedFrames = Int(round(fps * duration.seconds))
341 |         var desiredFrames = min(estimatedFrames, maxFrames)
    |             `- warning: variable 'desiredFrames' was never mutated; consider changing to 'let' constant
342 |         let finalFrameCount = max(desiredFrames, 1)
343 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:356:13: warning: variable 'frames' was never used; consider replacing with '_' or removing it [#no-usage]
354 |         var timestamps: [CMTime] = []
355 |
356 |         var frames: [VideoFrame] = []
    |             `- warning: variable 'frames' was never used; consider replacing with '_' or removing it [#no-usage]
357 |
358 |         for await result in await generator.images(for: sampledTimes) {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:360:46: warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
358 |         for await result in await generator.images(for: sampledTimes) {
359 |             switch result {
360 |             case .success(requestedTime: let requested, let image, actualTime: let actual):
    |                                              `- warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
361 |                 let ciImage = CIImage(
362 |                     cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:366:46: warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
364 |                 ciImages.append(frame.frame)
365 |                 timestamps.append(frame.timeStamp)
366 |             case .failure(requestedTime: let requested, let error):
    |                                              `- warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
367 |                 break
368 |             }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:366:61: warning: immutable value 'error' was never used; consider replacing with '_' or removing it [#no-usage]
364 |                 ciImages.append(frame.frame)
365 |                 timestamps.append(frame.timeStamp)
366 |             case .failure(requestedTime: let requested, let error):
    |                                                             `- warning: immutable value 'error' was never used; consider replacing with '_' or removing it [#no-usage]
367 |                 break
368 |             }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:358:29: warning: no 'async' operations occur within 'await' expression
356 |         var frames: [VideoFrame] = []
357 |
358 |         for await result in await generator.images(for: sampledTimes) {
    |                             `- warning: no 'async' operations occur within 'await' expression
359 |             switch result {
360 |             case .success(requestedTime: let requested, let image, actualTime: let actual):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:966:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 964 |     ) -> (MLXArray, MLXArray?) {
 965 |         let embedDim = inputsEmbeds.dim(2)
 966 |         let batchSize = inputIds.dim(0)
     |             `- warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 967 |         let sequenceLength = inputIds.dim(1)
 968 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:967:13: warning: initialization of immutable value 'sequenceLength' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 965 |         let embedDim = inputsEmbeds.dim(2)
 966 |         let batchSize = inputIds.dim(0)
 967 |         let sequenceLength = inputIds.dim(1)
     |             `- warning: initialization of immutable value 'sequenceLength' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 968 |
 969 |         // Scale image features to match text embedding magnitude
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:979:13: warning: initialization of immutable value 'textMask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 977 |
 978 |         // Create masks for different token types
 979 |         let textMask = MLX.logicalAnd(
     |             `- warning: initialization of immutable value 'textMask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 980 |             MLX.notEqual(inputIds, MLXArray(imageTokenId)),
 981 |             MLX.notEqual(inputIds, MLXArray(padTokenId))
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1019:56: warning: conditional cast from 'any KVCache' to 'any KVCache' always succeeds
1017 |         guard let imagePixels = input.image?.pixels else {
1018 |             // Text-only input
1019 |             let convertedCache = cache.compactMap { $0 as? KVCache }
     |                                                        `- warning: conditional cast from 'any KVCache' to 'any KVCache' always succeeds
1020 |             let result = languageModel(
1021 |                 input.text.tokens, cache: convertedCache, inputEmbedding: nil, mask: nil)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1031:52: warning: conditional cast from 'any KVCache' to 'any KVCache' always succeeds
1029 |         )
1030 |
1031 |         let convertedCache = cache.compactMap { $0 as? KVCache }
     |                                                    `- warning: conditional cast from 'any KVCache' to 'any KVCache' always succeeds
1032 |         // Use causal masking for text generation
1033 |         let maskMode: MLXFast.ScaledDotProductAttentionMaskMode = .causal
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1050:13: warning: initialization of immutable value 'lmHeadKeys' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1048 |
1049 |     public func sanitize(weights: [String: MLXArray]) -> [String: MLXArray] {
1050 |         let lmHeadKeys = weights.keys.filter { $0.contains("lm_head") }
     |             `- warning: initialization of immutable value 'lmHeadKeys' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1051 |
1052 |         // Also check attention layer structures
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1053:13: warning: initialization of immutable value 'attnKeys' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1051 |
1052 |         // Also check attention layer structures
1053 |         let attnKeys = weights.keys.filter {
     |             `- warning: initialization of immutable value 'attnKeys' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1054 |             $0.contains("self_attn")
1055 |                 && ($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: warning: no calls to throwing functions occur within 'try' expression
1090 |             let processedImage = MediaProcessing.apply(image, processing: userProcessing)
1091 |             let srgbImage = MediaProcessing.inSRGBToneCurveSpace(processedImage)
1092 |             let resizedImage = try MediaProcessing.resampleBicubic(srgbImage, to: targetSize)
     |                                `- warning: no calls to throwing functions occur within 'try' expression
1093 |             let normalizedImage = MediaProcessing.normalize(
1094 |                 resizedImage, mean: config.imageMeanTuple, std: config.imageStdTuple)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:287:13: warning: initialization of immutable value 'secondsPerSample' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
285 |         let durationInSeconds = duration.seconds
286 |         let samplesPerSecond = Double(samplesPerSecond)
287 |         let secondsPerSample = 1.0 / samplesPerSecond
    |             `- warning: initialization of immutable value 'secondsPerSample' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
288 |         let totalFramesToSample = durationInSeconds * samplesPerSecond
289 |         let durationTimeValue = duration.value
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:302:46: warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
300 |         for await result in await generator.images(for: sampledTimes) {
301 |             switch result {
302 |             case .success(requestedTime: let requested, let image, actualTime: let actual):
    |                                              `- warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
303 |                 let ciImage = CIImage(
304 |                     cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:302:84: warning: immutable value 'actual' was never used; consider replacing with '_' or removing it [#no-usage]
300 |         for await result in await generator.images(for: sampledTimes) {
301 |             switch result {
302 |             case .success(requestedTime: let requested, let image, actualTime: let actual):
    |                                                                                    `- warning: immutable value 'actual' was never used; consider replacing with '_' or removing it [#no-usage]
303 |                 let ciImage = CIImage(
304 |                     cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:306:46: warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
304 |                     cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
305 |                 ciImages.append(ciImage)
306 |             case .failure(requestedTime: let requested, let error):
    |                                              `- warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
307 |                 break
308 |             }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:306:61: warning: immutable value 'error' was never used; consider replacing with '_' or removing it [#no-usage]
304 |                     cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
305 |                 ciImages.append(ciImage)
306 |             case .failure(requestedTime: let requested, let error):
    |                                                             `- warning: immutable value 'error' was never used; consider replacing with '_' or removing it [#no-usage]
307 |                 break
308 |             }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:300:29: warning: no 'async' operations occur within 'await' expression
298 |         // Collect the frames
299 |         var ciImages: [CIImage] = []
300 |         for await result in await generator.images(for: sampledTimes) {
    |                             `- warning: no 'async' operations occur within 'await' expression
301 |             switch result {
302 |             case .success(requestedTime: let requested, let image, actualTime: let actual):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:341:13: warning: variable 'desiredFrames' was never mutated; consider changing to 'let' constant
339 |         // Note: the round was not present in `asCIImageSequence`, so we may now be passing 1 more frame to Qwen depending on video duration.
340 |         let estimatedFrames = Int(round(fps * duration.seconds))
341 |         var desiredFrames = min(estimatedFrames, maxFrames)
    |             `- warning: variable 'desiredFrames' was never mutated; consider changing to 'let' constant
342 |         let finalFrameCount = max(desiredFrames, 1)
343 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:356:13: warning: variable 'frames' was never used; consider replacing with '_' or removing it [#no-usage]
354 |         var timestamps: [CMTime] = []
355 |
356 |         var frames: [VideoFrame] = []
    |             `- warning: variable 'frames' was never used; consider replacing with '_' or removing it [#no-usage]
357 |
358 |         for await result in await generator.images(for: sampledTimes) {
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:360:46: warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
358 |         for await result in await generator.images(for: sampledTimes) {
359 |             switch result {
360 |             case .success(requestedTime: let requested, let image, actualTime: let actual):
    |                                              `- warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
361 |                 let ciImage = CIImage(
362 |                     cgImage: image, options: [.colorSpace: CGColorSpace(name: CGColorSpace.sRGB)!])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:366:46: warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
364 |                 ciImages.append(frame.frame)
365 |                 timestamps.append(frame.timeStamp)
366 |             case .failure(requestedTime: let requested, let error):
    |                                              `- warning: immutable value 'requested' was never used; consider replacing with '_' or removing it [#no-usage]
367 |                 break
368 |             }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:366:61: warning: immutable value 'error' was never used; consider replacing with '_' or removing it [#no-usage]
364 |                 ciImages.append(frame.frame)
365 |                 timestamps.append(frame.timeStamp)
366 |             case .failure(requestedTime: let requested, let error):
    |                                                             `- warning: immutable value 'error' was never used; consider replacing with '_' or removing it [#no-usage]
367 |                 break
368 |             }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/MediaProcessing.swift:358:29: warning: no 'async' operations occur within 'await' expression
356 |         var frames: [VideoFrame] = []
357 |
358 |         for await result in await generator.images(for: sampledTimes) {
    |                             `- warning: no 'async' operations occur within 'await' expression
359 |             switch result {
360 |             case .success(requestedTime: let requested, let image, actualTime: let actual):
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:966:13: warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 964 |     ) -> (MLXArray, MLXArray?) {
 965 |         let embedDim = inputsEmbeds.dim(2)
 966 |         let batchSize = inputIds.dim(0)
     |             `- warning: initialization of immutable value 'batchSize' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 967 |         let sequenceLength = inputIds.dim(1)
 968 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:967:13: warning: initialization of immutable value 'sequenceLength' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 965 |         let embedDim = inputsEmbeds.dim(2)
 966 |         let batchSize = inputIds.dim(0)
 967 |         let sequenceLength = inputIds.dim(1)
     |             `- warning: initialization of immutable value 'sequenceLength' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 968 |
 969 |         // Scale image features to match text embedding magnitude
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:979:13: warning: initialization of immutable value 'textMask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 977 |
 978 |         // Create masks for different token types
 979 |         let textMask = MLX.logicalAnd(
     |             `- warning: initialization of immutable value 'textMask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
 980 |             MLX.notEqual(inputIds, MLXArray(imageTokenId)),
 981 |             MLX.notEqual(inputIds, MLXArray(padTokenId))
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1019:56: warning: conditional cast from 'any KVCache' to 'any KVCache' always succeeds
1017 |         guard let imagePixels = input.image?.pixels else {
1018 |             // Text-only input
1019 |             let convertedCache = cache.compactMap { $0 as? KVCache }
     |                                                        `- warning: conditional cast from 'any KVCache' to 'any KVCache' always succeeds
1020 |             let result = languageModel(
1021 |                 input.text.tokens, cache: convertedCache, inputEmbedding: nil, mask: nil)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1031:52: warning: conditional cast from 'any KVCache' to 'any KVCache' always succeeds
1029 |         )
1030 |
1031 |         let convertedCache = cache.compactMap { $0 as? KVCache }
     |                                                    `- warning: conditional cast from 'any KVCache' to 'any KVCache' always succeeds
1032 |         // Use causal masking for text generation
1033 |         let maskMode: MLXFast.ScaledDotProductAttentionMaskMode = .causal
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1050:13: warning: initialization of immutable value 'lmHeadKeys' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1048 |
1049 |     public func sanitize(weights: [String: MLXArray]) -> [String: MLXArray] {
1050 |         let lmHeadKeys = weights.keys.filter { $0.contains("lm_head") }
     |             `- warning: initialization of immutable value 'lmHeadKeys' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1051 |
1052 |         // Also check attention layer structures
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Gemma3.swift:1053:13: warning: initialization of immutable value 'attnKeys' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1051 |
1052 |         // Also check attention layer structures
1053 |         let attnKeys = weights.keys.filter {
     |             `- warning: initialization of immutable value 'attnKeys' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1054 |             $0.contains("self_attn")
1055 |                 && ($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: warning: no calls to throwing functions occur within 'try' expression
1090 |             let processedImage = MediaProcessing.apply(image, processing: userProcessing)
1091 |             let srgbImage = MediaProcessing.inSRGBToneCurveSpace(processedImage)
1092 |             let resizedImage = try MediaProcessing.resampleBicubic(srgbImage, to: targetSize)
     |                                `- warning: no calls to throwing functions occur within 'try' expression
1093 |             let normalizedImage = MediaProcessing.normalize(
1094 |                 resizedImage, mean: config.imageMeanTuple, std: config.imageStdTuple)
[492/510] Emitting module MLXVLM
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/VLMModelFactory.swift:219:14: warning: non-final class 'VLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
217 | ///     configuration: VLMRegistry.paligemma3bMix4488bit)
218 | /// ```
219 | public class VLMModelFactory: ModelFactory {
    |              `- warning: non-final class 'VLMModelFactory' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
220 |
221 |     public init(
[493/510] Compiling MLXVLM Qwen3VL.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen3VL.swift:670:21: warning: variable 'intra' was never mutated; consider changing to 'let' constant
 668 |                 blockCols = blockCols.reshaped([1, mergedW, 1, 1])
 669 |
 670 |                 var intra = MLXArray(0 ..< merge).asType(.int32)
     |                     `- warning: variable 'intra' was never mutated; consider changing to 'let' constant
 671 |                 let intraRow = intra.reshaped([1, 1, merge, 1])
 672 |                 let intraCol = intra.reshaped([1, 1, 1, merge])
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen3VL.swift:950:17: warning: variable 'emb' was never mutated; consider changing to 'let' constant
 948 |             freqs = applyInterleavedMRope(freqs)
 949 |
 950 |             var emb = concatenated([freqs, freqs], axis: -1)
     |                 `- warning: variable 'emb' was never mutated; consider changing to 'let' constant
 951 |             let cosValues = cos(emb).asType(dtype)
 952 |             let sinValues = sin(emb).asType(dtype)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen3VL.swift:1188:17: warning: variable 'result' was never mutated; consider changing to 'let' constant
1186 |             let indexArray = MLXArray(indices.map { UInt32($0) })
1187 |
1188 |             var result = hiddenStates
     |                 `- warning: variable 'result' was never mutated; consider changing to 'let' constant
1189 |             result[0..., indexArray, 0...] = result[0..., indexArray, 0...] + visualEmbeds
1190 |
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen3VL.swift:1608:13: warning: initialization of immutable value 'inputMask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1606 |     ) throws -> PrepareResult {
1607 |         let inputIds = input.text.tokens
1608 |         let inputMask = input.text.mask
     |             `- warning: initialization of immutable value 'inputMask' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1609 |
1610 |         var pixelValues: MLXArray?
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen3VL.swift:1630:20: warning: value 'pixelValues' was defined but never used; consider replacing with boolean test [#no-usage]
1628 |         if !pixelParts.isEmpty {
1629 |             pixelValues = concatenated(pixelParts)
1630 |             if let pixelValues {
     |                    `- warning: value 'pixelValues' was defined but never used; consider replacing with boolean test [#no-usage]
1631 |             }
1632 |         }
/Users/admin/builder/spi-builder-workspace/Libraries/MLXVLM/Models/Qwen3VL.swift:1690:13: warning: initialization of immutable value 'offset' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1688 |         let typedCache = castCacheOptional(cache)
1689 |
1690 |         let offset = cache?.first?.offset ?? 0
     |             `- warning: initialization of immutable value 'offset' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
1691 |
1692 |         let result = languageModel(
[494/510] Compiling MLXLLM Exaone4.swift
[495/510] Compiling MLXLLM FalconH1.swift
[496/510] Compiling MLXLLM GLM4.swift
[497/510] Compiling MLXLLM GPTOSS.swift
[498/510] Compiling MLXLLM Gemma.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Gemma3Text.swift:13:8: warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
 11 | import MLX
 12 | import MLXFast
 13 | import MLXLLM
    |        `- warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
 14 | import MLXLMCommon
 15 | import MLXNN
[499/510] Compiling MLXLLM Gemma2.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Gemma3Text.swift:13:8: warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
 11 | import MLX
 12 | import MLXFast
 13 | import MLXLLM
    |        `- warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
 14 | import MLXLMCommon
 15 | import MLXNN
[500/510] Compiling MLXLLM Gemma3Text.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Gemma3Text.swift:13:8: warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
 11 | import MLX
 12 | import MLXFast
 13 | import MLXLLM
    |        `- warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
 14 | import MLXLMCommon
 15 | import MLXNN
[501/510] Compiling MLXLLM Gemma3nText.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/Gemma3Text.swift:13:8: warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
 11 | import MLX
 12 | import MLXFast
 13 | import MLXLLM
    |        `- warning: file 'Gemma3Text.swift' is part of module 'MLXLLM'; ignoring import
 14 | import MLXLMCommon
 15 | import MLXNN
[502/510] Compiling MLXLLM SmolLM3.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/SuScaledRotaryEmbedding.swift:42:13: warning: variable 'scaledX' was never mutated; consider changing to 'let' constant
40 |     public func callAsFunction(_ x: MLXArray, offset: Int = 0) -> MLXArray {
41 |         // Apply scaling only to the dimensions that will be rotated
42 |         var scaledX = x
   |             `- warning: variable 'scaledX' was never mutated; consider changing to 'let' constant
43 |         let sliceToScale = scaledX[.ellipsis, 0 ..< dimensions]
44 |         scaledX[.ellipsis, 0 ..< dimensions] = scale * sliceToScale
[503/510] Compiling MLXLLM Starcoder2.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/SuScaledRotaryEmbedding.swift:42:13: warning: variable 'scaledX' was never mutated; consider changing to 'let' constant
40 |     public func callAsFunction(_ x: MLXArray, offset: Int = 0) -> MLXArray {
41 |         // Apply scaling only to the dimensions that will be rotated
42 |         var scaledX = x
   |             `- warning: variable 'scaledX' was never mutated; consider changing to 'let' constant
43 |         let sliceToScale = scaledX[.ellipsis, 0 ..< dimensions]
44 |         scaledX[.ellipsis, 0 ..< dimensions] = scale * sliceToScale
[504/510] Compiling MLXLLM SuScaledRotaryEmbedding.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/SuScaledRotaryEmbedding.swift:42:13: warning: variable 'scaledX' was never mutated; consider changing to 'let' constant
40 |     public func callAsFunction(_ x: MLXArray, offset: Int = 0) -> MLXArray {
41 |         // Apply scaling only to the dimensions that will be rotated
42 |         var scaledX = x
   |             `- warning: variable 'scaledX' was never mutated; consider changing to 'let' constant
43 |         let sliceToScale = scaledX[.ellipsis, 0 ..< dimensions]
44 |         scaledX[.ellipsis, 0 ..< dimensions] = scale * sliceToScale
[505/510] Compiling MLXLLM SwitchLayers.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/SuScaledRotaryEmbedding.swift:42:13: warning: variable 'scaledX' was never mutated; consider changing to 'let' constant
40 |     public func callAsFunction(_ x: MLXArray, offset: Int = 0) -> MLXArray {
41 |         // Apply scaling only to the dimensions that will be rotated
42 |         var scaledX = x
   |             `- warning: variable 'scaledX' was never mutated; consider changing to 'let' constant
43 |         let sliceToScale = scaledX[.ellipsis, 0 ..< dimensions]
44 |         scaledX[.ellipsis, 0 ..< dimensions] = scale * sliceToScale
[506/510] Compiling MLXLLM BailingMoe.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:6:8: warning: file 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import
  4 | import MLX
  5 | import MLXFast
  6 | import MLXLLM
    |        `- warning: file 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import
  7 | import MLXLMCommon
  8 | import MLXNN
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:231:17: warning: left side of nil coalescing operator '??' has non-optional type 'Int', so the right side is never used
229 |         let inds = argPartition(-scores, kth: k - 1, axis: -1)[.ellipsis, ..<k]
230 |         scores = takeAlong(scores, inds, axis: -1)
231 |         if topK ?? 1 > 1, normTopkProb {
    |                 `- warning: left side of nil coalescing operator '??' has non-optional type 'Int', so the right side is never used
232 |             let denominator = scores.sum(axis: -1, keepDims: true) + 1e-20
233 |             scores = scores / denominator
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:215:27: warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
213 |
214 |     func groupSelect(_ x: MLXArray) -> (inds: MLXArray, scores: MLXArray) {
215 |         let (bsz, seqLen, h) = (x.dim(0), x.dim(1), x.dim(2))
    |                           `- warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
216 |
217 |         let logits = gate(x)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:224:13: warning: variable 'groupIdx' was never mutated; consider changing to 'let' constant
222 |         let topKGroup = top(groupScores, k: 2, axis: -1).sum(axis: -1, keepDims: true)
223 |         var k = nGroup - topkGroup
224 |         var groupIdx = argPartition(topKGroup, kth: k - 1, axis: -2)[.ellipsis, ..<k, 0...]
    |             `- warning: variable 'groupIdx' was never mutated; consider changing to 'let' constant
225 |         scores = putAlong(groupScores, groupIdx, values: MLXArray(0.0), axis: -2)
226 |         scores = flattened(scores, start: -2, end: -1)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:357:27: warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
355 |
356 |     func callAsFunction(_ x: MLXArray) -> (MLXArray, MLXArray) {
357 |         let (bsz, seqLen, h) = (x.dim(0), x.dim(1), x.dim(2))
    |                           `- warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
358 |
359 |         let hiddenStates = x.matmul(weight.T)
[507/510] Compiling MLXLLM Bitnet.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:6:8: warning: file 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import
  4 | import MLX
  5 | import MLXFast
  6 | import MLXLLM
    |        `- warning: file 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import
  7 | import MLXLMCommon
  8 | import MLXNN
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:231:17: warning: left side of nil coalescing operator '??' has non-optional type 'Int', so the right side is never used
229 |         let inds = argPartition(-scores, kth: k - 1, axis: -1)[.ellipsis, ..<k]
230 |         scores = takeAlong(scores, inds, axis: -1)
231 |         if topK ?? 1 > 1, normTopkProb {
    |                 `- warning: left side of nil coalescing operator '??' has non-optional type 'Int', so the right side is never used
232 |             let denominator = scores.sum(axis: -1, keepDims: true) + 1e-20
233 |             scores = scores / denominator
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:215:27: warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
213 |
214 |     func groupSelect(_ x: MLXArray) -> (inds: MLXArray, scores: MLXArray) {
215 |         let (bsz, seqLen, h) = (x.dim(0), x.dim(1), x.dim(2))
    |                           `- warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
216 |
217 |         let logits = gate(x)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:224:13: warning: variable 'groupIdx' was never mutated; consider changing to 'let' constant
222 |         let topKGroup = top(groupScores, k: 2, axis: -1).sum(axis: -1, keepDims: true)
223 |         var k = nGroup - topkGroup
224 |         var groupIdx = argPartition(topKGroup, kth: k - 1, axis: -2)[.ellipsis, ..<k, 0...]
    |             `- warning: variable 'groupIdx' was never mutated; consider changing to 'let' constant
225 |         scores = putAlong(groupScores, groupIdx, values: MLXArray(0.0), axis: -2)
226 |         scores = flattened(scores, start: -2, end: -1)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:357:27: warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
355 |
356 |     func callAsFunction(_ x: MLXArray) -> (MLXArray, MLXArray) {
357 |         let (bsz, seqLen, h) = (x.dim(0), x.dim(1), x.dim(2))
    |                           `- warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
358 |
359 |         let hiddenStates = x.matmul(weight.T)
[508/510] Compiling MLXLLM Cohere.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:6:8: warning: file 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import
  4 | import MLX
  5 | import MLXFast
  6 | import MLXLLM
    |        `- warning: file 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import
  7 | import MLXLMCommon
  8 | import MLXNN
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:231:17: warning: left side of nil coalescing operator '??' has non-optional type 'Int', so the right side is never used
229 |         let inds = argPartition(-scores, kth: k - 1, axis: -1)[.ellipsis, ..<k]
230 |         scores = takeAlong(scores, inds, axis: -1)
231 |         if topK ?? 1 > 1, normTopkProb {
    |                 `- warning: left side of nil coalescing operator '??' has non-optional type 'Int', so the right side is never used
232 |             let denominator = scores.sum(axis: -1, keepDims: true) + 1e-20
233 |             scores = scores / denominator
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:215:27: warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
213 |
214 |     func groupSelect(_ x: MLXArray) -> (inds: MLXArray, scores: MLXArray) {
215 |         let (bsz, seqLen, h) = (x.dim(0), x.dim(1), x.dim(2))
    |                           `- warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
216 |
217 |         let logits = gate(x)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:224:13: warning: variable 'groupIdx' was never mutated; consider changing to 'let' constant
222 |         let topKGroup = top(groupScores, k: 2, axis: -1).sum(axis: -1, keepDims: true)
223 |         var k = nGroup - topkGroup
224 |         var groupIdx = argPartition(topKGroup, kth: k - 1, axis: -2)[.ellipsis, ..<k, 0...]
    |             `- warning: variable 'groupIdx' was never mutated; consider changing to 'let' constant
225 |         scores = putAlong(groupScores, groupIdx, values: MLXArray(0.0), axis: -2)
226 |         scores = flattened(scores, start: -2, end: -1)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:357:27: warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
355 |
356 |     func callAsFunction(_ x: MLXArray) -> (MLXArray, MLXArray) {
357 |         let (bsz, seqLen, h) = (x.dim(0), x.dim(1), x.dim(2))
    |                           `- warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
358 |
359 |         let hiddenStates = x.matmul(weight.T)
[509/510] Compiling MLXLLM DeepseekV3.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:6:8: warning: file 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import
  4 | import MLX
  5 | import MLXFast
  6 | import MLXLLM
    |        `- warning: file 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import
  7 | import MLXLMCommon
  8 | import MLXNN
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:231:17: warning: left side of nil coalescing operator '??' has non-optional type 'Int', so the right side is never used
229 |         let inds = argPartition(-scores, kth: k - 1, axis: -1)[.ellipsis, ..<k]
230 |         scores = takeAlong(scores, inds, axis: -1)
231 |         if topK ?? 1 > 1, normTopkProb {
    |                 `- warning: left side of nil coalescing operator '??' has non-optional type 'Int', so the right side is never used
232 |             let denominator = scores.sum(axis: -1, keepDims: true) + 1e-20
233 |             scores = scores / denominator
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:215:27: warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
213 |
214 |     func groupSelect(_ x: MLXArray) -> (inds: MLXArray, scores: MLXArray) {
215 |         let (bsz, seqLen, h) = (x.dim(0), x.dim(1), x.dim(2))
    |                           `- warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
216 |
217 |         let logits = gate(x)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:224:13: warning: variable 'groupIdx' was never mutated; consider changing to 'let' constant
222 |         let topKGroup = top(groupScores, k: 2, axis: -1).sum(axis: -1, keepDims: true)
223 |         var k = nGroup - topkGroup
224 |         var groupIdx = argPartition(topKGroup, kth: k - 1, axis: -2)[.ellipsis, ..<k, 0...]
    |             `- warning: variable 'groupIdx' was never mutated; consider changing to 'let' constant
225 |         scores = putAlong(groupScores, groupIdx, values: MLXArray(0.0), axis: -2)
226 |         scores = flattened(scores, start: -2, end: -1)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:357:27: warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
355 |
356 |     func callAsFunction(_ x: MLXArray) -> (MLXArray, MLXArray) {
357 |         let (bsz, seqLen, h) = (x.dim(0), x.dim(1), x.dim(2))
    |                           `- warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
358 |
359 |         let hiddenStates = x.matmul(weight.T)
[510/510] Compiling MLXLLM Ernie4_5.swift
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:6:8: warning: file 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import
  4 | import MLX
  5 | import MLXFast
  6 | import MLXLLM
    |        `- warning: file 'DeepseekV3.swift' is part of module 'MLXLLM'; ignoring import
  7 | import MLXLMCommon
  8 | import MLXNN
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:231:17: warning: left side of nil coalescing operator '??' has non-optional type 'Int', so the right side is never used
229 |         let inds = argPartition(-scores, kth: k - 1, axis: -1)[.ellipsis, ..<k]
230 |         scores = takeAlong(scores, inds, axis: -1)
231 |         if topK ?? 1 > 1, normTopkProb {
    |                 `- warning: left side of nil coalescing operator '??' has non-optional type 'Int', so the right side is never used
232 |             let denominator = scores.sum(axis: -1, keepDims: true) + 1e-20
233 |             scores = scores / denominator
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:215:27: warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
213 |
214 |     func groupSelect(_ x: MLXArray) -> (inds: MLXArray, scores: MLXArray) {
215 |         let (bsz, seqLen, h) = (x.dim(0), x.dim(1), x.dim(2))
    |                           `- warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
216 |
217 |         let logits = gate(x)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/BailingMoe.swift:224:13: warning: variable 'groupIdx' was never mutated; consider changing to 'let' constant
222 |         let topKGroup = top(groupScores, k: 2, axis: -1).sum(axis: -1, keepDims: true)
223 |         var k = nGroup - topkGroup
224 |         var groupIdx = argPartition(topKGroup, kth: k - 1, axis: -2)[.ellipsis, ..<k, 0...]
    |             `- warning: variable 'groupIdx' was never mutated; consider changing to 'let' constant
225 |         scores = putAlong(groupScores, groupIdx, values: MLXArray(0.0), axis: -2)
226 |         scores = flattened(scores, start: -2, end: -1)
/Users/admin/builder/spi-builder-workspace/Libraries/MLXLLM/Models/DeepseekV3.swift:357:27: warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
355 |
356 |     func callAsFunction(_ x: MLXArray) -> (MLXArray, MLXArray) {
357 |         let (bsz, seqLen, h) = (x.dim(0), x.dim(1), x.dim(2))
    |                           `- warning: immutable value 'h' was never used; consider replacing with '_' or removing it [#no-usage]
358 |
359 |         let hiddenStates = x.matmul(weight.T)
Build complete! (46.04s)
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"
}
✅  Doc result (pending) reported
========================================
GenerateDocs
========================================
Generating docs at path:  $PWD/.docs/ml-explore/mlx-swift-examples/2.29.1
Repository:               ml-explore/mlx-swift-examples
Swift version used:       6.2
        .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0")
Target:                   MLXLLM
Extracting symbol information for 'MLXLLM'...
Finished extracting symbol information for 'MLXLLM'. (3.88s)
Building documentation for 'MLXLLM'...
warning: 'AceReason' doesn't exist at '/MLXLLM'
  --> Documentation.md:51:5-51:14
49 | - ``MiMoModel``
50 | - ``GLM4Model``
51 + - ``AceReason``
warning: 'ChatSession' doesn't exist at '/MLXLLM/evaluation'
  --> evaluation.md:15:53-15:64
13 |
14 | The second question actually refers to information (the location) from the first
15 + question -- this context is maintained inside the ``ChatSession`` object.
16 |
17 | If you need a one-shot prompt/response simply create a ``ChatSession``, evaluate
warning: 'ChatSession' doesn't exist at '/MLXLLM/evaluation'
  --> evaluation.md:17:58-17:69
15 | question -- this context is maintained inside the ``ChatSession`` object.
16 |
17 + If you need a one-shot prompt/response simply create a ``ChatSession``, evaluate
18 | the prompt and discard.  Multiple ``ChatSession`` instances could also be used
19 | (at the cost of the memory in the `KVCache`) to handle multiple streams of
warning: 'ChatSession' doesn't exist at '/MLXLLM/evaluation'
  --> evaluation.md:18:37-18:48
16 |
17 | If you need a one-shot prompt/response simply create a ``ChatSession``, evaluate
18 + the prompt and discard.  Multiple ``ChatSession`` instances could also be used
19 | (at the cost of the memory in the `KVCache`) to handle multiple streams of
20 | context.
warning: 'ChatSession' doesn't exist at '/MLXLLM/evaluation'
  --> evaluation.md:41:10-41:21
39 |
40 | This same API supports VLMs as well.  Simply present the image or video
41 + to the ``ChatSession``:
42 |
43 | ```swift
warning: 'ChatSession' doesn't exist at '/MLXLLM/evaluation'
  --> evaluation.md:62:7-62:18
60 | ## Advanced Usage
61 |
62 + The ``ChatSession`` has a number of parameters you can supply when creating it:
63 |
64 | - **instructions**: optional instructions to the chat session, e.g. describing what type of responses to give
warning: 'GenerateParameters' doesn't exist at '/MLXLLM/evaluation'
  --> evaluation.md:69:13-69:31
67 |     - or that the responses should be very brief
68 | - **generateParameters**: parameters that control the generation of output, e.g. token limits and temperature
69 +     - see ``GenerateParameters``
70 | - **processing**: optional media processing instructions
warning: 'LoRALinear' doesn't exist at '/MLXLLM/LoRATrain/convert(model:layers:)'
   --> ../LoraTrain.swift:154:24-154:34
152 |
153 |     /// Freeze the model layers and replace the indicated modules (Linear) that should be
154 +     /// converted to ``LoRALinear`` and remain trainable.
155 |     ///
156 |     /// Once a model has had the LoRA adapters applied, adapter weights can be loaded
warning: 'generate(promptTokens:parameters:model:tokenizer:additionalEOSTokens:didGenerate:)' doesn't exist at '/MLXLLM/LoRATrain/convert(model:layers:)'
   --> ../LoraTrain.swift:168:34-168:116
166 |     /// - loss evaluation with ``evaluate(model:dataset:loss:tokenizer:batchSize:batchCount:)``
167 |     /// - fusing with ``fuse(model:layers:deQuantize:)``
168 +     /// - text generation with ``generate(promptTokens:parameters:model:tokenizer:additionalEOSTokens:didGenerate:)``
169 |     ///     - note that this is just using normal model text generation
170 |     ///
warning: Parameter 'layers' is missing documentation
   --> ../LoraTrain.swift:202:84-202:84
200 |     /// - Parameters:
201 |     ///   - model: model to convert
202 +     ///   - deQuantize: if `true` will convert `QuantizedLinear` back into `Linear`
    |           ╰─suggestion: Document 'layers' parameter
203 |     public static func fuse(model: Module, layers: LoRALinearLayers, deQuantize: Bool = false) {
204 |         for (layer, keys) in layers {
Finished building documentation for 'MLXLLM' (0.55s)
Generated documentation archive at:
  /Users/admin/builder/spi-builder-workspace/.docs/ml-explore/mlx-swift-examples/2.29.1
Fetching https://github.com/apple/swift-docc-plugin
Updating https://github.com/apple/swift-collections.git
Updating https://github.com/huggingface/swift-transformers
Updating https://github.com/apple/swift-numerics
Updated https://github.com/apple/swift-collections.git (0.55s)
Updated https://github.com/huggingface/swift-transformers (0.55s)
Updated https://github.com/apple/swift-numerics (0.55s)
[1/2133] Fetching swift-docc-plugin
Updating https://github.com/ml-explore/mlx-swift
Updating https://github.com/huggingface/swift-jinja.git
Updating https://github.com/1024jp/GzipSwift
Fetched https://github.com/apple/swift-docc-plugin from cache (1.27s)
Updated https://github.com/ml-explore/mlx-swift (0.49s)
Updated https://github.com/huggingface/swift-jinja.git (0.49s)
Updated https://github.com/1024jp/GzipSwift (0.49s)
Computing version for https://github.com/1024jp/GzipSwift
Computed https://github.com/1024jp/GzipSwift at 6.0.1 (2.36s)
Computing version for https://github.com/huggingface/swift-transformers
Computed https://github.com/huggingface/swift-transformers at 1.0.0 (0.49s)
Computing version for https://github.com/ml-explore/mlx-swift
Computed https://github.com/ml-explore/mlx-swift at 0.29.1 (0.52s)
Computing version for https://github.com/huggingface/swift-jinja.git
Computed https://github.com/huggingface/swift-jinja.git at 2.1.0 (0.48s)
Computing version for https://github.com/apple/swift-numerics
Computed https://github.com/apple/swift-numerics at 1.0.2 (0.58s)
Computing version for https://github.com/apple/swift-collections.git
Computed https://github.com/apple/swift-collections.git at 1.2.0 (0.55s)
Computing version for https://github.com/apple/swift-docc-plugin
Computed https://github.com/apple/swift-docc-plugin at 1.4.5 (0.57s)
Fetching https://github.com/swiftlang/swift-docc-symbolkit
[1/3553] Fetching swift-docc-symbolkit
Fetched https://github.com/swiftlang/swift-docc-symbolkit from cache (1.20s)
Computing version for https://github.com/swiftlang/swift-docc-symbolkit
Computed https://github.com/swiftlang/swift-docc-symbolkit at 1.0.0 (1.84s)
Creating working copy for https://github.com/apple/swift-docc-plugin
Working copy of https://github.com/apple/swift-docc-plugin resolved at 1.4.5
Creating working copy for https://github.com/swiftlang/swift-docc-symbolkit
Working copy of https://github.com/swiftlang/swift-docc-symbolkit resolved at 1.0.0
Building for debugging...
[0/8] Write sources
[3/8] Write snippet-extract-tool-entitlement.plist
[4/8] Write swift-version-49B95AFC49DCD68C.txt
[6/53] Compiling SymbolKit SemanticVersion.swift
[7/53] Compiling SymbolKit AccessControl.swift
[8/53] Compiling SymbolKit Availability.swift
[9/53] Compiling SymbolKit AvailabilityItem.swift
[10/53] Compiling SymbolKit Domain.swift
[11/53] Compiling SymbolKit Identifier.swift
[12/53] Compiling SymbolKit KindIdentifier.swift
[13/53] Compiling SymbolKit Location.swift
[14/53] Compiling SymbolKit Mutability.swift
[15/57] Compiling SymbolKit Mixin+Equals.swift
[16/57] Compiling SymbolKit Mixin+Hash.swift
[17/57] Compiling SymbolKit Mixin.swift
[18/57] Compiling SymbolKit LineList.swift
[19/57] Compiling SymbolKit Position.swift
[20/57] Emitting module SymbolKit
[21/57] Compiling SymbolKit Relationship.swift
[22/57] Compiling SymbolKit RelationshipKind.swift
[23/57] Compiling SymbolKit SourceOrigin.swift
[24/57] Compiling SymbolKit GenericConstraints.swift
[25/57] Compiling SymbolKit Swift.swift
[26/57] Compiling SymbolKit DeclarationFragments.swift
[27/57] Compiling SymbolKit Fragment.swift
[28/57] Compiling SymbolKit FragmentKind.swift
[29/57] Compiling SymbolKit FunctionParameter.swift
[30/57] Compiling SymbolKit FunctionSignature.swift
[31/57] Compiling SymbolKit GenericConstraint.swift
[32/57] Compiling SymbolKit GenericParameter.swift
[33/57] Compiling SymbolKit Generics.swift
[34/57] Compiling SymbolKit Namespace.swift
[35/57] Compiling SymbolKit Names.swift
[36/57] Compiling SymbolKit SPI.swift
[37/57] Compiling SymbolKit Snippet.swift
[38/57] Compiling SymbolKit Extension.swift
[39/57] Compiling SymbolKit SourceRange.swift
[40/57] Compiling SymbolKit Metadata.swift
[41/57] Compiling SymbolKit Module.swift
[42/57] Compiling SymbolKit OperatingSystem.swift
[43/57] Compiling SymbolKit Platform.swift
[44/57] Compiling SymbolKit Symbol.swift
[45/57] Compiling SymbolKit SymbolKind.swift
[46/57] Compiling SymbolKit SymbolGraph.swift
[47/57] Compiling SymbolKit GraphCollector.swift
[48/57] Compiling SymbolKit UnifiedSymbol+Encodable.swift
[49/57] Compiling SymbolKit UnifiedSymbol.swift
[50/57] Compiling SymbolKit UnifiedSymbolGraph+Encodable.swift
[51/57] Compiling SymbolKit UnifiedSymbolGraph.swift
[52/57] Compiling Snippets SnippetParser.swift
[53/57] Emitting module Snippets
[54/57] Compiling Snippets Snippet.swift
[55/61] Compiling snippet_extract URL+Status.swift
[56/61] Compiling snippet_extract SymbolGraph+Snippet.swift
[57/61] Emitting module snippet_extract
[58/61] Compiling snippet_extract SnippetBuildCommand.swift
[58/61] Write Objects.LinkFileList
[59/61] Linking snippet-extract-tool
[60/61] Applying snippet-extract-tool
Build of product 'snippet-extract' complete! (3.37s)
Building for debugging...
[0/1] Write swift-version-49B95AFC49DCD68C.txt
Build of target: 'MLXLLM' complete! (0.67s)
Target:                   MLXVLM
Extracting symbol information for 'MLXVLM'...
Finished extracting symbol information for 'MLXVLM'. (0.86s)
Building documentation for 'MLXVLM'...
warning: 'LLMModelFactory' doesn't exist at '/MLXVLM/VLMTypeRegistry'
  --> Libraries/MLXVLM/VLMModelFactory.swift:76:28-76:43
74 | /// Registry of model type, e.g 'llama', to functions that can instantiate the model from configuration.
75 | ///
76 + /// Typically called via ``LLMModelFactory/load(hub:configuration:progressHandler:)``.
77 | public class VLMTypeRegistry: ModelTypeRegistry, @unchecked Sendable {
78 |
Finished building documentation for 'MLXVLM' (0.35s)
Generated documentation archive at:
  /Users/admin/builder/spi-builder-workspace/.docs/ml-explore/mlx-swift-examples/2.29.1
Building for debugging...
[0/3] Write swift-version-49B95AFC49DCD68C.txt
Build of product 'snippet-extract' complete! (0.66s)
Building for debugging...
[0/1] Write swift-version-49B95AFC49DCD68C.txt
Build of target: 'MLXVLM' complete! (0.70s)
Successfully merged into /Users/admin/builder/spi-builder-workspace/.docs-staging/ml-explore/mlx-swift-examples/2.29.1/index/index.json
Successfully merged into /Users/admin/builder/spi-builder-workspace/.docs-staging/ml-explore/mlx-swift-examples/2.29.1/linkable-paths.json
Target:                   MLXLMCommon
Extracting symbol information for 'MLXLMCommon'...
Finished extracting symbol information for 'MLXLMCommon'. (0.83s)
Building documentation for 'MLXLMCommon'...
warning: 'LoRAConvertToLinear' doesn't exist at '/MLXLMCommon/LoRALinear'
  --> ../Adapters/LoRA/LoRA+Layers.swift:14:74-14:93
12 | ///
13 | /// - converting `Linear` or `QuantizedLinear` layers to ``LoRALinear`` / ``QLoRALinear``
14 + /// - converting ``LoRALinear`` back to `Linear` or `QuantizedLinear` (``LoRAConvertToLinear``)
15 | /// - implementing the LoRA evaluation
16 | ///
warning: 'LoRATrain' doesn't exist at '/MLXLMCommon/LoRALinear'
  --> ../Adapters/LoRA/LoRA+Layers.swift:19:46-19:55
17 | /// ``QLoRALinear`` is the equivalent class for `QuantizedLinear`.
18 | ///
19 + /// This is not typically used directly -- ``LoRATrain/convert(model:layers:)`` is used to
20 | /// add the adapter layers to a given model.
21 | ///
warning: 'LoRATrain' doesn't exist at '/MLXLMCommon/LoRALinear'
  --> ../Adapters/LoRA/LoRA+Layers.swift:26:9-26:18
24 | /// - [QLoRA: Efficient Finetuning of Quantized LLMs](https://arxiv.org/abs/2305.14314)
25 | /// - ``QLoRALinear``
26 + /// - ``LoRATrain/convert(model:layers:)``
27 | /// - ``LoRATrain/fuse(model:layers:deQuantize:)``
28 | public class LoRALinear: Linear, LoRALayer {
warning: 'LoRATrain' doesn't exist at '/MLXLMCommon/LoRALinear'
  --> ../Adapters/LoRA/LoRA+Layers.swift:27:9-27:18
25 | /// - ``QLoRALinear``
26 | /// - ``LoRATrain/convert(model:layers:)``
27 + /// - ``LoRATrain/fuse(model:layers:deQuantize:)``
28 | public class LoRALinear: Linear, LoRALayer {
29 |
warning: 'LoRATrain' doesn't exist at '/MLXLMCommon/LoRALinear/from(linear:rank:scale:)'
  --> ../Adapters/LoRA/LoRA+Layers.swift:69:40-69:49
67 |     /// that implements the `LoRA` adapter.
68 |     ///
69 +     /// This is typically called via ``LoRATrain/convert(model:layers:)``.
70 |     ///
71 |     /// ### See Also
warning: 'LoRATrain' doesn't exist at '/MLXLMCommon/LoRALinear/from(linear:rank:scale:)'
  --> ../Adapters/LoRA/LoRA+Layers.swift:72:13-72:22
70 |     ///
71 |     /// ### See Also
72 +     /// - ``LoRATrain/convert(model:layers:)``
73 |     /// - ``QLoRALinear/from(linear:rank:)``
74 |     public static func from(linear: Linear, rank: Int = 8, scale: Float = 20.0) -> LoRALayer {
warning: 'from(linear:rank:)' doesn't exist at '/MLXLMCommon/QLoRALinear'
  --> ../Adapters/LoRA/LoRA+Layers.swift:73:25-73:43
71 |     /// ### See Also
72 |     /// - ``LoRATrain/convert(model:layers:)``
73 +     /// - ``QLoRALinear/from(linear:rank:)``
   |                         ╰─suggestion: Replace 'from(linear:rank:)' with 'from(linear:rank:scale:)'
74 |     public static func from(linear: Linear, rank: Int = 8, scale: Float = 20.0) -> LoRALayer {
75 |         if let linear = linear as? QuantizedLinear {
warning: 'LoRATrain' doesn't exist at '/MLXLMCommon/LoRALinear/fused()'
  --> ../Adapters/LoRA/LoRA+Layers.swift:85:40-85:49
83 |     /// Convert back into a fused `Linear` layer.
84 |     ///
85 +     /// This is typically called via ``LoRATrain/fuse(model:layers:deQuantize:)``.
86 |     ///
87 |     /// ### See Also
warning: 'LoRATrain' doesn't exist at '/MLXLMCommon/LoRALinear/fused()'
  --> ../Adapters/LoRA/LoRA+Layers.swift:88:13-88:22
86 |     ///
87 |     /// ### See Also
88 +     /// - ``LoRATrain/fuse(model:layers:deQuantize:)``
89 |     /// - ``LoRAConvertToLinear``
90 |     /// - ``QLoRALinear/toLinear(deQuantize:)``
warning: 'LoRAConvertToLinear' doesn't exist at '/MLXLMCommon/LoRALinear/fused()'
  --> ../Adapters/LoRA/LoRA+Layers.swift:89:13-89:32
87 |     /// ### See Also
88 |     /// - ``LoRATrain/fuse(model:layers:deQuantize:)``
89 +     /// - ``LoRAConvertToLinear``
90 |     /// - ``QLoRALinear/toLinear(deQuantize:)``
91 |     public func fused() -> Module {
warning: 'toLinear(deQuantize:)' doesn't exist at '/MLXLMCommon/QLoRALinear'
  --> ../Adapters/LoRA/LoRA+Layers.swift:90:25-90:46
88 |     /// - ``LoRATrain/fuse(model:layers:deQuantize:)``
89 |     /// - ``LoRAConvertToLinear``
90 +     /// - ``QLoRALinear/toLinear(deQuantize:)``
91 |     public func fused() -> Module {
92 |         let dtype = weight.dtype
warning: 'LoRATrain' doesn't exist at '/MLXLMCommon/QLoRALinear/from(linear:rank:scale:)'
   --> ../Adapters/LoRA/LoRA+Layers.swift:153:40-153:49
151 |     /// that implements the `LoRA` adapter.
152 |     ///
153 +     /// This is typically called via ``LoRATrain/convert(model:layers:)``.
154 |     ///
155 |     /// ### See Also
warning: 'LoRATrain' doesn't exist at '/MLXLMCommon/QLoRALinear/from(linear:rank:scale:)'
   --> ../Adapters/LoRA/LoRA+Layers.swift:156:13-156:22
154 |     ///
155 |     /// ### See Also
156 +     /// - ``LoRATrain/convert(model:layers:)``
157 |     /// - ``LoRALinear/from(linear:rank:)``
158 |     public static func from(linear: QuantizedLinear, rank: Int = 8, scale: Float = 20.0)
warning: 'from(linear:rank:)' doesn't exist at '/MLXLMCommon/LoRALinear'
   --> ../Adapters/LoRA/LoRA+Layers.swift:157:24-157:42
155 |     /// ### See Also
156 |     /// - ``LoRATrain/convert(model:layers:)``
157 +     /// - ``LoRALinear/from(linear:rank:)``
    |                        ╰─suggestion: Replace 'from(linear:rank:)' with 'from(linear:rank:scale:)'
158 |     public static func from(linear: QuantizedLinear, rank: Int = 8, scale: Float = 20.0)
159 |         -> LoRALayer
warning: 'LoRATrain' doesn't exist at '/MLXLMCommon/QLoRALinear/fused()'
   --> ../Adapters/LoRA/LoRA+Layers.swift:168:40-168:49
166 |     /// Convert back into a fused `QuantizedLinear` layer.
167 |     ///
168 +     /// This is typically called via ``LoRATrain/fuse(model:layers:deQuantize:)``.
169 |     ///
170 |     /// ### See Also
warning: 'LoRATrain' doesn't exist at '/MLXLMCommon/QLoRALinear/fused()'
   --> ../Adapters/LoRA/LoRA+Layers.swift:171:13-171:22
169 |     ///
170 |     /// ### See Also
171 +     /// - ``LoRATrain/fuse(model:layers:deQuantize:)``
172 |     public func fused() -> Module {
173 |         let weight = dequantizedWeight
warning: 'LoRATrain' doesn't exist at '/MLXLMCommon/LoRAModel/loraLinearLayers()'
  --> ../Adapters/LoRA/LoRAModel.swift:31:13-31:22
29 |     ///
30 |     /// ### See Also
31 +     /// - ``LoRATrain/convert(model:layers:)``
32 |     func loraLinearLayers() -> LoRALinearLayers
33 |
warning: 'Chat.Message' doesn't exist at '/MLXLMCommon/MessageGenerator'
  --> ../Chat.swift:59:7-59:19
57 |
58 | /// Protocol for something that can convert structured
59 + /// ``Chat.Message`` into model specific ``Message``
60 | /// (raw dictionary) format.
61 | ///
warning: 'loadWeights(modelDirectory:model:quantization:)' doesn't exist at '/MLXLMCommon/porting'
   --> porting.md:298:189-298:236
296 | ```
297 |
298 + Note that the weight is given an initial value and shape based on the parameters to the initializer. In typical inference use, these values will be replaced when the weights are loaded (``loadWeights(modelDirectory:model:quantization:)``).
299 |
300 | * Note: If the property names in Python don't make good Swift names, you can use the `@ParameterInfo` property wrapper to specify the key: `@ParameterInfo(key: "some_weight") var weight: MLXArray`
warning: 'generate(input:parameters:context:didGenerate:)' is ambiguous at '/MLXLMCommon'
   --> ../Evaluate.swift:245:44-245:91
243 | /// Generator of tokens.
244 | ///
245 + /// This is typically used via a call to ``generate(input:parameters:context:didGenerate:)``.
    |                                                                                           ├─suggestion: Insert '->GenerateCompletionInfo' for 'func generate(input: LMInput, parameters: GenerateParameters, context: ModelContext, didGenerate: (Int) -> GenerateDisposition) throws -> GenerateCompletionInfo'
    |                                                                                           ╰─suggestion: Insert '->GenerateResult' for 'func generate(input: LMInput, parameters: GenerateParameters, context: ModelContext, didGenerate: ([Int]) -> GenerateDisposition) throws -> GenerateResult'
246 | ///
247 | /// To use it directly:
warning: 'init(input:model:cache:processor:sampler:prefillStepSize:)' doesn't exist at '/MLXLMCommon/TokenIterator/init(input:model:cache:parameters:)'
   --> ../Evaluate.swift:314:11-314:69
312 |     ///
313 |     /// If more control is needed over the generation,
314 +     /// ``init(input:model:cache:processor:sampler:prefillStepSize:)``
315 |     /// allows a caller to specify ``LogitProcessor`` and ``LogitSampler``
316 |     /// directly.
warning: 'generate(input:parameters:context:didGenerate:)' is ambiguous at '/MLXLMCommon'
   --> ../Evaluate.swift:442:27-442:74
440 | }
441 |
442 + /// Result of a call to ``generate(input:parameters:context:didGenerate:)``.
    |                                                                          ├─suggestion: Insert '->GenerateCompletionInfo' for 'func generate(input: LMInput, parameters: GenerateParameters, context: ModelContext, didGenerate: (Int) -> GenerateDisposition) throws -> GenerateCompletionInfo'
    |                                                                          ╰─suggestion: Insert '->GenerateResult' for 'func generate(input: LMInput, parameters: GenerateParameters, context: ModelContext, didGenerate: ([Int]) -> GenerateDisposition) throws -> GenerateResult'
443 | public struct GenerateResult: Sendable {
444 |
warning: 'generate(input:parameters:context:didGenerate:)' is ambiguous at '/MLXLMCommon'
   --> ../Evaluate.swift:508:45-508:92
506 | }
507 |
508 + /// Action from token visitor callback in ``generate(input:parameters:context:didGenerate:)``.
    |                                                                                            ├─suggestion: Insert '->GenerateCompletionInfo' for 'func generate(input: LMInput, parameters: GenerateParameters, context: ModelContext, didGenerate: (Int) -> GenerateDisposition) throws -> GenerateCompletionInfo'
    |                                                                                            ╰─suggestion: Insert '->GenerateResult' for 'func generate(input: LMInput, parameters: GenerateParameters, context: ModelContext, didGenerate: ([Int]) -> GenerateDisposition) throws -> GenerateResult'
509 | public enum GenerateDisposition: Sendable {
510 |     /// keep producing tokens until an EOS token is produced
warning: 'generate(input:parameters:context:didGenerate:)' is ambiguous at '/MLXLMCommon'
   --> ../Evaluate.swift:519:7-519:54
517 | /// Given prompt tokens generate text using the given model and parameters.
518 | ///
519 + /// ``generate(input:parameters:context:didGenerate:)`` is the preferred call.
    |                                                      ├─suggestion: Insert '->GenerateCompletionInfo' for 'func generate(input: LMInput, parameters: GenerateParameters, context: ModelContext, didGenerate: (Int) -> GenerateDisposition) throws -> GenerateCompletionInfo'
    |                                                      ╰─suggestion: Insert '->GenerateResult' for 'func generate(input: LMInput, parameters: GenerateParameters, context: ModelContext, didGenerate: ([Int]) -> GenerateDisposition) throws -> GenerateResult'
520 | ///
521 | /// - Parameters:
warning: 'generate(input:context:iterator:didGenerate:)' is ambiguous at '/MLXLMCommon'
   --> ../Evaluate.swift:569:7-569:52
567 | ///
568 | /// Internally this constructs a ``TokenIterator`` and calls
569 + /// ``generate(input:context:iterator:didGenerate:)``
    |                                                    ├─suggestion: Insert '->GenerateCompletionInfo' for 'func generate(input: LMInput, context: ModelContext, iterator: TokenIterator, didGenerate: (Int) -> GenerateDisposition) -> GenerateCompletionInfo'
    |                                                    ╰─suggestion: Insert '->GenerateResult' for 'func generate(input: LMInput, context: ModelContext, iterator: TokenIterator, didGenerate: ([Int]) -> GenerateDisposition) -> GenerateResult'
570 | ///
571 | /// - Parameters:
warning: 'generate(input:parameters:context:didGenerate:)' is ambiguous at '/MLXLMCommon'
   --> ../Evaluate.swift:589:7-589:54
587 | /// Low level token generation using a ``TokenIterator``.
588 | ///
589 + /// ``generate(input:parameters:context:didGenerate:)`` is the preferred call.
    |                                                      ├─suggestion: Insert '->GenerateCompletionInfo' for 'func generate(input: LMInput, parameters: GenerateParameters, context: ModelContext, didGenerate: (Int) -> GenerateDisposition) throws -> GenerateCompletionInfo'
    |                                                      ╰─suggestion: Insert '->GenerateResult' for 'func generate(input: LMInput, parameters: GenerateParameters, context: ModelContext, didGenerate: ([Int]) -> GenerateDisposition) throws -> GenerateResult'
590 | ///
591 | /// - Parameters:
warning: 'generate(input:context:iterator:didGenerate:)' is ambiguous at '/MLXLMCommon'
   --> ../Evaluate.swift:666:7-666:52
664 | ///
665 | /// Internally this constructs a ``TokenIterator`` and calls
666 + /// ``generate(input:context:iterator:didGenerate:)``
    |                                                    ├─suggestion: Insert '->GenerateCompletionInfo' for 'func generate(input: LMInput, context: ModelContext, iterator: TokenIterator, didGenerate: (Int) -> GenerateDisposition) -> GenerateCompletionInfo'
    |                                                    ╰─suggestion: Insert '->GenerateResult' for 'func generate(input: LMInput, context: ModelContext, iterator: TokenIterator, didGenerate: ([Int]) -> GenerateDisposition) -> GenerateResult'
667 | ///
668 | /// - Parameters:
warning: 'MultiHeadAttention' doesn't exist at '/MLXLMCommon/createAttentionMask(h:cache:)'
   --> ../KVCache.swift:169:16-169:34
167 | /// Create an attention mask using the parameters from the KVCache.
168 | ///
169 + /// See also ``MultiHeadAttention/createAdditiveCausalMask(_:dtype:)`` -- same idea
170 | /// but doesn't honor the cache offset.
171 | @_disfavoredOverload
warning: 'generate(input:parameters:context:didGenerate:)' is ambiguous at '/MLXLMCommon'
  --> ../ModelFactory.swift:57:52-57:99
55 | ///
56 | /// - ``ModelConfiguration`` -- identifier for the model
57 + /// - ``LanguageModel`` -- the model itself, see ``generate(input:parameters:context:didGenerate:)``
   |                                                                                                   ├─suggestion: Insert '->GenerateCompletionInfo' for 'func generate(input: LMInput, parameters: GenerateParameters, context: ModelContext, didGenerate: (Int) -> GenerateDisposition) throws -> GenerateCompletionInfo'
   |                                                                                                   ╰─suggestion: Insert '->GenerateResult' for 'func generate(input: LMInput, parameters: GenerateParameters, context: ModelContext, didGenerate: ([Int]) -> GenerateDisposition) throws -> GenerateResult'
58 | /// - ``UserInputProcessor`` -- can convert ``UserInput`` into ``LMInput``
59 | /// - `Tokenizer` -- the tokenizer used by ``UserInputProcessor``
warning: 'loadModel(hub:id:progressHandler:)' doesn't exist at '/MLXLMCommon/ModelFactory'
  --> ../ModelFactory.swift:83:9-83:43
81 | ///
82 | /// ## See Also
83 + /// - ``loadModel(hub:id:progressHandler:)``
   |         ├─suggestion: Replace 'loadModel(hub:id:progressHandler:)' with 'load(hub:configuration:progressHandler:)'
   |         ╰─suggestion: Replace 'loadModel(hub:id:progressHandler:)' with 'loadContainer(hub:configuration:progressHandler:)'
84 | /// - ``loadModel(hub:directory:progressHandler:)``
85 | /// - ``loadModelContainer(hub:id:progressHandler:)``
warning: 'loadModelContainer(hub:id:progressHandler:)' doesn't exist at '/MLXLMCommon/ModelFactory'
  --> ../ModelFactory.swift:85:9-85:52
83 | /// - ``loadModel(hub:id:progressHandler:)``
84 | /// - ``loadModel(hub:directory:progressHandler:)``
85 + /// - ``loadModelContainer(hub:id:progressHandler:)``
   |         ├─suggestion: Replace 'loadModelContainer(hub:id:progressHandler:)' with 'loadContainer(hub:configuration:progressHandler:)'
   |         ╰─suggestion: Replace 'loadModelContainer(hub:id:progressHandler:)' with 'load(hub:configuration:progressHandler:)'
86 | /// - ``loadModelContainer(hub:directory:progressHandler:)``
87 | public protocol ModelFactory: Sendable {
warning: 'loadModel(hub:id:progressHandler:)' doesn't exist at '/MLXLMCommon/ModelFactory/load(hub:configuration:progressHandler:)'
   --> ../ModelFactory.swift:138:13-138:47
136 |     ///
137 |     /// ## See Also
138 +     /// - ``loadModel(hub:id:progressHandler:)``
139 |     /// - ``loadModelContainer(hub:id:progressHandler:)``
140 |     public func load(
warning: 'loadModelContainer(hub:id:progressHandler:)' doesn't exist at '/MLXLMCommon/ModelFactory/load(hub:configuration:progressHandler:)'
   --> ../ModelFactory.swift:139:13-139:56
137 |     /// ## See Also
138 |     /// - ``loadModel(hub:id:progressHandler:)``
139 +     /// - ``loadModelContainer(hub:id:progressHandler:)``
140 |     public func load(
141 |         hub: HubApi = defaultHubApi, configuration: ModelConfiguration,
warning: Parameter 'revision' is missing documentation
   --> ../ModelFactory.swift:216:56-216:56
214 | ///   - hub: optional HubApi -- by default uses ``defaultHubApi``
215 | ///   - id: huggingface model identifier, e.g "mlx-community/Qwen3-4B-4bit"
216 + ///   - progressHandler: optional callback for progress
    |       ╰─suggestion: Document 'revision' parameter
217 | /// - Returns: a ``ModelContext``
218 | public func loadModel(
warning: Parameter 'revision' is missing documentation
   --> ../ModelFactory.swift:237:56-237:56
235 | ///   - hub: optional HubApi -- by default uses ``defaultHubApi``
236 | ///   - id: huggingface model identifier, e.g "mlx-community/Qwen3-4B-4bit"
237 + ///   - progressHandler: optional callback for progress
    |       ╰─suggestion: Document 'revision' parameter
238 | /// - Returns: a ``ModelContainer``
239 | public func loadModelContainer(
warning: 'loadModel(hub:id:progressHandler:)' doesn't exist at '/MLXLMCommon/ModelFactoryRegistry'
   --> ../ModelFactory.swift:342:19-342:53
340 | /// Registry of ``ModelFactory`` trampolines.
341 | ///
342 + /// This allows ``loadModel(hub:id:progressHandler:)`` to use any ``ModelFactory`` instances
343 | /// available but be defined in the `LLMCommon` layer.  This is not typically used directly -- it is
344 | /// called via ``loadModel(hub:id:progressHandler:)``:
warning: 'loadModel(hub:id:progressHandler:)' doesn't exist at '/MLXLMCommon/ModelFactoryRegistry'
   --> ../ModelFactory.swift:344:18-344:52
342 | /// This allows ``loadModel(hub:id:progressHandler:)`` to use any ``ModelFactory`` instances
343 | /// available but be defined in the `LLMCommon` layer.  This is not typically used directly -- it is
344 + /// called via ``loadModel(hub:id:progressHandler:)``:
345 | ///
346 | /// ```swift
warning: 'loadModel(hub:id:progressHandler:)' doesn't exist at '/MLXLMCommon/ModelFactoryRegistry'
   --> ../ModelFactory.swift:351:9-351:43
349 | ///
350 | /// ## See Also
351 + /// - ``loadModel(hub:id:progressHandler:)``
352 | /// - ``loadModel(hub:directory:progressHandler:)``
353 | /// - ``loadModelContainer(hub:id:progressHandler:)``
warning: 'loadModelContainer(hub:id:progressHandler:)' doesn't exist at '/MLXLMCommon/ModelFactoryRegistry'
   --> ../ModelFactory.swift:353:9-353:52
351 | /// - ``loadModel(hub:id:progressHandler:)``
352 | /// - ``loadModel(hub:directory:progressHandler:)``
353 + /// - ``loadModelContainer(hub:id:progressHandler:)``
354 | /// - ``loadModelContainer(hub:directory:progressHandler:)``
355 | final public class ModelFactoryRegistry: @unchecked Sendable {
warning: 'modelRegistry' doesn't exist at '/MLXLMCommon/AbstractModelRegistry/configuration(id:)'
  --> ../Registries/AbstractModelRegistry.swift:28:38-28:51
26 |     }
27 |
28 +     /// Returns configuration from ``modelRegistry``.
29 |     ///
30 |     /// - Note: If the id doesn't exists in the configuration, this will return a new instance of it.
warning: Parameter 'images' not found in instance method declaration
   --> ../Streamlined.swift:210:13-210:19
208 |     /// - Parameters:
209 |     ///   - prompt: the prompt
210 +     ///   - images: optional image (for use with VLMs)
    |             ╰─suggestion: Replace 'images' with 'image'
211 |     ///   - videos: optional video (for use with VLMs)
212 |     /// - Returns: response from the model
warning: Parameter 'videos' not found in instance method declaration
   --> ../Streamlined.swift:211:13-211:19
209 |     ///   - prompt: the prompt
210 |     ///   - images: optional image (for use with VLMs)
211 +     ///   - videos: optional video (for use with VLMs)
    |             ╰─suggestion: Replace 'videos' with 'video'
212 |     /// - Returns: response from the model
213 |     public func respond(
warning: Parameter 'image' is missing documentation
   --> ../Streamlined.swift:211:55-211:55
209 |     ///   - prompt: the prompt
210 |     ///   - images: optional image (for use with VLMs)
211 +     ///   - videos: optional video (for use with VLMs)
    |                                                       ╰─suggestion: Document 'image' parameter
212 |     /// - Returns: response from the model
213 |     public func respond(
warning: Parameter 'video' is missing documentation
   --> ../Streamlined.swift:211:55-211:55
209 |     ///   - prompt: the prompt
210 |     ///   - images: optional image (for use with VLMs)
211 +     ///   - videos: optional video (for use with VLMs)
    |                                                       ╰─suggestion: Document 'video' parameter
212 |     /// - Returns: response from the model
213 |     public func respond(
warning: 'init(chat:tools:additionalContext:)' doesn't exist at '/MLXLMCommon/UserInput/init(prompt:images:videos:tools:additionalContext:)'
   --> ../UserInput.swift:178:13-178:48
176 |     /// ### See Also
177 |     /// - ``Prompt-swift.enum/text(_:)``
178 +     /// - ``init(chat:tools:additionalContext:)``
179 |     public init(
180 |         prompt: String, images: [Image] = [Image](), videos: [Video] = [Video](),
warning: 'init(chat:tools:additionalContext:)' doesn't exist at '/MLXLMCommon/UserInput/init(messages:images:videos:tools:additionalContext:)'
   --> ../UserInput.swift:212:25-212:60
210 |     /// ```
211 |     ///
212 +     /// Typically the ``init(chat:tools:additionalContext:)`` should be used instead
213 |     /// along with a model specific ``MessageGenerator`` (supplied by the ``UserInputProcessor``).
214 |     ///
warning: 'init(chat:tools:additionalContext:)' doesn't exist at '/MLXLMCommon/UserInput/init(messages:images:videos:tools:additionalContext:)'
   --> ../UserInput.swift:223:13-223:48
221 |     /// ### See Also
222 |     /// - ``Prompt-swift.enum/text(_:)``
223 +     /// - ``init(chat:tools:additionalContext:)``
224 |     public init(
225 |         messages: [Message], images: [Image] = [Image](), videos: [Video] = [Video](),
warning: 'init(chat:tools:additionalContext:)' doesn't exist at '/MLXLMCommon/UserInput/init(chat:processing:tools:additionalContext:)'
   --> ../UserInput.swift:258:13-258:48
256 |     /// ### See Also
257 |     /// - ``Prompt-swift.enum/text(_:)``
258 +     /// - ``init(chat:tools:additionalContext:)``
259 |     public init(
260 |         chat: [Chat.Message],
warning: 'init(chat:tools:additionalContext:)' doesn't exist at '/MLXLMCommon/UserInput/init(prompt:images:videos:processing:tools:additionalContext:)'
   --> ../UserInput.swift:282:11-282:46
280 |     /// Initialize the `UserInput` with a preconfigured ``Prompt-swift.enum``.
281 |     ///
282 +     /// ``init(chat:tools:additionalContext:)`` is the preferred mechanism.
283 |     ///
284 |     /// - Parameters:
warning: 'init(chat:tools:additionalContext:)' doesn't exist at '/MLXLMCommon/UserInput/init(prompt:images:videos:processing:tools:additionalContext:)'
   --> ../UserInput.swift:293:13-293:48
291 |     /// ### See Also
292 |     /// - ``Prompt-swift.enum/text(_:)``
293 +     /// - ``init(chat:tools:additionalContext:)``
294 |     public init(
295 |         prompt: Prompt,
Finished building documentation for 'MLXLMCommon' (0.40s)
Generated documentation archive at:
  /Users/admin/builder/spi-builder-workspace/.docs/ml-explore/mlx-swift-examples/2.29.1
Building for debugging...
[0/3] Write swift-version-49B95AFC49DCD68C.txt
Build of product 'snippet-extract' complete! (0.61s)
Building for debugging...
[0/1] Write swift-version-49B95AFC49DCD68C.txt
Build of target: 'MLXLMCommon' complete! (0.67s)
Successfully merged into /Users/admin/builder/spi-builder-workspace/.docs-staging/ml-explore/mlx-swift-examples/2.29.1/index/index.json
Successfully merged into /Users/admin/builder/spi-builder-workspace/.docs-staging/ml-explore/mlx-swift-examples/2.29.1/linkable-paths.json
Target:                   MLXMNIST
Extracting symbol information for 'MLXMNIST'...
Finished extracting symbol information for 'MLXMNIST'. (0.78s)
Building documentation for 'MLXMNIST'...
Finished building documentation for 'MLXMNIST' (0.06s)
Generated documentation archive at:
  /Users/admin/builder/spi-builder-workspace/.docs/ml-explore/mlx-swift-examples/2.29.1
Building for debugging...
[0/3] Write swift-version-49B95AFC49DCD68C.txt
Build of product 'snippet-extract' complete! (0.62s)
Building for debugging...
[0/1] Write swift-version-49B95AFC49DCD68C.txt
Build of target: 'MLXMNIST' complete! (0.68s)
Successfully merged into /Users/admin/builder/spi-builder-workspace/.docs-staging/ml-explore/mlx-swift-examples/2.29.1/index/index.json
Successfully merged into /Users/admin/builder/spi-builder-workspace/.docs-staging/ml-explore/mlx-swift-examples/2.29.1/linkable-paths.json
Target:                   MLXEmbedders
Extracting symbol information for 'MLXEmbedders'...
Finished extracting symbol information for 'MLXEmbedders'. (0.81s)
Building documentation for 'MLXEmbedders'...
warning: 'LanguageModel' doesn't exist at '/MLXEmbedders/BaseConfiguration'
 --> Libraries/Embedders/BaseConfiguration.swift:6:12-6:25
4 | import MLX
5 |
6 + /// Base ``LanguageModel`` configuration -- provides `modelType`
7 | /// and `quantization` (used in loading the model).
8 | ///
warning: 'ModelFactory' doesn't exist at '/MLXEmbedders/BaseConfiguration'
  --> Libraries/Embedders/BaseConfiguration.swift:9:23-9:35
7  | /// and `quantization` (used in loading the model).
8  | ///
9  + /// This is used by ``ModelFactory/load(hub:configuration:progressHandler:)``
10 | /// to determine the type of model to load.
11 | public struct BaseConfiguration: Codable, Sendable {
Finished building documentation for 'MLXEmbedders' (0.12s)
Generated documentation archive at:
  /Users/admin/builder/spi-builder-workspace/.docs/ml-explore/mlx-swift-examples/2.29.1
Building for debugging...
[0/3] Write swift-version-49B95AFC49DCD68C.txt
Build of product 'snippet-extract' complete! (0.61s)
Building for debugging...
[0/1] Write swift-version-49B95AFC49DCD68C.txt
Build of target: 'MLXEmbedders' complete! (0.67s)
Successfully merged into /Users/admin/builder/spi-builder-workspace/.docs-staging/ml-explore/mlx-swift-examples/2.29.1/index/index.json
Successfully merged into /Users/admin/builder/spi-builder-workspace/.docs-staging/ml-explore/mlx-swift-examples/2.29.1/linkable-paths.json
Target:                   StableDiffusion
Extracting symbol information for 'StableDiffusion'...
Finished extracting symbol information for 'StableDiffusion'. (0.79s)
Building documentation for 'StableDiffusion'...
warning: 'setConservativeMemory(_:)' doesn't exist at '/StableDiffusion/ModelContainer/performTwoStage(first:second:)'
   --> Libraries/StableDiffusion/StableDiffusion.swift:180:14-180:39
178 |     /// Perform a two stage action where the first stage returns values passed to the second stage.
179 |     ///
180 +     /// If ``setConservativeMemory(_:)`` is `true` this will discard the model in between
181 |     /// the `first` and `second` blocks. The container will have to be recreated if a caller
182 |     /// wants to use it again.
Finished building documentation for 'StableDiffusion' (0.11s)
Generated documentation archive at:
  /Users/admin/builder/spi-builder-workspace/.docs/ml-explore/mlx-swift-examples/2.29.1
Building for debugging...
[0/3] Write swift-version-49B95AFC49DCD68C.txt
Build of product 'snippet-extract' complete! (0.61s)
Building for debugging...
[0/1] Write swift-version-49B95AFC49DCD68C.txt
Build of target: 'StableDiffusion' complete! (0.67s)
Successfully merged into /Users/admin/builder/spi-builder-workspace/.docs-staging/ml-explore/mlx-swift-examples/2.29.1/index/index.json
Successfully merged into /Users/admin/builder/spi-builder-workspace/.docs-staging/ml-explore/mlx-swift-examples/2.29.1/linkable-paths.json
    5436
29	/Users/admin/builder/spi-builder-workspace/.docs/ml-explore/mlx-swift-examples/2.29.1
✅  Doc result (uploading) reported
========================================
SyncDocs
========================================
Doc archive source directory: $PWD/.docs/ml-explore/mlx-swift-examples/2.29.1
File count: 5436
Doc size:   29.0MB
Preparing doc bundle ...
Uploading prod-ml-explore-mlx-swift-examples-2.29.1-0caae363.zip to s3://spi-docs-inbox/prod-ml-explore-mlx-swift-examples-2.29.1-0caae363.zip
Copying... [10%]
Copying... [20%]
Copying... [30%]
Copying... [40%]
Copying... [50%]
Copying... [60%]
Copying... [70%]
Copying... [80%]
Copying... [90%]
Copying... [100%]
Done.