Skip to content

Update from upstream#1

Merged
atdrendel merged 13 commits into
mainfrom
update-from-upstream
Dec 6, 2025
Merged

Update from upstream#1
atdrendel merged 13 commits into
mainfrom
update-from-upstream

Conversation

@atdrendel
Copy link
Copy Markdown

No description provided.

Lakr233 and others added 13 commits October 21, 2025 15:26
…#417)

* Update VLM READMEs to reflect current model support

- Update MLXVLM README with all 10 currently supported models from VLMRegistry
- Add missing model types: qwen2_5_vl, qwen3_vl, idefics3, gemma3, smolvlm
- Update VLMEval README to reflect it uses SmolVLM2, not Qwen2-VL-2B
- Change 'have been tried' to 'are supported' for accuracy

* Update VLM READMEs to update processing capabilities

* Update MLXVLM README
* fastvlm: start modeling

* Weights now load

* Multimodal projector

* Pre-processing

* Preparing inputs

* Embeddings

* Match Python prompt

* Remove warnings

* Comments

* format
* Add LoRA layer keys from config

Note: this is a source breaking change to adapt to a change on the mlx-lm side.  Previously you would write:

```swift
    public func loraLinearLayers() -> LoRALinearLayers {
        model.layers.map { ($0.selfAttn, ["q_proj", "v_proj"]) }
    }
```

now this should read:

```swift
    public var loraLayers: [Module] {
        model.layers
    }
```
Copilot AI review requested due to automatic review settings December 6, 2025 11:12
Copy link
Copy Markdown

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

This PR syncs updates from upstream, introducing significant enhancements to the MLX Swift Examples repository. The update includes a new embedder-tool for text embedding operations, dependency version updates, and architectural improvements to the LoRA (Low-Rank Adaptation) training system.

  • Adds comprehensive embedder-tool with REPL, search, and indexing capabilities
  • Updates swift-transformers (1.0.0 → 1.1.1) and mlx-swift (0.25.5 → 0.29.1)
  • Refactors LoRA architecture from function-based to property-based API

Reviewed changes

Copilot reviewed 81 out of 82 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Tools/embedder-tool/* New command-line tool for text embeddings with search, indexing, and REPL commands
Tools/llm-tool/LoraCommands.swift Updates LoRA command integration to use new adapter-based API; fixes spelling error
Libraries/MLXVLM/Models/FastVLM.swift Adds new FastVLM vision-language model implementation
Libraries/MLXLMCommon/Adapters/LoRA/* Refactors LoRA from function-based to property/adapter-based architecture
Libraries/MLXLLM/Models/*.swift Updates all model implementations to use new loraLayers property
Package.swift, Package.resolved Updates dependency versions for swift-transformers and mlx-swift
mlx-swift-examples.xcodeproj/* Adds embedder-tool target and scheme configuration

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

public let eosTokenId: Int
public let multimodalProjectorType: String
public let multimodalProjectorHiddenSize: Int
public let tokenizerModelMaxLangth: Int
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

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

The spelling "tokenizerModelMaxLangth" contains a typo - it should be "tokenizerModelMaxLength" with "Length" fully spelled out.

Copilot uses AI. Check for mistakes.
@atdrendel atdrendel merged commit e0f7ef7 into main Dec 6, 2025
6 checks passed
@atdrendel atdrendel deleted the update-from-upstream branch December 6, 2025 11:29
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.

8 participants