diff --git a/engines/python/setup/djl_python/properties_manager/lmi_dist_rb_properties.py b/engines/python/setup/djl_python/properties_manager/lmi_dist_rb_properties.py index c4ff157ae..a04bc54e0 100644 --- a/engines/python/setup/djl_python/properties_manager/lmi_dist_rb_properties.py +++ b/engines/python/setup/djl_python/properties_manager/lmi_dist_rb_properties.py @@ -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