
Release Notes: - N/A --------- Co-authored-by: michael <michael@zed.dev> Co-authored-by: agus <agus@zed.dev>
1.1 KiB
1.1 KiB
- The changes improve the configurability of the
TextGeneration
struct and its initialization by refactoring generation parameters (temperature
,top_p
) to use non-optional types with default values, simplifying their use throughout the codebase. - The argument parser is updated to enhance usability:
verbose_prompt
is renamed to a more generalverbose
flag, several arguments are given default values (e.g.,temperature
,top_p
,sample_len
), and optional arguments likecache_path
andweight_path
are now properly handled with conditional logic and fallbacks. - The code loading the model configuration is updated to support deserializing from a JSON config file using Serde, and the
Config
struct is extended with a newrope_ratio
field with a default value via a helper function, improving flexibility for different model setups. - Import statements and general code layout are cleaned up for clarity and consistency, including reorganizing imports and removing unnecessary unwraps or panics, while maintaining the same core functionality of the text generation pipeline.