"""Verify the installed server patch without loading weights.""" import hashlib import json from pathlib import Path from mlx_lm import server manifest = json.loads((Path(__file__).parent / "validation.json").read_text()) actual = hashlib.sha256(Path(server.__file__).read_bytes()).hexdigest() if actual != manifest["server_sha256_after"]: raise SystemExit("FAIL: this Python environment does not use the checked server patch") print("PASS: installed server source matches the checked cache patch")