You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, large language model (LLM) configurations (e.g., model = ModelFactory.create(...)) are hardcoded in the codebase. This approach requires users to modify the source code directly if they want to add new model types or adjust configurations. However, this creates a maintenance burden: when the code is updated, local modifications may conflict with upstream changes.
Solution
Proposed Solution
Abstract LLM-related parameters into a configuration class.
Manage these configurations via external files (e.g., config.json or config.yaml).
This would allow users to:
Customize models without altering source code.
Avoid conflicts during upstream updates.
Easily share/reuse configurations across environments.
Example Implementation
# Load from config file withopen("llm_config.yaml") asf:
config=load_yaml(f)
model=ModelFactory.create(**config)
This approach aligns with common practices for modular and maintainable code. Thanks for considering this suggestion!
Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Thanks @Barca0412. This is a very good sugggestion. We should support serialization and persistence in the core modules. Using pydantic could be a solution to this. c.c @Wendong-Fan
Required prerequisites
Motivation
Currently, large language model (LLM) configurations (e.g.,
model = ModelFactory.create(...)
) are hardcoded in the codebase. This approach requires users to modify the source code directly if they want to add new model types or adjust configurations. However, this creates a maintenance burden: when the code is updated, local modifications may conflict with upstream changes.Solution
Proposed Solution
This would allow users to:
Example Implementation
This approach aligns with common practices for modular and maintainable code. Thanks for considering this suggestion!
Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: