@simplexai/localmodels-darwin-x64 0.1.0-dev.107 → 0.1.0-dev.109

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 (55) hide show
  1. package/NOTICE +13 -6
  2. package/README.md +1 -1
  3. package/bootstrap.identity +1 -1
  4. package/bootstrap.sha256 +54 -50
  5. package/modules/localmodels/__init__.py +1 -1
  6. package/modules/localmodels/catalog.json +682 -67
  7. package/modules/localmodels/catalog.py +11 -1
  8. package/modules/localmodels/catalog_recipes.py +26 -3
  9. package/modules/localmodels/chat_template.py +6 -0
  10. package/modules/localmodels/chat_templates/qwen4-35b-a3b.jinja +223 -0
  11. package/modules/localmodels/debug_stub_server.py +1 -1
  12. package/modules/localmodels/download-mirrors.json +23 -34
  13. package/modules/localmodels/engine_adapters/llama_cpp.py +11 -5
  14. package/modules/localmodels/engine_adapters/strata_poly.py +1 -1
  15. package/modules/localmodels/engines-b12973.json +248 -0
  16. package/modules/localmodels/library_cli.py +68 -1
  17. package/modules/localmodels/library_direct.py +2 -0
  18. package/modules/localmodels/library_elastic.py +1 -1
  19. package/modules/localmodels/library_model.py +4 -0
  20. package/modules/localmodels/library_order.py +44 -1
  21. package/modules/localmodels/library_presentation.py +1 -0
  22. package/modules/localmodels/library_pricing.py +1 -2
  23. package/modules/localmodels/library_unload.py +274 -0
  24. package/modules/localmodels/probe.py +98 -7
  25. package/modules/localmodels/service_roots.py +148 -0
  26. package/modules/localmodels/service_upgrade.py +46 -1
  27. package/modules/localmodels/services_cli.py +8 -28
  28. package/modules/localmodels/speech_workers.py +4 -4
  29. package/modules/localmodels/stack_args.py +11 -4
  30. package/modules/localmodels/stack_down.py +368 -42
  31. package/modules/localmodels/stack_memory.py +1 -1
  32. package/modules/localmodels/stack_preflight.py +2 -2
  33. package/modules/localmodels/stack_view_llm.py +2 -2
  34. package/modules/localmodels/suite.py +4 -0
  35. package/modules/localmodels/tts-moss.txt +78 -53
  36. package/modules/localmodels/tts_backend_speechcpp.py +2 -2
  37. package/modules/localmodels/tts_catalog.py +2 -2
  38. package/modules/localmodels/tts_cli.py +3 -3
  39. package/modules/localmodels/tts_jobs.py +1 -3
  40. package/modules/localmodels/tts_model.py +3 -3
  41. package/modules/localmodels/tts_moss_presets.json +1 -1
  42. package/modules/localmodels/tts_sidecar.py +7 -3
  43. package/modules/localmodels/tts_state.py +15 -0
  44. package/modules/localmodels/tts_worker_kokoro.py +939 -255
  45. package/modules/localmodels/tts_worker_moss.py +25 -9
  46. package/modules/localmodels/tts_workers.py +17 -21
  47. package/modules/{simplex_localmodels-0.1.0.dev107.dist-info → simplex_localmodels-0.1.0.dev109.dist-info}/METADATA +1 -1
  48. package/modules/{simplex_localmodels-0.1.0.dev107.dist-info → simplex_localmodels-0.1.0.dev109.dist-info}/RECORD +49 -45
  49. package/modules/{simplex_localmodels-0.1.0.dev107.dist-info → simplex_localmodels-0.1.0.dev109.dist-info}/licenses/NOTICE +13 -6
  50. package/package.json +1 -1
  51. package/tool.json +1 -1
  52. /package/modules/{simplex_localmodels-0.1.0.dev107.dist-info → simplex_localmodels-0.1.0.dev109.dist-info}/WHEEL +0 -0
  53. /package/modules/{simplex_localmodels-0.1.0.dev107.dist-info → simplex_localmodels-0.1.0.dev109.dist-info}/entry_points.txt +0 -0
  54. /package/modules/{simplex_localmodels-0.1.0.dev107.dist-info → simplex_localmodels-0.1.0.dev109.dist-info}/licenses/LICENSE +0 -0
  55. /package/modules/{simplex_localmodels-0.1.0.dev107.dist-info → simplex_localmodels-0.1.0.dev109.dist-info}/licenses/localmodels/HERMES-LICENSE +0 -0
@@ -0,0 +1,248 @@
1
+ {
2
+ "schema": "localmodels.engine-lock/v1",
3
+ "tag": "b12973",
4
+ "commit": "59b716523f1ba73be12a9f0f51eb4c072b7fa523",
5
+ "source": "https://github.com/ggml-org/llama.cpp/releases/tag/b12973",
6
+ "note": "Release asset digests from the GitHub release API (ggml-org/llama.cpp b12973, published 2026-12-03T23:47:15Z, includes PR #33626 qwen4exp/qwen4_moe architecture and --ple/--lazy-mode engram support). Required for Qwen4-35B-A3B (qwen4exp with per_layer_token_embd n-gram table, needs llama.cpp >= b12969). Linux x64 CPU tarball verified locally on 2026-12-04: highest GLIBC 2.34, libggml-base.so.1.1.1 links libgomp.so.1, llama-server --version reports build 12973 commit 59b716523, and --help lists every SERVER_FLAGS option plus --load-mode, --lazy-mode, -ot, --spec-type draft-mtp, --mmproj, and --ple. Upstream Ubuntu CUDA 12.8/13.5, arm64, and ROCm builds compile in Ubuntu 24.04 containers (min_glibc 2.38, libgomp.so.1); an Ubuntu 22.04 CUDA rebuild and npm mirror copies are deferred to the engine unification follow-up. Windows CUDA 12.4 shares the exact cudart-llama-bin-win-cuda-12.4-x64.zip digest pinned in engines.json.",
7
+ "builds": [
8
+ {
9
+ "platform": "linux",
10
+ "arch": "x64",
11
+ "backend": "cuda",
12
+ "min_cuda": "12.8",
13
+ "min_glibc": "2.38",
14
+ "host_libraries": {
15
+ "libgomp.so.1": "libgomp1"
16
+ },
17
+ "assets": [
18
+ {
19
+ "name": "llama-b12973-bin-ubuntu-cuda-12.8-x64.tar.gz",
20
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/llama-b12973-bin-ubuntu-cuda-12.8-x64.tar.gz",
21
+ "sha256": "82b3f9079add7d141315bb194bd8b2e875b8c00f1960f9e16227be2a38733f36",
22
+ "size_bytes": 229761544
23
+ },
24
+ {
25
+ "name": "cudart-llama-b12973-bin-ubuntu-cuda-12.8-x64.tar.gz",
26
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/cudart-llama-b12973-bin-ubuntu-cuda-12.8-x64.tar.gz",
27
+ "sha256": "3e17b4e70e317ae2074fa100e1483526e9666b557eea2b7ec156a0f5d231738b",
28
+ "size_bytes": 594373582
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "platform": "linux",
34
+ "arch": "x64",
35
+ "backend": "cuda",
36
+ "min_cuda": "13.5",
37
+ "min_glibc": "2.38",
38
+ "host_libraries": {
39
+ "libgomp.so.1": "libgomp1"
40
+ },
41
+ "assets": [
42
+ {
43
+ "name": "llama-b12973-bin-ubuntu-cuda-13.5-x64.tar.gz",
44
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/llama-b12973-bin-ubuntu-cuda-13.5-x64.tar.gz",
45
+ "sha256": "095fc3cc21193ad7a809d6d45c0c74d9a37244975c011e7e691ef6fa57b084fa",
46
+ "size_bytes": 233674501
47
+ },
48
+ {
49
+ "name": "cudart-llama-b12973-bin-ubuntu-cuda-13.5-x64.tar.gz",
50
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/cudart-llama-b12973-bin-ubuntu-cuda-13.5-x64.tar.gz",
51
+ "sha256": "49d8fbbb37ac0f1c1ce8e3a167f3287b8c89f12940d3fc7b22ac827989ae9f14",
52
+ "size_bytes": 444078976
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ "platform": "linux",
58
+ "arch": "arm64",
59
+ "backend": "cuda",
60
+ "min_cuda": "13.5",
61
+ "min_glibc": "2.38",
62
+ "host_libraries": {
63
+ "libgomp.so.1": "libgomp1"
64
+ },
65
+ "assets": [
66
+ {
67
+ "name": "llama-b12973-bin-ubuntu-cuda-13.5-arm64.tar.gz",
68
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/llama-b12973-bin-ubuntu-cuda-13.5-arm64.tar.gz",
69
+ "sha256": "ceaf333fde37ab7c14a4a7a7f99f4a3b8505f2f1e5af9545443828b4fa19364e",
70
+ "size_bytes": 228559452
71
+ },
72
+ {
73
+ "name": "cudart-llama-b12973-bin-ubuntu-cuda-13.5-arm64.tar.gz",
74
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/cudart-llama-b12973-bin-ubuntu-cuda-13.5-arm64.tar.gz",
75
+ "sha256": "1b452a16d6629ca63438e91bd00a5c72f24e81279f76fde81e2cd64f92fb8d7b",
76
+ "size_bytes": 559873929
77
+ }
78
+ ]
79
+ },
80
+ {
81
+ "platform": "linux",
82
+ "arch": "x64",
83
+ "backend": "vulkan",
84
+ "min_glibc": "2.34",
85
+ "host_libraries": {
86
+ "libgomp.so.1": "libgomp1"
87
+ },
88
+ "assets": [
89
+ {
90
+ "name": "llama-b12973-bin-ubuntu-vulkan-x64.tar.gz",
91
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/llama-b12973-bin-ubuntu-vulkan-x64.tar.gz",
92
+ "sha256": "aadbc4fdc0ea7fea4ed613768fa225f8fe2742b6d85c3cfb8363a8748b2297fa",
93
+ "size_bytes": 36501538
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ "platform": "linux",
99
+ "arch": "arm64",
100
+ "backend": "vulkan",
101
+ "min_glibc": "2.38",
102
+ "host_libraries": {
103
+ "libgomp.so.1": "libgomp1"
104
+ },
105
+ "assets": [
106
+ {
107
+ "name": "llama-b12973-bin-ubuntu-vulkan-arm64.tar.gz",
108
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/llama-b12973-bin-ubuntu-vulkan-arm64.tar.gz",
109
+ "sha256": "8ec919d3c2cb9ea3d4e9809d5121db68707c516f265f5a99f7ed91eab38bafcb",
110
+ "size_bytes": 29300770
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ "platform": "linux",
116
+ "arch": "x64",
117
+ "backend": "rocm",
118
+ "min_glibc": "2.38",
119
+ "host_libraries": {
120
+ "libgomp.so.1": "libgomp1"
121
+ },
122
+ "assets": [
123
+ {
124
+ "name": "llama-b12973-bin-ubuntu-rocm-10.0-x64.tar.gz",
125
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/llama-b12973-bin-ubuntu-rocm-10.0-x64.tar.gz",
126
+ "sha256": "216f580f73752de2696061f605bb90b8f576b78abbbeb2890f10db3b713d610b",
127
+ "size_bytes": 305990859
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ "platform": "linux",
133
+ "arch": "x64",
134
+ "backend": "cpu",
135
+ "min_glibc": "2.34",
136
+ "host_libraries": {
137
+ "libgomp.so.1": "libgomp1"
138
+ },
139
+ "assets": [
140
+ {
141
+ "name": "llama-b12973-bin-ubuntu-x64.tar.gz",
142
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/llama-b12973-bin-ubuntu-x64.tar.gz",
143
+ "sha256": "ab43171d0d7abe93d89c5eb87f4e0979ed1f576a151e60ffda3562d6fd347b04",
144
+ "size_bytes": 23770836
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ "platform": "linux",
150
+ "arch": "arm64",
151
+ "backend": "cpu",
152
+ "min_glibc": "2.38",
153
+ "host_libraries": {
154
+ "libgomp.so.1": "libgomp1"
155
+ },
156
+ "assets": [
157
+ {
158
+ "name": "llama-b12973-bin-ubuntu-arm64.tar.gz",
159
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/llama-b12973-bin-ubuntu-arm64.tar.gz",
160
+ "sha256": "465f5a667489d0f5505cafe40157e19b85d41cc1850cf3cac4d8e5189933d265",
161
+ "size_bytes": 19311484
162
+ }
163
+ ]
164
+ },
165
+ {
166
+ "platform": "darwin",
167
+ "arch": "arm64",
168
+ "backend": "metal",
169
+ "assets": [
170
+ {
171
+ "name": "llama-b12973-bin-macos-arm64.tar.gz",
172
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/llama-b12973-bin-macos-arm64.tar.gz",
173
+ "sha256": "532a020383a8f6a6431a5ea84bf8c65e5cfa8e6be6a89d1f6ef40d5a283b366e",
174
+ "size_bytes": 17065928
175
+ }
176
+ ]
177
+ },
178
+ {
179
+ "platform": "darwin",
180
+ "arch": "x64",
181
+ "backend": "cpu",
182
+ "assets": [
183
+ {
184
+ "name": "llama-b12973-bin-macos-x64.tar.gz",
185
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/llama-b12973-bin-macos-x64.tar.gz",
186
+ "sha256": "2a80b40f2e5aab0fea20d3bd06e9ab3cae88188d15dcc2d5957609b08b2365b3",
187
+ "size_bytes": 12778121
188
+ }
189
+ ]
190
+ },
191
+ {
192
+ "platform": "win32",
193
+ "arch": "x64",
194
+ "backend": "cuda",
195
+ "min_cuda": "12.4",
196
+ "binary": "llama-server.exe",
197
+ "assets": [
198
+ {
199
+ "name": "llama-b12973-bin-win-cuda-12.4-x64.zip",
200
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/llama-b12973-bin-win-cuda-12.4-x64.zip",
201
+ "sha256": "a66111df88e53aef4cfb17309be34b5f368b8a072168efbf8764b49a7dff7aa2",
202
+ "size_bytes": 375547479
203
+ },
204
+ {
205
+ "name": "cudart-llama-bin-win-cuda-12.4-x64.zip",
206
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/cudart-llama-bin-win-cuda-12.4-x64.zip",
207
+ "sha256": "8c79a9b226de4b3cacfd1f83d24f962d0773be79f1e7b75c6af4ded7e32ae1d6",
208
+ "size_bytes": 391443627
209
+ }
210
+ ]
211
+ },
212
+ {
213
+ "platform": "win32",
214
+ "arch": "x64",
215
+ "backend": "cuda",
216
+ "min_cuda": "13.5",
217
+ "binary": "llama-server.exe",
218
+ "assets": [
219
+ {
220
+ "name": "llama-b12973-bin-win-cuda-13.5-x64.zip",
221
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/llama-b12973-bin-win-cuda-13.5-x64.zip",
222
+ "sha256": "dc5f735d0804ce17ceae5bca3cf6becb22f165df28620ed6f343432ea2f67226",
223
+ "size_bytes": 234761071
224
+ },
225
+ {
226
+ "name": "cudart-llama-bin-win-cuda-13.5-x64.zip",
227
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/cudart-llama-bin-win-cuda-13.5-x64.zip",
228
+ "sha256": "c2bf4cc202bfbaaa7a0b75f5082457c3811326947bb216059b72839d844e9cba",
229
+ "size_bytes": 426314199
230
+ }
231
+ ]
232
+ },
233
+ {
234
+ "platform": "win32",
235
+ "arch": "x64",
236
+ "backend": "cpu",
237
+ "binary": "llama-server.exe",
238
+ "assets": [
239
+ {
240
+ "name": "llama-b12973-bin-win-cpu-x64.zip",
241
+ "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12973/llama-b12973-bin-win-cpu-x64.zip",
242
+ "sha256": "617e10f8d9ad0029660fa2507c330e2141f98fb29c8712af6f4e4af7a2b3785f",
243
+ "size_bytes": 25598826
244
+ }
245
+ ]
246
+ }
247
+ ]
248
+ }
@@ -147,8 +147,36 @@ def add_parser(sub: argparse._SubParsersAction[argparse.ArgumentParser]) -> None
147
147
  "record verification status, and stop the server so active models and routing stay untouched.",
148
148
  examples=[("%(prog)s custom.hf.owner--repo:Q4_K_M --ctx 4096 --jsonl", "")],
149
149
  )
150
+ unload_cmd = verbs.add_parser("unload", help="stop a model's server; its weights stay")
151
+ unload_cmd.add_argument(
152
+ "model",
153
+ nargs="?",
154
+ default=None,
155
+ metavar="MODEL",
156
+ help="a library model id, CATALOG_ID:QUANT (omit when using --all)",
157
+ )
158
+ unload_cmd.add_argument(
159
+ "--all",
160
+ action="store_true",
161
+ help="unload every loaded or active library model and cancel active library jobs",
162
+ )
163
+ _base(unload_cmd)
164
+ unload_cmd.add_argument(
165
+ "--json",
166
+ action="store_true",
167
+ help="print one result as JSON (single-model unload always prints JSON)",
168
+ )
169
+ cli_help.document(
170
+ unload_cmd,
171
+ "Stop a model's server (or every active library model with --all); its weights stay. "
172
+ "Single-model unload prints one localmodels.library-event/v1 JSON object; --all prints "
173
+ "localmodels.library-unload-all/v1 with --json or a concise text summary otherwise.",
174
+ examples=[
175
+ ("%(prog)s qwen3.8-27b-iq3s:UD-IQ3_S --json", ""),
176
+ ("%(prog)s --all --json", "unload every active or loaded library model"),
177
+ ],
178
+ )
150
179
  for verb, text, note in (
151
- ("unload", "stop a model's server; its weights stay", "stop the server"),
152
180
  ("remove", "delete a model's weights (unloads it first)", "keeps files others use"),
153
181
  ("cancel", "stop a running download and delete its files", "the download exits 130"),
154
182
  ):
@@ -337,12 +365,51 @@ def _status(args: argparse.Namespace) -> int:
337
365
  return 0
338
366
 
339
367
 
368
+ def _unload_all(args: argparse.Namespace) -> int:
369
+ from localmodels import library_unload
370
+
371
+ as_json = bool(getattr(args, "json", False))
372
+ try:
373
+ report = library_unload.unload_all(args.base_dir)
374
+ except KeyboardInterrupt:
375
+ error = LibraryError("CANCELLED", "the unload was interrupted")
376
+ if as_json:
377
+ emit_final(error_doc(error), jsonl=False)
378
+ else:
379
+ print("error: library unload --all was interrupted", file=sys.stderr)
380
+ return error.exit_code
381
+ except Exception as exc: # noqa: BLE001 - consistent CLI error handling
382
+ if as_json:
383
+ emit_final(error_doc(LibraryError(FALLBACK["unload"], str(exc))), jsonl=False)
384
+ else:
385
+ print(f"error: library unload --all failed: {exc}", file=sys.stderr)
386
+ return EXIT_FAILED
387
+ if as_json:
388
+ print(json.dumps(report, ensure_ascii=False, indent=1))
389
+ return 0 if report["ok"] else EXIT_FAILED
390
+ return library_unload.print_report(report)
391
+
392
+
340
393
  def cli(args: argparse.Namespace) -> int:
341
394
  verb = args.library_command
342
395
  if verb == "status":
343
396
  return _status(args)
344
397
  if verb == "custom":
345
398
  return _custom(args)
399
+ if verb == "unload":
400
+ use_all = bool(getattr(args, "all", False))
401
+ model_id = getattr(args, "model", None)
402
+ if use_all and model_id is not None:
403
+ print(
404
+ "error: library unload: specify either MODEL or --all, not both",
405
+ file=sys.stderr,
406
+ )
407
+ return 2
408
+ if not use_all and model_id is None:
409
+ print("error: library unload: specify MODEL or --all", file=sys.stderr)
410
+ return 2
411
+ if use_all:
412
+ return _unload_all(args)
346
413
  from localmodels import library_jobs, library_serve, library_smoke
347
414
 
348
415
  jsonl = verb in ("download", "load", "smoke-test")
@@ -40,6 +40,8 @@ def default_effort(levels: list[str]) -> str:
40
40
  return "off"
41
41
  if "medium" in levels:
42
42
  return "medium"
43
+ if "low" in levels:
44
+ return "low"
43
45
  return levels[(len(levels) - 1) // 2]
44
46
 
45
47
 
@@ -203,7 +203,7 @@ def _floor_need_bytes(
203
203
  ) -> tuple[int, int]:
204
204
  """(total_need_bytes, wired_need_bytes) at ``floor_posture`` (compact KV)."""
205
205
  active = model.entry.agent_posture(floor_posture)
206
- profile = estimator.eager(model.entry.profile(model.variant))
206
+ profile = model.entry.agent_profile(model.variant)
207
207
  window = min(active.floor, profile.n_ctx_train) if profile.n_ctx_train > 0 else active.floor
208
208
  kv = active.kv_types[-1]
209
209
  mtp = bool(model.entry.mtp_capable and model.entry.agent_mtp and active.mtp_draft_depth > 0)
@@ -490,6 +490,10 @@ class Row(_Row, total=False):
490
490
  display_name: str
491
491
  suitability_rank: int
492
492
  best_for_host: bool
493
+ # The row the catalog presents first for this host's card tier (an 8-16 GiB NVIDIA card: the
494
+ # GSQ-RCO IQ3_S PolyStrata build, since the 2026-12-04 tier calibration). Older Computers omit
495
+ # it.
496
+ best_for_tier: bool
493
497
  quant_method: QuantMethod
494
498
  bits_per_weight: float
495
499
  quant_fidelity: QuantFidelity
@@ -20,6 +20,15 @@ from localmodels.probe import GPU, HostFacts
20
20
 
21
21
  _ACTIONABLE_UNAVAILABLE = frozenset({"DRIVER_UPDATE_REQUIRED", "RUNTIME_DEPENDENCY_MISSING"})
22
22
  _LONG_CONTEXT_FLOOR = 131_072
23
+ # Tier calibration of 2026-12-04: below the 24 GiB tier the catalog's ``small_card_candidate``
24
+ # recipe is presented first, the way the tier table reads. It is the GSQ-RCO IQ3_S PolyStrata
25
+ # build: the 8 GB speed-limited one (22-43% faster decode, 2.06 GiB less disk, 0.57 GiB less
26
+ # anonymous memory than UD-Q3_K_XL) and the 16 GB zero-offload one (3,072/3,072 routed experts in
27
+ # VRAM). From 24 GiB up the UD-Q3_K_XL / UD-Q4_K_XL default stands, which wins on KLD and Chinese
28
+ # fidelity (ZH 0.0301 against 0.1130). The promoted row keeps ``status: candidate`` and is never
29
+ # ``recommended``: ``--llm auto`` and the one-click install still pick the validated default.
30
+ _SMALL_CARD_CEILING_BYTES = 24 << 30
31
+ _SMALL_CARD_RECIPES: dict[str, bool] | None = None
23
32
 
24
33
 
25
34
  def ranked_quality(entry: cat.CatalogEntry) -> int:
@@ -183,6 +192,37 @@ def _best_visible_nvidia_gpu(facts: HostFacts) -> GPU | None:
183
192
  return max(gpus, key=lambda g: g["total_bytes"]) if gpus else None
184
193
 
185
194
 
195
+ def _small_card_recipes() -> dict[str, bool]:
196
+ """Catalog id -> whether the recipe is the presented pick for a small card's tier."""
197
+ global _SMALL_CARD_RECIPES
198
+ if _SMALL_CARD_RECIPES is None:
199
+ _SMALL_CARD_RECIPES = {
200
+ r["id"]: bool(r.get("small_card_candidate")) for r in suite.recipes("llm")
201
+ }
202
+ return _SMALL_CARD_RECIPES
203
+
204
+
205
+ def intended_for_tier(facts: HostFacts, row_doc: Row) -> bool:
206
+ """Whether the catalog presents this row first for the card tier this host is in.
207
+
208
+ Only the 8-16 GiB NVIDIA tiers name one; from 24 GiB up, and on Apple Silicon where the same
209
+ build does not run, no row claims it. ``recommended`` stays untouched: the one-click default is
210
+ still the validated pick.
211
+ """
212
+ if metal.supported(facts):
213
+ return False
214
+ best_gpu = _best_visible_nvidia_gpu(facts)
215
+ if best_gpu is None or best_gpu["total_bytes"] >= _SMALL_CARD_CEILING_BYTES:
216
+ return False
217
+ present = row_doc["state"] != "absent" or (
218
+ row_doc["fit"] != "none" and row_doc["availability"]["downloadable"]
219
+ )
220
+ if not present:
221
+ return False
222
+ catalog_id = row_doc["id"].partition(":")[0]
223
+ return _small_card_recipes().get(catalog_id, False)
224
+
225
+
186
226
  def _desktop_bucket_tier(facts: HostFacts, model: Model, row_doc: Row) -> tuple[int, int]:
187
227
  entry = model.entry
188
228
  reason = row_doc["availability"].get("reason")
@@ -233,6 +273,7 @@ def _desktop_suitability_key(
233
273
  is_recommended = 0 if row_doc["recommended"] else 1
234
274
  reason = row_doc["availability"].get("reason")
235
275
  avail_bucket, tier = _desktop_bucket_tier(facts, model, row_doc)
276
+ small_card = 0 if intended_for_tier(facts, row_doc) else 1
236
277
  rq = ranked_quality(entry)
237
278
  band = bands.get((avail_bucket, tier), {}).get(rq, 0)
238
279
  fidelity = _fidelity_rank(model)
@@ -283,6 +324,7 @@ def _desktop_suitability_key(
283
324
  return (
284
325
  is_recommended,
285
326
  avail_bucket,
327
+ small_card,
286
328
  fits_card_vram,
287
329
  tier,
288
330
  rank_tuple,
@@ -296,13 +338,14 @@ def _desktop_suitability_key(
296
338
  return (
297
339
  is_recommended,
298
340
  avail_bucket,
341
+ small_card,
299
342
  shortfall,
300
343
  need,
301
344
  tier,
302
345
  rank_tuple,
303
346
  row_doc["id"],
304
347
  )
305
- return (is_recommended, avail_bucket, tier, rank_tuple, row_doc["id"])
348
+ return (is_recommended, avail_bucket, small_card, tier, rank_tuple, row_doc["id"])
306
349
 
307
350
 
308
351
  def order_rows(facts: HostFacts, models: list[Model], rows: list[Row]) -> list[Row]:
@@ -351,6 +351,7 @@ def enrich_status_rows(
351
351
  row["suitability_rank"] = rank
352
352
  is_best = best_id is not None and row["id"] == best_id
353
353
  row["best_for_host"] = is_best
354
+ row["best_for_tier"] = library_order.intended_for_tier(facts, row)
354
355
 
355
356
  ref = _reference_row(by_group[gid], row)
356
357
  has_smaller = False
@@ -43,7 +43,6 @@ from localmodels.estimator import (
43
43
  AGENT_VRAM_RESERVE_BYTES,
44
44
  PhysicsRefusal,
45
45
  agent_footprint_bytes,
46
- eager,
47
46
  )
48
47
  from localmodels.library_model import LibraryError, Reason, display_name, split_id
49
48
  from localmodels.planning import budget, llm_ram, memory_pools
@@ -613,7 +612,7 @@ def floor_metadata(
613
612
  active = model.entry.agent_posture(
614
613
  context_policy.posture_for(posture(), "metal" if metal_unified else "cuda")
615
614
  )
616
- profile = eager(model.entry.profile(model.variant))
615
+ profile = model.entry.agent_profile(model.variant)
617
616
  window = profile.n_ctx_train if 0 < profile.n_ctx_train < active.floor else active.floor
618
617
  vision_on = vision.llama_reader_enabled(model.entry.mmproj, active.vision)
619
618
  mtp = bool(model.entry.mtp_capable and model.entry.agent_mtp and active.mtp_draft_depth > 0)