-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
platform:webweb relatedweb relatedtype:featureEnhancement in the New Functionality or Request for a New SolutionEnhancement in the New Functionality or Request for a New Solution
Description
MediaPipe Solution (you are using)
genai
Programming language
Typescript
Are you willing to contribute it
Yes
Describe the feature and the current behaviour/state
Use LLMs for more than just text generation: Support Classification and text extraction use cases.
Currently only simple text generation is supported.
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
Would be awesome if you could improve the API of MediaPipe so LLMs (like Gemma 3) can not only be used for text generation, but also for more tasks. Especially when they are fine tuned for following instructions (e.g. gemma-3-270m-it).
Rough needed change to support text extraction use-case and classification use-case:
- Text extraction: Enable structured output via a supplied JSON schema.
- Classification: Add probabilities of next token. See also https://ai.google.dev/gemma/docs/agile_classifiers for more details.
This is especially useful, as one LLM can be used for multiple tasks. So edge device does not have to load many models for different tasks. Especially in Web context this can be very useful as resources are scarce.
Any Other info
No response
Metadata
Metadata
Assignees
Labels
platform:webweb relatedweb relatedtype:featureEnhancement in the New Functionality or Request for a New SolutionEnhancement in the New Functionality or Request for a New Solution