-
Notifications
You must be signed in to change notification settings - Fork 348
add a minimal LLM chat example #454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- LLMEval has more of a showcase of features and runtime statistics - this provides the minimum required to load a model and interact with it - also cleans up the xcodeproj (see #451) - removes VLMEval (redundant and wasn't maintained)
| self.task = nil | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the next file (ContentView) are the full minimal chat app.
| ### Troubleshooting | ||
|
|
||
| If the program crashes with a very deep stack trace, you may need to build | ||
| in Release configuration. This seems to depend on the size of the model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This advice was obsolete
| @@ -1,6 +1,5 @@ | |||
| // Copyright © 2025 Apple Inc. | |||
|
|
|||
| import AsyncAlgorithms | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used
| .product(name: "MLXNN", package: "mlx-swift"), | ||
| .product(name: "MLXOptimizers", package: "mlx-swift"), | ||
| .product(name: "MLXRandom", package: "mlx-swift"), | ||
| .product(name: "Transformers", package: "swift-transformers"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used
- ml-explore/mlx-swift-examples#454 - fixes #27 - move ChatSession integration tests into new test target so we can more easily control when it runs - make a ChatSession _unit_ (more or less) test - fix Sendable / thread safety issues uncovered by LLMBasic
Proposed changes
I updated the documentation to indicate which examples were more full featured and which ones were the minimal starting points. Both have uses.
@DePasqualeOrg FYI
Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes