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

Model download improvements / Background download #77

Open
mqtik opened this issue Dec 29, 2024 · 1 comment
Open

Model download improvements / Background download #77

mqtik opened this issue Dec 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mqtik
Copy link

mqtik commented Dec 29, 2024

Problem description

If the user goes to a screen where useLLM is being used, but have not downloaded the model before, it downloads the model. As some models can be quite heavy, the user likely isn't going to stick around to wait for the whole download to finish, so he might go into another app. He might even leave the phone on the table and just go do something else, and the screen will turn off.
I'm experiencing some issues with this, if the user comes back to the app to see the status, it's stuck at 12% for example - so the download stops at some point, or the progress is not updating anymore. It might be the latter.
Other times, the model might've been downloaded, but isModelReady is false and error is Model and tokenizer already loaded

Proposed solution

To illustrate the current implementation in the hook:
Download issue:

  1. Open a screen where useLLM is used
  2. Go into another app for while
  3. Come back

The loaded issue is a bit trickier, because it has happened after I've loaded the model and had a few conversations with it. After many restarts, it tried to start the download again but got stuck in 0. After further restarts, it downloaded the whole (previously downloaded) model.

Alternative solutions

No response

Benefits to React Native ExecuTorch

Usability. Users are prone to keep with their lives while a model downloads.

Additional context

No response

@mkopcins mkopcins added the bug Something isn't working label Dec 31, 2024
@rokanost
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants