Skip to content

add upgrade docs, how to use, how to develop.#206

Merged
davidkoski merged 6 commits into
mainfrom
upgrade-docs
Apr 15, 2026
Merged

add upgrade docs, how to use, how to develop.#206
davidkoski merged 6 commits into
mainfrom
upgrade-docs

Conversation

@davidkoski
Copy link
Copy Markdown
Collaborator

Proposed changes

Documentation on:

  • upgrading from 2.x
  • how to use mlx-swift-lm
  • how to develop mlx-swift-lm
  • integration packages and integration macros

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING document
  • I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the necessary documentation (if needed)

FYI @DePasqualeOrg @ronaldmannak

The top level README.md has information on upgrading, etc. -- this is a start at moving it into the documentation proper and documenting how to integrate (3 ways) with downloaders/tokenizers. Let me know what you think.

When we are ready to release 3.x I think the README can be cut down substantially and just point at the hosted docs.

@davidkoski davidkoski requested a review from angeloskath April 11, 2026 19:01
@@ -0,0 +1,66 @@
# Developing mlx-swift-lm

Techniques for developing _in_ mlx-swift-lm.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This should help people who are developing new models or KVCache, etc -- it walks through the ways that you can develop and test.

@@ -0,0 +1,147 @@
# Upgrade From 2.x Release

Notes on upgrading from mlx-swift-lm 2.x releases.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Specifically on how to upgrade, based on notes from ml-explore/mlx-swift-examples#468

@@ -0,0 +1,237 @@
# Using mlx-swift-lm

How to use mlx-swift-lm in your own tools and applications
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The current top level README with more explanation

Comment thread Libraries/MLXLMCommon/Documentation.docc/using.md Outdated
simplest way, but consider <doc:#Integration-Package> as there are alternate
implementations that may provide features and capabilities that you want.

### Implementing Protocols
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Building the integration by hand.


See <doc:#Xcode-projects> for information about how to hook it up.

### MLXHuggingFace Macros
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Parity with 2.x -- use the macros. If you are just trying to get things up and running on 3.x this is probably the easiest (in terms of dependency wrangling, especially before we cut the release).

Comment thread README.md Outdated
> to decouple from tokenizer and downloader packages some breaking
> changes were introduced. See [Breaking Changes](#breaking-changes) for more information.
>
> Additionally [upgrading documentation](https://swiftpackageindex.com/ml-explore/mlx-swift-lm/main/documentation/mlxlmcommon/upgrade)) has detailed instructions on upgrading.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Once merged the docs will show up here -- the link doesn't exist yet.

Comment thread README.md Outdated

> [!NOTE]
> https://github.com/ml-explore/mlx-swift-examples/pull/468 is a branch in mlx-swift-examples
> that uses the new 3.x APIs.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Pointer for people who want to try the integration in mlx-swift-examples.

Comment thread README.md

For some example applications and tools that use MLX Swift LM, check out [MLX Swift Examples](https://github.com/ml-explore/mlx-swift-examples).

## Documentation
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Just moved this back up to the top

Comment thread README.md Outdated
Comment on lines +67 to +85
| [huggingface/swift-huggingface](https://github.com/huggingface/swift-huggingface) | [DePasqualeOrg/swift-huggingface-mlx](https://github.com/DePasqualeOrg/swift-huggingface-mlx) |
| [DePasqualeOrg/swift-hf-api](https://github.com/DePasqualeOrg/swift-hf-api) | [DePasqualeOrg/swift-hf-api-mlx](https://github.com/DePasqualeOrg/swift-hf-api-mlx) |
| [huggingface/swift-huggingface](https://github.com/huggingface/swift-huggingface) | [DePasqualeOrg/swift-huggingface-mlx](https://github.com/DePasqualeOrg/swift-huggingface-mlx) |
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reordered so it is consistent with the other table.

Copy link
Copy Markdown
Member

@angeloskath angeloskath left a comment

Choose a reason for hiding this comment

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

Looks great!

@davidkoski davidkoski mentioned this pull request Apr 13, 2026
4 tasks
JaeminKim-amoz

This comment was marked as spam.

@davidkoski davidkoski merged commit 1c05248 into main Apr 15, 2026
3 checks passed
@davidkoski davidkoski deleted the upgrade-docs branch April 15, 2026 14:29
@DePasqualeOrg
Copy link
Copy Markdown
Contributor

The docs on SPI are not building for some reason, which means that the links to the doc articles are not working: https://swiftpackageindex.com/ml-explore/mlx-swift-lm/builds

@davidkoski
Copy link
Copy Markdown
Collaborator Author

The docs on SPI are not building for some reason, which means that the links to the doc articles are not working: https://swiftpackageindex.com/ml-explore/mlx-swift-lm/builds

Thanks for spotting that -- let me see if I can figure out what is going on there. Perhaps it is just lag in the doc builds. SPI does see the new tag.

@davidkoski
Copy link
Copy Markdown
Collaborator Author

Maybe it is just this:

We are currently processing a large build job backlog and it may take much longer than usual for compatibility information to appear

@DePasqualeOrg
Copy link
Copy Markdown
Contributor

DePasqualeOrg commented Apr 16, 2026

Edit: Comment moved to #216

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.

4 participants