granite chat multipack support and example

This commit is contained in:
Wing Lian
2025-08-02 20:57:00 -04:00
parent 4ab6a1bd7e
commit b5198d8734
2 changed files with 15 additions and 0 deletions

View File

@@ -36,6 +36,8 @@ SUPPORTED_MULTIPACK_MODEL_TYPES = [
"glm",
"glm4",
"smollm3",
"granite",
"granitemoe",
]

View File

@@ -644,6 +644,19 @@ class LoRAValidationMixin:
)
return data
@model_validator(mode="before")
@classmethod
def check_lora_dropout_parameters(cls, data):
if (
data.get("lora_dropout", 0.0)
and data.get("lora_dropout") > 0.0
and data.get("lora_target_parameters")
):
# lora.ParamWrapper does not work with lora_dropout != 0
raise ValueError(
"`lora_dropout` does not work when using `lora_target_parameters`"
)
class RLValidationMixin:
"""Validation methods related to RL training configuration."""