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

Allow cancelling ongoing async generation in LlmInference #5327

Open
bringert opened this issue Apr 18, 2024 · 3 comments
Open

Allow cancelling ongoing async generation in LlmInference #5327

bringert opened this issue Apr 18, 2024 · 3 comments
Assignees
Labels
platform:android Issues with Android as Platform stat:awaiting googler Waiting for Google Engineer's Response task:LLM inference Issues related to MediaPipe LLM Inference Gen AI setup type:feature Enhancement in the New Functionality or Request for a New Solution

Comments

@bringert
Copy link

bringert commented Apr 18, 2024

MediaPipe Solution (you are using)

LlmInference for Android

Programming language

Android Java

Are you willing to contribute it

Yes

Describe the feature and the current behaviour/state

There should be a way to cancel the task created by generateResponseAsync(). Proposed API: add a cancel() method in the LlmInference class that cancels all ongoing requests, or provide a version of generateResponseAsync() that returns a Future

Will this change the current API? How?

No response

Who will benefit with this feature?

No response

Please specify the use cases for this feature

Applications that allow the user to cancel a query, either explicitly, or implicitly by submitting a new query before the last one has finished processing, would need this feature to avoid having to process a request that it no longer cares about.

Any Other info

No response

@bringert bringert added the type:feature Enhancement in the New Functionality or Request for a New Solution label Apr 18, 2024
@kuaashish kuaashish added task:LLM inference Issues related to MediaPipe LLM Inference Gen AI setup platform:android Issues with Android as Platform labels Apr 19, 2024
@kuaashish
Copy link
Collaborator

Hi @bringert,

Could you please provide more details about your query? This will help us understand it better and work on implementing the feature if possible.

Thank you!!

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Apr 19, 2024
@bringert
Copy link
Author

What additional information would you like? The idea is to be able to cancel generation before it completes.

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Apr 19, 2024
@schmidt-sebastian
Copy link
Collaborator

Logged this as an internal feature request: b/335859045

@kuaashish kuaashish added the stat:awaiting googler Waiting for Google Engineer's Response label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:android Issues with Android as Platform stat:awaiting googler Waiting for Google Engineer's Response task:LLM inference Issues related to MediaPipe LLM Inference Gen AI setup type:feature Enhancement in the New Functionality or Request for a New Solution
Projects
None yet
Development

No branches or pull requests

3 participants