Skip to content
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

[Enhancement] Run as background app #81

Open
awni opened this issue Jun 15, 2024 · 3 comments
Open

[Enhancement] Run as background app #81

awni opened this issue Jun 15, 2024 · 3 comments

Comments

@awni
Copy link
Member

awni commented Jun 15, 2024

I'm not sure if there is any change to MLX Swift or the examples to make it happen other than setting the right capability. But just want to open this since it has come up a couple times as a useful feature.

If it's just a setup thing, maybe we can include a short blurb in the MLX Swift or example docs for how one would go about it.

@davidkoski
Copy link
Collaborator

What do you mean by background app? Making a web service, e.g. some kind of LLM service?

Generally you can't run background apps on iOS -- you can, but they are for very specialized reasons like playing music or downloading a file. MacOS supports any kind of non-foreground application.

@awni
Copy link
Member Author

awni commented Jun 16, 2024

What do you mean by background app? Making a web service, e.g. some kind of LLM service?

Good question. Its been mentioned in two contexts:

  • Training in the background (e.g. if the phone is plugged and idle)
  • Using another phone as a service in like a cluster of phones

I guess neither of those is really possible in iOS?

@davidkoski
Copy link
Collaborator

Probably not -- the system has to protect battery, thermals and other resources (memory). There are mechanisms to run in the background but they all have restrictions:

For example, you can ask that heavy work is performed in the background while plugged in, but you don't get to pick when that starts.

You can keep a device from sleeping:

which might work for these cases (forcing foreground).

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

No branches or pull requests

2 participants