[MLX] Fix startup crash when reporting preloaded weights (#37035)

This commit is contained in:
Ali Ihsan Nergiz
2026-08-30 17:36:13 -07:00
committed by GitHub
parent bb5e619860
commit 0da6a66856
2 changed files with 25 additions and 4 deletions
@@ -107,6 +107,16 @@ class MlxModelRunnerStub(ModelRunner):
# that path working instead of raising AttributeError.
prefill_aware_swa = False
@property
def preloaded_weights_bytes(self) -> int:
"""Return zero for the base Torch loader accounting hook.
The native MLX runner materializes weights before sizing its own KV
pool. This stub has no Torch ``ModelLoader`` or Torch-owned weights to
report.
"""
return 0
@staticmethod
def validate_startup_weight_load_mode(server_args) -> None:
if server_args.is_startup_weight_load_overlap: