Skip to content

Commit

Permalink
[lmi-dist]validate usage lora and speculative together (#1684)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohithkrn authored Mar 27, 2024
1 parent 0e1afa5 commit 3f1a854
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,11 @@ def validate_engine(cls, engine):
raise AssertionError(
f"Need MPI engine to start lmi-dist RollingBatcher")
return engine

@root_validator(skip_on_failure=True)
def validate_speculative_and_lora(cls, properties):
if properties["enable_lora"] and properties["speculative_draft_model"]:
raise AssertionError(
f"Cannot enable lora and speculative decoding at the same time"
)
return properties

0 comments on commit 3f1a854

Please sign in to comment.