@simplexai/localmodels-darwin-arm64 0.1.0-dev.47 → 0.1.0-dev.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/bootstrap.identity +1 -1
  2. package/bootstrap.sha256 +55 -51
  3. package/modules/localmodels/__init__.py +1 -1
  4. package/modules/localmodels/budget.py +40 -14
  5. package/modules/localmodels/catalog.json +57 -34
  6. package/modules/localmodels/debug_mode.py +25 -0
  7. package/modules/localmodels/deploy.py +3 -0
  8. package/modules/localmodels/engines-b12588-mix-c0c3de8.json +13 -1
  9. package/modules/localmodels/engines.py +31 -6
  10. package/modules/localmodels/library_jobs.py +22 -1
  11. package/modules/localmodels/library_model.py +38 -2
  12. package/modules/localmodels/library_pricing.py +261 -78
  13. package/modules/localmodels/library_serve.py +20 -4
  14. package/modules/localmodels/library_status.py +19 -11
  15. package/modules/localmodels/library_vram.py +123 -0
  16. package/modules/localmodels/llm_rank.py +28 -1
  17. package/modules/localmodels/probe.py +39 -37
  18. package/modules/localmodels/process_identity.py +26 -33
  19. package/modules/localmodels/process_identity_darwin.py +189 -0
  20. package/modules/localmodels/process_identity_linux.py +62 -30
  21. package/modules/localmodels/recommend.py +3 -1
  22. package/modules/localmodels/remote_ops_service.py +15 -46
  23. package/modules/localmodels/service_probe.py +1 -1
  24. package/modules/localmodels/setup_inspection.py +14 -1
  25. package/modules/localmodels/setup_text.py +15 -3
  26. package/modules/localmodels/setup_upgrade.py +145 -0
  27. package/modules/localmodels/stack_binding.py +59 -12
  28. package/modules/localmodels/stack_compose.py +5 -1
  29. package/modules/localmodels/stack_hardware.py +5 -2
  30. package/modules/localmodels/stack_route.py +5 -1
  31. package/modules/localmodels/stack_suite.py +1 -1
  32. package/modules/localmodels/stack_view_access.py +238 -58
  33. package/modules/localmodels/stack_view_hub.py +12 -7
  34. package/modules/localmodels/stack_view_serve.py +13 -6
  35. package/modules/localmodels/transport.py +3 -1
  36. package/modules/localmodels/tui.py +4 -1
  37. package/modules/localmodels/tui_dialogs.py +42 -9
  38. package/modules/localmodels/tui_modals.py +63 -16
  39. package/modules/localmodels/tui_screen.py +80 -53
  40. package/modules/localmodels/tui_views.py +36 -6
  41. package/modules/localmodels/web/index.html +996 -300
  42. package/modules/localmodels/web/sizecalc/app.js +616 -88
  43. package/modules/localmodels/web/sizecalc/page.html +239 -106
  44. package/modules/localmodels/web/view/fleet.js +25 -2
  45. package/modules/localmodels/web/view/nav.js +19 -3
  46. package/modules/localmodels/web/view/view.css +110 -22
  47. package/modules/localmodels/web/view/view.js +40 -22
  48. package/modules/localmodels/win_probe.py +187 -0
  49. package/modules/{simplex_localmodels-0.1.0.dev47.dist-info → simplex_localmodels-0.1.0.dev49.dist-info}/METADATA +1 -1
  50. package/modules/{simplex_localmodels-0.1.0.dev47.dist-info → simplex_localmodels-0.1.0.dev49.dist-info}/RECORD +52 -48
  51. package/package.json +1 -1
  52. package/tool.json +1 -1
  53. /package/modules/{simplex_localmodels-0.1.0.dev47.dist-info → simplex_localmodels-0.1.0.dev49.dist-info}/WHEEL +0 -0
  54. /package/modules/{simplex_localmodels-0.1.0.dev47.dist-info → simplex_localmodels-0.1.0.dev49.dist-info}/entry_points.txt +0 -0
  55. /package/modules/{simplex_localmodels-0.1.0.dev47.dist-info → simplex_localmodels-0.1.0.dev49.dist-info}/licenses/NOTICE +0 -0
  56. /package/modules/{simplex_localmodels-0.1.0.dev47.dist-info → simplex_localmodels-0.1.0.dev49.dist-info}/licenses/localmodels/HERMES-LICENSE +0 -0
@@ -701,6 +701,31 @@ def _install_simulate_mode(config: DebugConfig) -> None:
701
701
  _ACTIVE: DebugConfig | None = None
702
702
 
703
703
 
704
+ def current() -> DebugConfig:
705
+ """Return the active debug config if activated, else resolve from env/files."""
706
+ return _ACTIVE if _ACTIVE is not None else resolve_config()
707
+
708
+
709
+ def status_info() -> dict[str, str] | None:
710
+ """Structured debug summary for ``library-status/v1`` when debug mode is active, else None."""
711
+ cfg = current()
712
+ if cfg.mode == "off":
713
+ return None
714
+ if cfg.source.startswith("state:"):
715
+ return {
716
+ "mode": cfg.mode,
717
+ "source": "state_config",
718
+ "config_path": cfg.source.removeprefix("state:"),
719
+ }
720
+ if cfg.source.startswith("user:"):
721
+ return {
722
+ "mode": cfg.mode,
723
+ "source": "user_config",
724
+ "config_path": cfg.source.removeprefix("user:"),
725
+ }
726
+ return {"mode": cfg.mode, "source": "env"}
727
+
728
+
704
729
  def activate() -> DebugConfig:
705
730
  """Apply the configured debug mode once per process; ``off`` changes nothing."""
706
731
  global _ACTIVE
@@ -494,9 +494,12 @@ def build_plan(
494
494
  # Windows loads a program's DLLs from its own directory; LD_LIBRARY_PATH means nothing there.
495
495
  if facts["platform"] != "win32" and (engine["source"] == "release" or not options.engine_path):
496
496
  env["LD_LIBRARY_PATH"] = engine.get("dir") or engine["binary"].rsplit("/", 1)[0]
497
+ # Older builds (< b12588) need CUDA graphs disabled on Linux SM 12.0; b12588+ runs cleanly.
498
+ build_num = cat.build_number(engine.get("build"))
497
499
  if (
498
500
  facts["platform"] == "linux"
499
501
  and placement.backend == "cuda"
502
+ and (build_num is None or build_num < 12588)
500
503
  and any(
501
504
  gpus[i]["vendor"] == "nvidia" and gpus[i].get("compute_capability") == "12.0"
502
505
  for i in placement.gpu_indices
@@ -3,7 +3,7 @@
3
3
  "tag": "b12588-mix-c0c3de8",
4
4
  "commit": "883286076efe5b85fddb31d9cc7035a6b698ba9b",
5
5
  "source": "https://github.com/unslothai/llama.cpp/releases/tag/b12588-mix-c0c3de8",
6
- "note": "Release asset digests from the GitHub release API and llama-prebuilt-sha256.json (unslothai/llama.cpp, upstream llama.cpp b12588, read 2026-11-21). Required for Inkling 2 Mini (inkling2 / inkling2_loop architecture, unsupported in b11370). Linux x64 CUDA 12 portable (CUDA 12.8, SM 70-120, Ubuntu 22.04) and Linux x64 CPU archives unpack flat with ./llama-server and import up to GLIBC_2.34 plus libgomp.so.1 (verified via ELF .gnu.version_r and dynamic NEEDED); note libggml-cuda.so links libcudart.so.12/libcublas.so.12/libcublasLt.so.12 dynamically and this release ships no separate cudart archive, so CUDA 13 portable is intentionally omitted here (cuda12-portable covers SM 70-120 across CUDA 12.8+ and 13.x drivers without requiring CUDA 13 runtime libraries). Windows x64 CUDA 12 portable and CPU zips unpack flat with llama-server.exe; macOS arm64 Metal tarball unpacks with a single top directory stripped by remote_ops.unpack.",
6
+ "note": "Release asset digests from the GitHub release API and llama-prebuilt-sha256.json (unslothai/llama.cpp, upstream llama.cpp b12588, read 2026-11-21). Required for Inkling 2 Mini (inkling2 / inkling2_loop architecture, unsupported in b11370). Linux x64 CUDA 12 portable (CUDA 12.8, SM 70-120, Ubuntu 22.04) and Linux x64 CPU archives unpack flat with ./llama-server and import up to GLIBC_2.34 plus libgomp.so.1 (verified via ELF .gnu.version_r and dynamic NEEDED); because libggml-cuda.so links libcudart.so.12/libcublas.so.12/libcublasLt.so.12 dynamically and unslothai's release ships no separate cudart archive, Linux and Windows CUDA 12 builds pair with the pinned CUDA 12 cudart companion archives from ggml-org/llama.cpp b11370 (verified via Windows 11 RTX 4060 Ti without CUDA Toolkit and Linux $ORIGIN ldd with empty LD_LIBRARY_PATH). CUDA 13 portable is intentionally omitted here (cuda12-portable covers SM 70-120 across CUDA 12.8+ and 13.x drivers without requiring CUDA 13 runtime libraries). Windows x64 CUDA 12 portable and CPU zips unpack flat with llama-server.exe; macOS arm64 Metal tarball unpacks with a single top directory stripped by remote_ops.unpack.",
7
7
  "builds": [
8
8
  {
9
9
  "platform": "linux",
@@ -20,6 +20,12 @@
20
20
  "url": "https://github.com/unslothai/llama.cpp/releases/download/b12588-mix-c0c3de8/app-b12588-mix-c0c3de8-linux-x64-cuda12-portable.tar.gz",
21
21
  "sha256": "4c30d5e3b3d7242cf3f214977c09a0d06102c71a713c256749909dcafa9f5980",
22
22
  "size_bytes": 471778328
23
+ },
24
+ {
25
+ "name": "cudart-llama-b11370-bin-ubuntu-cuda-12.8-x64.tar.gz",
26
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11370/cudart-llama-b11370-bin-ubuntu-cuda-12.8-x64.tar.gz",
27
+ "sha256": "7807b4fc01958fc11db9894b2ab791e664b4da999017e70f7b5a7147f6c770e3",
28
+ "size_bytes": 594375807
23
29
  }
24
30
  ]
25
31
  },
@@ -73,6 +79,12 @@
73
79
  "url": "https://github.com/unslothai/llama.cpp/releases/download/b12588-mix-c0c3de8/app-b12588-mix-c0c3de8-windows-x64-cuda12-portable.zip",
74
80
  "sha256": "3e7ebce596952a550a49e6f27560f6c26a5b6ba341bbea632fbcfeb43ae7d901",
75
81
  "size_bytes": 467643864
82
+ },
83
+ {
84
+ "name": "cudart-llama-bin-win-cuda-12.4-x64.zip",
85
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11370/cudart-llama-bin-win-cuda-12.4-x64.zip",
86
+ "sha256": "8c79a9b226de4b3cacfd1f83d24f962d0773be79f1e7b75c6af4ded7e32ae1d6",
87
+ "size_bytes": 391443627
76
88
  }
77
89
  ]
78
90
  },
@@ -32,6 +32,19 @@ ENGINE_MIRROR_ENV = "LOCALMODELS_ENGINE_MIRROR"
32
32
  class EngineUnavailableError(PlanError):
33
33
  """No pinned release build runs on this host; an engine already there may still."""
34
34
 
35
+ def __init__(
36
+ self,
37
+ message: str,
38
+ *,
39
+ required_glibc: str = "",
40
+ detected_glibc: str = "",
41
+ missing_libraries: tuple[str, ...] = (),
42
+ ) -> None:
43
+ super().__init__(message)
44
+ self.required_glibc = required_glibc
45
+ self.detected_glibc = detected_glibc
46
+ self.missing_libraries = missing_libraries
47
+
35
48
 
36
49
  class CudaDriverError(PlanError):
37
50
  """The host's NVIDIA driver supports too old a CUDA version, or none could be detected."""
@@ -109,18 +122,27 @@ def select_engine_build(
109
122
  loads = [b for b in builds if not (host_glibc and _version(b.get("min_glibc")) > host_glibc)]
110
123
  if builds and not loads:
111
124
  oldest = min((b.get("min_glibc", "") for b in builds), key=_version)
125
+ detected = ".".join(str(part) for part in host_glibc)
112
126
  raise EngineUnavailableError(
113
- f"{lock['tag']} prebuilt engine needs glibc >= {oldest}; this host has {libc}"
127
+ f"{lock['tag']} prebuilt engine needs glibc >= {oldest}; this host has {libc}",
128
+ required_glibc=oldest,
129
+ detected_glibc=detected,
114
130
  )
115
131
  # A library the probe looked for and did not find; one it did not look for is not a blocker.
116
132
  found = facts.get("shared_libraries") or {}
117
133
  builds = [b for b in loads if all(found.get(x, True) for x in b.get("host_libraries", {}))]
118
134
  if loads and not builds:
119
- missing = ", ".join(f"{lib} (Debian/Ubuntu package {pkg})" for lib, pkg
120
- in loads[0].get("host_libraries", {}).items() if not found.get(lib, True)) # fmt: skip
135
+ missing_items = [
136
+ (lib, pkg)
137
+ for lib, pkg in loads[0].get("host_libraries", {}).items()
138
+ if not found.get(lib, True)
139
+ ]
140
+ missing = ", ".join(f"{lib} (Debian/Ubuntu package {pkg})" for lib, pkg in missing_items)
141
+ missing_names = tuple(lib for lib, _pkg in missing_items)
121
142
  raise EngineUnavailableError(
122
143
  f"{lock['tag']} prebuilt engine needs system libraries {missing}, missing on this "
123
- "host; this tool does not install system packages"
144
+ "host; this tool does not install system packages",
145
+ missing_libraries=missing_names,
124
146
  )
125
147
  if not builds:
126
148
  if backend == "cuda" and platform_builds:
@@ -197,10 +219,13 @@ def host_engine(
197
219
  f"or commit {commit[:8]}" if need_build and commit else "",
198
220
  "with a CUDA backend" if cuda else "",
199
221
  ]
200
- raise PlanError(
222
+ raise EngineUnavailableError(
201
223
  f"{why}; this host has no llama-server that runs and supports every launch option either"
202
224
  + (f" (needs {', '.join(n for n in needs if n)})" if any(needs) else "")
203
- + "; use --engine-path to choose one"
225
+ + "; use --engine-path to choose one",
226
+ required_glibc=why.required_glibc,
227
+ detected_glibc=why.detected_glibc,
228
+ missing_libraries=why.missing_libraries,
204
229
  )
205
230
 
206
231
 
@@ -319,7 +319,28 @@ def _refuse_download(lib: library_status.Library, model: Model) -> library_prici
319
319
  lib.facts, priced, library_pricing.base_free(lib.base_dir)
320
320
  )
321
321
  if reason is not None:
322
- error = LibraryError(reason["code"], f"{model.id} cannot be downloaded here")
322
+ code = reason["code"]
323
+ if code == "DRIVER_UPDATE_REQUIRED":
324
+ req = reason.get("required_cuda") or "required CUDA"
325
+ det = reason.get("detected_cuda")
326
+ detail = f"{model.id} requires NVIDIA driver supporting CUDA {req}" + (
327
+ f" (detected {det})" if det else ""
328
+ )
329
+ elif code == "RUNTIME_DEPENDENCY_MISSING":
330
+ missing = reason.get("missing_libraries")
331
+ if missing:
332
+ detail = f"{model.id} requires missing runtime libraries: {', '.join(missing)}"
333
+ elif req_glibc := reason.get("required_glibc"):
334
+ det_glibc = reason.get("detected_glibc") or "unknown"
335
+ detail = f"{model.id} requires glibc {req_glibc}+ (detected {det_glibc})"
336
+ else:
337
+ detail = f"{model.id} is missing required runtime dependencies"
338
+ elif code == "GPU_UNSUPPORTED":
339
+ vendor = reason.get("gpu_vendor") or "unknown"
340
+ detail = f"{model.id} requires an NVIDIA or Apple Silicon GPU (detected: {vendor})"
341
+ else:
342
+ detail = f"{model.id} cannot be downloaded here"
343
+ error = LibraryError(code, detail)
323
344
  if "need_bytes" in reason:
324
345
  error.fields = {"need_bytes": reason["need_bytes"], "have_bytes": reason["have_bytes"]}
325
346
  raise error
@@ -31,6 +31,9 @@ ERROR_CODES = (
31
31
  "MEMORY_INSUFFICIENT",
32
32
  "DISK_INSUFFICIENT",
33
33
  "PLATFORM_UNSUPPORTED",
34
+ "GPU_UNSUPPORTED",
35
+ "DRIVER_UPDATE_REQUIRED",
36
+ "RUNTIME_DEPENDENCY_MISSING",
34
37
  "LOAD_NO_ROOM",
35
38
  "DOWNLOAD_FAILED",
36
39
  "CHECKSUM_MISMATCH",
@@ -51,6 +54,9 @@ REFUSALS = frozenset(
51
54
  "MEMORY_INSUFFICIENT",
52
55
  "DISK_INSUFFICIENT",
53
56
  "PLATFORM_UNSUPPORTED",
57
+ "GPU_UNSUPPORTED",
58
+ "DRIVER_UPDATE_REQUIRED",
59
+ "RUNTIME_DEPENDENCY_MISSING",
54
60
  "LOAD_NO_ROOM",
55
61
  "MODEL_FILES_MISSING",
56
62
  )
@@ -114,6 +120,12 @@ class Holder(TypedDict):
114
120
  bytes: int
115
121
 
116
122
 
123
+ class ExternalHolder(TypedDict):
124
+ name: str
125
+ bytes: int
126
+ pids: list[int]
127
+
128
+
117
129
  class _Pool(TypedDict):
118
130
  id: str # gpu:N | system | unified
119
131
  total_bytes: int
@@ -123,15 +135,26 @@ class _Pool(TypedDict):
123
135
 
124
136
  class Pool(_Pool, total=False):
125
137
  reserve_bytes: int
138
+ external_holders: list[ExternalHolder]
126
139
 
127
140
 
128
141
  class _Reason(TypedDict):
129
- code: str # MEMORY_INSUFFICIENT | DISK_INSUFFICIENT | PLATFORM_UNSUPPORTED
142
+ code: str # MEMORY_INSUFFICIENT | DISK_INSUFFICIENT | PLATFORM_UNSUPPORTED | GPU_UNSUPPORTED | DRIVER_UPDATE_REQUIRED | RUNTIME_DEPENDENCY_MISSING
130
143
 
131
144
 
132
145
  class Reason(_Reason, total=False):
133
146
  need_bytes: int
134
147
  have_bytes: int
148
+ memory_kind: Literal["vram", "ram", "unified"]
149
+ reclaimable_desktop_vram: bool
150
+ reclaim_bytes: int
151
+ gpu_vendor: Literal["amd", "intel", "none", "unknown"]
152
+ required_cuda: str
153
+ detected_cuda: str
154
+ driver_version: str
155
+ missing_libraries: list[str]
156
+ required_glibc: str
157
+ detected_glibc: str
135
158
 
136
159
 
137
160
  class _Availability(TypedDict):
@@ -213,7 +236,16 @@ class Row(_Row, total=False):
213
236
  note: Note # idle only, when autoload was skipped
214
237
 
215
238
 
216
- class Status(TypedDict):
239
+ class _DebugInfo(TypedDict):
240
+ mode: Literal["tiny", "simulate"]
241
+ source: Literal["env", "state_config", "user_config"]
242
+
243
+
244
+ class DebugInfo(_DebugInfo, total=False):
245
+ config_path: str
246
+
247
+
248
+ class _Status(TypedDict):
217
249
  schema: str
218
250
  tool_version: str
219
251
  observed_at: str
@@ -222,6 +254,10 @@ class Status(TypedDict):
222
254
  models: list[Row]
223
255
 
224
256
 
257
+ class Status(_Status, total=False):
258
+ debug: DebugInfo
259
+
260
+
225
261
  def library_id(catalog_id: str, quant: str) -> str:
226
262
  """The stable library id: the catalog id and its variant."""
227
263
  return f"{catalog_id}:{quant}"