Only load Verifier model if attachment_mode is 'full' #154
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.
Currently, if
verifier_attachment_modeis"full"or"train_only"we load the full verifier model on init.However, for the
"train_only"case, we want to only load the parts of the model that are needed. The logic to do so, is meant to reside in the subclasses ofSpeculatorModel.This change, makes it so that we don't auto-load the full verifier model if
"train_only"is selected.Additional changes:
SpeculatorModel.attach_verifier()no longer returns the loaded verifier (since it might not exist)EagleSpeculator.attach_verifier()directly callsresolve_verifier()to load the verifier model and extract its components.test_speculator_model_attach_verifier_invalidneeded to be updated to reset the model between subtests because otherwise theverifier_attachment_modegets set and kept by the previous try-excepts blocks.