-
Notifications
You must be signed in to change notification settings - Fork 705
Closed
Labels
module: llmIssues related to LLM examples and apps, and to the extensions/llm/ codeIssues related to LLM examples and apps, and to the extensions/llm/ codetriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🚀 The feature, motivation and pitch
Current status
The configuration system in export_llama is limited:
- Only via cli command. There's no python API. We cannot export an arbitrary nn.Module
- The cli args are complicated. It's hard for users to get what can be configured
- It's a bad practice to have flat configs and pass it deeply into various functions
Proposal
- Similar to the torchtune config system, use Hydra and omegaconf, so that the configs can be organized in yaml file, and overrides by cli.
- Use structured config, like config.model, config.quantization, etc. Only pass sub configs to each component.
- Keep config and sub configs at high level and directly pass field values
- An example of config definition in https://gist.github.com/iseeyuan/df9cd283b46dc574d1d506324258f59b
Steps
Since export_llama is used in many places, we do incremental changes.
- convert args to DictConfig with structure.
- Refactor functions for composability and unblock internal use
- Add new entry point using Hydra
- Deprecate the legacy argparser systme.
Alternatives
No response
Additional context
No response
RFC (Optional)
No response
cc @larryliu0820 @mergennachin @cccclai @helunwencser @jackzhxng
Metadata
Metadata
Assignees
Labels
module: llmIssues related to LLM examples and apps, and to the extensions/llm/ codeIssues related to LLM examples and apps, and to the extensions/llm/ codetriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Type
Projects
Status
Done
Status
Done