Skip to content

[Feature] Allow async model loading and cancellation #699

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

Closed
AsakusaRinne opened this issue Apr 26, 2024 · 0 comments · Fixed by #702
Closed

[Feature] Allow async model loading and cancellation #699

AsakusaRinne opened this issue Apr 26, 2024 · 0 comments · Fixed by #702
Assignees

Comments

@AsakusaRinne
Copy link
Collaborator

AsakusaRinne commented Apr 26, 2024

In production environment, especially desktop apps, it's common to have a button (or any other way) to allow users to abort the model loading. Fortunately, llama.cpp has already added support for it ggml-org/llama.cpp#4462. I think we should introduce this feature in LLamaSharp.

Similarly, async model loading is also important for applications based on LLamaSharp, which avoids blocking the main thread for a long time when loading a large model. I've found a similar work of it in the node.js binding of llama.cpp withcatai/node-llama-cpp#178. We could also implement it by polling the progress callback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant