-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[llm] Replace model_name
with *required* base_model
, add preset LLM registry, update internal adapter modules
#3423
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
martindavis
reviewed
May 25, 2023
ohho
reviewed
May 25, 2023
arnavgarg1
approved these changes
May 25, 2023
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.
LGTM
martindavis
reviewed
Jun 1, 2023
…ate base model usage. still missing: llm.yaml updates
ksbrar
reviewed
Jun 23, 2023
martindavis
reviewed
Jun 23, 2023
arnavgarg1
reviewed
Jun 23, 2023
…lidate inside the field class itself
justinxzhao
approved these changes
Jun 27, 2023
arnavgarg1
reviewed
Jun 27, 2023
arnavgarg1
reviewed
Jun 27, 2023
arnavgarg1
reviewed
Jun 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The new
base_model
parameter is also just a string, backed by aanyOf
schema that either validates whether the provided string is a Ludwig-supported preset through JSON or an otherwise valid model in the Huggingface repo at runtime (i.e. via validation checks).It is the first required parameter in Ludwig, outside of input and output features, and it uses a bespoke schema tweak to enforce that. It is also the first parameter to use an
anyOf
implementation; this is necessary becauseoneOf
validation requires a value to match exactly one option schema (a preset LLM name would partially match both schemas and cause an error).If the user does choose a preset LLM then after JSON validation but before config object initialization this value will be swapped for the full slash-delimited path defined in the
MODEL_PRESETS
dictionary.Usage
is valid and can be verified by JSON or by the validation checks. By the end of config object initialization it has been replaced by
huggyllama/llama-7b
(which is defined inMODEL_PRESETS
).is also valid but can only be verified during config-object initialization by the extra validation checks.
and
will cause an immediate validation failure.
Necessary follow-up PRs, prompted by changes here
required
field is missing for model-level parameters (e.g.input_features
). Probably an accidental regression. - Fix: int: Add backrequired
for input and output features to the Ludwig JSON schema #3442required
parameters usingmarshmallow
's in-built optionstype
).metadata
dicts inserted into marshmallow fields are necessary anymore