Skip to content

Replace mlx-swift-examples with mlx-swift-lm#26

Merged
atdrendel merged 7 commits intomainfrom
mlx-swift-lm
Feb 7, 2026
Merged

Replace mlx-swift-examples with mlx-swift-lm#26
atdrendel merged 7 commits intomainfrom
mlx-swift-lm

Conversation

@atdrendel
Copy link
Contributor

@atdrendel atdrendel commented Feb 6, 2026

  • Update to swift-tools-version 5.12
  • Require iOS 17, Mac Catalyst 17, and macOS 14

Copilot AI review requested due to automatic review settings February 6, 2026 21:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates SHLLM’s MLX dependency from mlx-swift-examples to mlx-swift-lm, aligning tool-call handling and related test scaffolding with the newer upstream APIs.

Changes:

  • Swap SwiftPM dependency from mlx-swift-examples to mlx-swift-lm (and update resolved pins).
  • Migrate LFM2 tool-call handling away from a custom response parser to configuration-based formatting (toolCallFormat = .lfm2) and remove the old parser/Python helper + their unit tests.
  • Update tokenizer/tool test utilities to match newer Tokenizers API surface (e.g., ToolSpec, any Sendable contexts).

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Tests/SHLLMTests/TruncatingUserInputProcessorTests.swift Updates the test tokenizer stub to satisfy newer Tokenizer requirements (e.g., callAsFunction, hasChatTemplate, any Sendable additionalContext).
Tests/SHLLMTests/Tool+SHLLMTests.swift Updates test tool schemas to return ToolSpec and adapts nested dictionaries for any Sendable.
Tests/SHLLMTests/PythonTests.swift Removes Python parser unit tests (file deleted).
Tests/SHLLMTests/Models/LFM2-8B-A1BTests.swift Switches LFM2 tests to configure .lfm2 tool-call format rather than providing a custom response parser.
Tests/SHLLMTests/LFM2ParserTests.swift Removes LFM2 parser unit tests (file deleted).
Sources/SHLLM/SHLLM.swift Switches cache management from MLX.GPU to Memory.
Sources/SHLLM/ResponseParser.swift Removes the LFM2-specific response parser implementation.
Sources/SHLLM/LLM.swift Updates memory logging to use Memory.activeMemory and configures LFM2 via toolCallFormat.
Package.swift Bumps Swift tools version / minimum iOS+macCatalyst targets and swaps dependency to mlx-swift-lm.
Package.resolved Updates dependency pins and SwiftPM resolved-file format/version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@atdrendel atdrendel merged commit df8fd6d into main Feb 7, 2026
1 check passed
@atdrendel atdrendel deleted the mlx-swift-lm branch February 7, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants