Skip to content

Minimal adoption of materialized-array from mlx-swift-lm - #488

Open
davidkoski wants to merge 1 commit into
mainfrom
materialized-array-1
Open

davidkoski wants to merge 1 commit into
mainfrom
materialized-array-1

Conversation

@davidkoski

Copy link
Copy Markdown
Member

Proposed changes

Minimal adoption of materialized-array from mlx-swift-lm

See ml-explore/mlx-swift-lm#335

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)

@davidkoski
davidkoski requested a review from angeloskath July 20, 2026 21:16

// Generate response using the model
return try await modelContainer.perform { (context: ModelContext) in
return try await modelContainer.perform { context in

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not sure why the type was specified here -- just omit and it builds fine.

Comment on lines -199 to +207
_ context: inout ModelContext
_ context: inout TrainableModelContext
) {
if let extraEosToken {
context.configuration.extraEOSTokens.insert(extraEosToken)
}
}

func generate(
input: LMInput, context: ModelContext
input: LMInput, context: ModelContextProviding

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These are the two examples I use in ModelContainer for how to update.

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.

1 participant