-
Notifications
You must be signed in to change notification settings - Fork 527
[Android] Add API to use new config #10346
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/10346
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit c38ccd3 with merge base dfd3dbe ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new API for configuring and using LLM modules on Android by adding a new constructor that accepts a configuration object (LlmModuleConfig) and a new generate method that takes an LlmGenerationConfig for token generation.
- Introduces a new constructor for LlmModule that initializes the module using LlmModuleConfig.
- Adds an overloaded generate method to support generation with configuration options via LlmGenerationConfig.
Comments suppressed due to low confidence (1)
extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm/LlmModule.java:62
- [nitpick] Consider updating the Javadoc reference to LlmModuleConfig using {@link LlmModuleConfig} instead of #LlmModuleConfig for improved documentation linking and clarity.
/** Constructs a LLM Module for a model with given #LlmModuleConfig */
6918f67
to
5004fdd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces an API update to support new configuration options for LLM modules on Android, enabling easier configuration via dedicated config objects.
- Introduces a new constructor accepting LlmModuleConfig.
- Adds an overloaded generate method that takes an LlmGenerationConfig.
Comments suppressed due to low confidence (1)
extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm/LlmModule.java:62
- [nitpick] Consider updating the Javadoc comment to remove the '#' symbol from '#LlmModuleConfig'. Using '{@code LlmModuleConfig}' or including an '@param config' for clarity would improve its readability.
/** Constructs a LLM Module for a model with given #LlmModuleConfig */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds new APIs for integrating configuration objects when constructing the LLM module and generating tokens.
- Introduces a new constructor that accepts a LlmModuleConfig object.
- Adds an overloaded generate() method that takes a LlmGenerationConfig object.
Comments suppressed due to low confidence (1)
extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm/LlmModule.java:62
- [nitpick] Consider using the {@link LlmModuleConfig} Javadoc tag instead of '#LlmModuleConfig' for clearer documentation and better IDE support.
/** Constructs a LLM Module for a model with given #LlmModuleConfig */
764fbd6
to
64dde98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new API that supports configuration objects to initialize and generate outputs in LlmModule.
- Added a new constructor accepting LlmModuleConfig.
- Added an overloaded generate method that uses LlmGenerationConfig.
...android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm/LlmModule.java
Outdated
Show resolved
Hide resolved
@kirklandsign has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…/executorch/extension/llm/LlmModule.java Co-authored-by: Copilot <[email protected]>
@kirklandsign has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
No description provided.