Fix --convert passed without --runner on causal models (#42935)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2026-05-18 15:56:09 +00:00
committed by GitHub
parent e26736973a
commit b12745e4f3
+8 -2
View File
@@ -546,7 +546,9 @@ class ModelConfig:
is_generative_model = registry.is_text_generation_model(architectures, self)
is_pooling_model = registry.is_pooling_model(architectures, self)
self.runner_type = self._get_runner_type(architectures, self.runner)
self.runner_type = self._get_runner_type(
architectures, self.runner, self.convert
)
self.convert_type = self._get_convert_type(
architectures, self.runner_type, self.convert
)
@@ -884,11 +886,15 @@ class ModelConfig:
self,
architectures: list[str],
runner: RunnerOption,
convert: ConvertOption,
) -> RunnerType:
if runner != "auto":
return runner
runner_type = self._get_default_runner_type(architectures)
if convert in {"auto", "none"}:
runner_type = self._get_default_runner_type(architectures)
else:
runner_type = "pooling"
# Don't log the most common case
if runner_type != "generate":