Skip to content

Update mlx-swift-lm dependency to 3.x to support newer model architectures (Gemma 4, etc.) #166

Description

@james-333i

Summary

AnyLanguageModel 0.8.0 pins mlx-swift-lm to from: "2.25.5", which resolves to the 2.x line (<3.0). New model architectures are now landing only in mlx-swift-lm 3.x, which is unreachable from the current dependency range, so AnyLanguageModel consumers can't run them.

Evidence (mlx-swift-lm releases)

  • 2.30.6 (18 Feb) — added Qwen3-VL (dense)
  • 2.31.3 (1 Apr) — added Qwen3.5 (+ MoE), text & vision
  • 3.31.3 (15 Apr) — first 3.x release (breaking API); adds Gemma 4 (text, vision, MoE / E2B & E4B edge variants)

So Qwen3.5 and Qwen3-VL are reachable today (we pin mlx-swift-lm 2.31.3, within AnyLanguageModel 0.8.0's range and it works great). But Gemma 4 — and any future architecture added only on the 3.x line — is blocked, because 3.x has breaking changes that 0.8.0 wasn't built against.

Request

Update AnyLanguageModel's mlx-swift-lm dependency to 3.x (adapting to the 3.x API changes) and cut a release, so newer model families (Gemma 4 first) become available to consumers. More broadly: keeping the mlx-swift-lm dependency current would let new architectures work without each one waiting on an AnyLanguageModel bump.

Happy to test a branch/pre-release against a real iOS app (on-device, multi-turn) if that helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions