@simplexai/localmodels-linux-arm64 0.1.0-dev.57 → 0.1.0-dev.58

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 (29) hide show
  1. package/bootstrap.identity +1 -1
  2. package/bootstrap.sha256 +28 -27
  3. package/modules/localmodels/__init__.py +1 -1
  4. package/modules/localmodels/budget.py +161 -1
  5. package/modules/localmodels/catalog.py +5 -2
  6. package/modules/localmodels/gpu_specs.py +38 -13
  7. package/modules/localmodels/library_cli.py +8 -1
  8. package/modules/localmodels/library_elastic.py +720 -0
  9. package/modules/localmodels/library_model.py +101 -4
  10. package/modules/localmodels/library_pricing.py +31 -39
  11. package/modules/localmodels/library_serve.py +238 -42
  12. package/modules/localmodels/library_state.py +31 -0
  13. package/modules/localmodels/library_status.py +95 -2
  14. package/modules/localmodels/llm_rank.py +16 -5
  15. package/modules/localmodels/metal.py +141 -0
  16. package/modules/localmodels/metal_probe.py +167 -0
  17. package/modules/localmodels/probe.py +2 -2
  18. package/modules/localmodels/recommend.py +6 -1
  19. package/modules/localmodels/stack_compose.py +6 -1
  20. package/modules/localmodels/stack_hardware.py +3 -1
  21. package/modules/localmodels/stack_picks.py +16 -2
  22. package/modules/{simplex_localmodels-0.1.0.dev57.dist-info → simplex_localmodels-0.1.0.dev58.dist-info}/METADATA +1 -1
  23. package/modules/{simplex_localmodels-0.1.0.dev57.dist-info → simplex_localmodels-0.1.0.dev58.dist-info}/RECORD +25 -24
  24. package/package.json +1 -1
  25. package/tool.json +1 -1
  26. /package/modules/{simplex_localmodels-0.1.0.dev57.dist-info → simplex_localmodels-0.1.0.dev58.dist-info}/WHEEL +0 -0
  27. /package/modules/{simplex_localmodels-0.1.0.dev57.dist-info → simplex_localmodels-0.1.0.dev58.dist-info}/entry_points.txt +0 -0
  28. /package/modules/{simplex_localmodels-0.1.0.dev57.dist-info → simplex_localmodels-0.1.0.dev58.dist-info}/licenses/NOTICE +0 -0
  29. /package/modules/{simplex_localmodels-0.1.0.dev57.dist-info → simplex_localmodels-0.1.0.dev58.dist-info}/licenses/localmodels/HERMES-LICENSE +0 -0
@@ -62,8 +62,21 @@ RESERVE_MAX_BYTES = 8 * GIB
62
62
  # it kills processes (a 73.4 GB plan against 73.8 GB available was aborted on local-119,
63
63
  # 2026-10-29). A shared Mac can sit at warning for hours with tens of GB free, so warning plans
64
64
  # keep this share of the RAM available back instead of refusing.
65
+ PRESSURE_NORMAL = 1
65
66
  PRESSURE_WARN = 2
67
+ PRESSURE_CRITICAL = 4
66
68
  WARN_KEEP_FRACTION = 0.25
69
+ # Dual-tier admission constants for Apple Silicon unified memory:
70
+ # - Hard ceiling: Metal wired ceiling minus live AGX wired usage, scaled by a safety fraction.
71
+ # - Soft budget: scales host keep down for 16 GiB Macs (1.0 GiB + 0.5 GiB display = 1.5 GiB vs
72
+ # 2.5 GiB on 24 GiB+ Macs) and accounts for compressible inactive anonymous pages when macOS
73
+ # VM memory pressure is Normal or Warn (never when Critical).
74
+ SMALL_HOST_THRESHOLD_BYTES = 16 * GIB
75
+ SMALL_HOST_KEEP_BYTES = 1 * GIB
76
+ HARD_OS_FLOOR_BYTES = 1 * GIB
77
+ WIRED_HEADROOM_SAFETY_FRACTION = 0.92
78
+ INACTIVE_ANON_RECLAIM_NORMAL = 0.50
79
+ INACTIVE_ANON_RECLAIM_WARN = 0.25
67
80
 
68
81
 
69
82
  class Metal(TypedDict, total=False):
@@ -75,6 +88,8 @@ class Metal(TypedDict, total=False):
75
88
  recommended_max_working_set_bytes: int | None
76
89
  unified_memory: bool
77
90
  assumed_total_bytes: int # set by ``assume`` (--unified-memory), never by the probe
91
+ wired_limit_bytes: int | None # sysctl iogpu.wired_limit_mb in bytes when explicitly set (> 0)
92
+ gpu_in_use_bytes: int | None # live AGXAccelerator "In use system memory" in bytes
78
93
 
79
94
 
80
95
  def reading(facts: HostFacts) -> Metal | None:
@@ -135,6 +150,132 @@ def working_set_bytes(facts: HostFacts) -> int:
135
150
  return read_working_set(facts) or default_working_set(facts["ram"]["total_bytes"])
136
151
 
137
152
 
153
+ def wired_ceiling_bytes(facts: HostFacts) -> int:
154
+ """Effective Metal wired ceiling: explicit ``iogpu.wired_limit_mb`` when set, else
155
+ ``recommendedMaxWorkingSetSize``, else Apple's default share of physical RAM."""
156
+ found = reading(facts)
157
+ wired = found.get("wired_limit_bytes") if found else None
158
+ if wired is not None and wired > 0:
159
+ return int(wired)
160
+ return working_set_bytes(facts)
161
+
162
+
163
+ def gpu_in_use_reading(facts: HostFacts) -> int | None:
164
+ """Live AGXAccelerator wired GPU usage reading in bytes when available, else None."""
165
+ found = reading(facts)
166
+ in_use = found.get("gpu_in_use_bytes") if found else None
167
+ if in_use is not None and in_use >= 0:
168
+ return int(in_use)
169
+ return None
170
+
171
+
172
+ def gpu_in_use_bytes(facts: HostFacts) -> int:
173
+ """Live system-wide GPU wired usage in bytes: AGXAccelerator reading when available,
174
+ otherwise the non-cached resident memory of observed Metal inference processes."""
175
+ direct = gpu_in_use_reading(facts)
176
+ if direct is not None:
177
+ return direct
178
+ return sum(
179
+ max(0, int(p.get("used_bytes") or 0) - int(p.get("cached_bytes") or 0))
180
+ for p in _metal_processes(facts)
181
+ )
182
+
183
+
184
+ def is_critical_pressure(facts: HostFacts) -> bool:
185
+ """True when macOS ``kern.memorystatus_vm_pressure_level`` reports Critical (4)."""
186
+ level = facts["ram"].get("pressure_level")
187
+ return level is not None and level not in (PRESSURE_NORMAL, PRESSURE_WARN)
188
+
189
+
190
+ def wired_headroom_bytes(facts: HostFacts) -> int:
191
+ """Hard Metal wired headroom ceiling for new allocations:
192
+ ``min((wired_ceiling - gpu_in_use) * WIRED_HEADROOM_SAFETY_FRACTION, physical_safety_cap)``,
193
+ or 0 off Apple Silicon or under Critical VM memory pressure."""
194
+ if not supported(facts) or is_critical_pressure(facts):
195
+ return 0
196
+ ceiling = wired_ceiling_bytes(facts)
197
+ in_use = gpu_in_use_bytes(facts)
198
+ wired_room = int(max(0, ceiling - in_use) * WIRED_HEADROOM_SAFETY_FRACTION)
199
+ total = int(facts["ram"]["total_bytes"])
200
+ wired_ram = facts["ram"].get("wired_bytes")
201
+ if wired_ram is not None and wired_ram >= 0:
202
+ phys_cap = max(0, total - int(wired_ram) - HARD_OS_FLOOR_BYTES)
203
+ else:
204
+ phys_cap = max(0, total - HOST_KEEP_BYTES)
205
+ return min(wired_room, phys_cap)
206
+
207
+
208
+ def inactive_anon_bytes(facts: HostFacts) -> int:
209
+ """Inactive anonymous memory in bytes from ``facts['ram']`` when present, else 0."""
210
+ ram = facts["ram"]
211
+ direct = ram.get("inactive_anon_bytes")
212
+ if direct is not None and direct >= 0:
213
+ return int(direct)
214
+ req = (
215
+ "active_bytes",
216
+ "inactive_bytes",
217
+ "file_backed_bytes",
218
+ "anonymous_bytes",
219
+ "purgeable_bytes",
220
+ )
221
+ if all(ram.get(k) is not None for k in req):
222
+ active = max(0, int(ram["active_bytes"]))
223
+ inactive = max(0, int(ram["inactive_bytes"]))
224
+ speculative = max(0, int(ram.get("speculative_bytes") or 0))
225
+ file_backed = max(0, int(ram["file_backed_bytes"]))
226
+ anonymous = max(0, int(ram["anonymous_bytes"]))
227
+ purgeable = max(0, int(ram["purgeable_bytes"]))
228
+ non_purgeable_anon = max(0, anonymous - purgeable)
229
+ lower = max(0, inactive - max(0, file_backed - speculative))
230
+ upper = min(inactive, non_purgeable_anon)
231
+ if active + inactive > 0:
232
+ est = int(non_purgeable_anon * (inactive / (active + inactive)))
233
+ return max(lower, min(upper, est))
234
+ return upper
235
+ return 0
236
+
237
+
238
+ def reclaimable_inactive_anon_bytes(facts: HostFacts) -> int:
239
+ """Estimated compressible/reclaimable share of inactive anonymous pages on macOS.
240
+ Zero when pressure is Critical or when no inactive anonymous breakdown was probed."""
241
+ if is_critical_pressure(facts):
242
+ return 0
243
+ anon = inactive_anon_bytes(facts)
244
+ if anon <= 0:
245
+ return 0
246
+ level = facts["ram"].get("pressure_level")
247
+ factor = INACTIVE_ANON_RECLAIM_WARN if level == PRESSURE_WARN else INACTIVE_ANON_RECLAIM_NORMAL
248
+ raw = int(anon * factor)
249
+ ram = facts["ram"]
250
+ total = int(ram["total_bytes"])
251
+ avail = int(ram["available_bytes"])
252
+ wired = ram.get("wired_bytes")
253
+ compressed = ram.get("compressed_bytes")
254
+ if wired is not None and wired >= 0:
255
+ hard_used = int(wired) + max(0, int(compressed or 0)) + HARD_OS_FLOOR_BYTES
256
+ max_avail = max(0, total - hard_used)
257
+ else:
258
+ max_avail = max(0, total - HOST_KEEP_BYTES)
259
+ return min(raw, max(0, max_avail - avail))
260
+
261
+
262
+ def soft_host_keep_bytes(facts: HostFacts) -> int:
263
+ """Soft host/gateway RAM reserve for library admission: 1 GiB on <=16 GiB Macs, 2 GiB above."""
264
+ total = int(facts["ram"]["total_bytes"])
265
+ return SMALL_HOST_KEEP_BYTES if 0 < total <= SMALL_HOST_THRESHOLD_BYTES else HOST_KEEP_BYTES
266
+
267
+
268
+ def soft_available_bytes(facts: HostFacts) -> int:
269
+ """Soft available unified memory: ``pressured`` available bytes plus reclaimable inactive
270
+ anonymous headroom (0 under Critical pressure)."""
271
+ if is_critical_pressure(facts):
272
+ return 0
273
+ pressured_facts, _ = pressured(facts)
274
+ base_avail = int(pressured_facts["ram"]["available_bytes"])
275
+ reclaim = reclaimable_inactive_anon_bytes(facts)
276
+ return min(int(facts["ram"]["total_bytes"]), base_avail + reclaim)
277
+
278
+
138
279
  def assumed_total(facts: HostFacts) -> int | None:
139
280
  """The unified memory ``assume`` priced these facts at; None for a reading of this Mac."""
140
281
  found = reading(facts)
@@ -22,6 +22,19 @@ from typing import Any
22
22
 
23
23
  OBJC = "/usr/lib/libobjc.A.dylib"
24
24
  METAL = "/System/Library/Frameworks/Metal.framework/Metal"
25
+ _LAST_VM_DETAILS: dict[str, int] = {}
26
+
27
+
28
+ def last_vm_details() -> dict[str, int]:
29
+ """Return the vm_stat byte breakdown recorded by the latest ``available_memory`` call."""
30
+ return dict(_LAST_VM_DETAILS)
31
+
32
+
33
+ def ram_status() -> dict[str, int]:
34
+ """Pop recorded vm_stat breakdown and merge sysctl pressure/swap status for ``probe.collect``."""
35
+ details = dict(_LAST_VM_DETAILS)
36
+ _LAST_VM_DETAILS.clear()
37
+ return {**details, **memory_status()}
25
38
 
26
39
 
27
40
  def available_memory(total_text: str, vm_stat: str) -> tuple[int, int]:
@@ -49,9 +62,163 @@ def available_memory(total_text: str, vm_stat: str) -> tuple[int, int]:
49
62
  available = sum(n for n in pages if n is not None) * int(page[1])
50
63
  if total <= 0 or int(page[1]) <= 0 or available > total:
51
64
  raise OSError("RAM measurement unavailable")
65
+ _LAST_VM_DETAILS.clear()
66
+ _LAST_VM_DETAILS.update(parse_vm_stat_details(vm_stat))
52
67
  return total, available
53
68
 
54
69
 
70
+ def _vm_stat_counts(vm_stat: str) -> tuple[int, dict[str, int]] | None:
71
+ """Parse page size and integer page counts from macOS ``vm_stat`` output."""
72
+ page = re.search(r"page size of (\d+) bytes\)", vm_stat)
73
+ if not page:
74
+ return None
75
+ page_size = int(page[1])
76
+ if page_size <= 0:
77
+ return None
78
+ counts: dict[str, int] = {}
79
+ for match in re.finditer(
80
+ r"^([A-Za-z][A-Za-z0-9 -]+):[ \t]+(\d+)\.[ \t]*$", vm_stat, re.MULTILINE
81
+ ):
82
+ counts[match[1]] = int(match[2])
83
+ return page_size, counts
84
+
85
+
86
+ def parse_vm_stat_details(vm_stat: str) -> dict[str, int]:
87
+ """Byte breakdown of macOS ``vm_stat`` counters, including estimated inactive anonymous memory.
88
+
89
+ Returns an empty dict when ``vm_stat`` is unreadable. Inactive anonymous pages are bounded
90
+ between ``max(0, inactive - max(0, file_backed - speculative))`` and
91
+ ``min(inactive, max(0, anonymous - purgeable))``, estimated proportionally by the inactive
92
+ share of active+inactive paged memory.
93
+ """
94
+ parsed = _vm_stat_counts(vm_stat)
95
+ if parsed is None:
96
+ return {}
97
+ page_size, counts = parsed
98
+ mapping = {
99
+ "Pages free": "free_bytes",
100
+ "Pages active": "active_bytes",
101
+ "Pages inactive": "inactive_bytes",
102
+ "Pages speculative": "speculative_bytes",
103
+ "Pages wired down": "wired_bytes",
104
+ "Pages purgeable": "purgeable_bytes",
105
+ "File-backed pages": "file_backed_bytes",
106
+ "Anonymous pages": "anonymous_bytes",
107
+ "Pages occupied by compressor": "compressed_bytes",
108
+ }
109
+ details = {key: counts[label] * page_size for label, key in mapping.items() if label in counts}
110
+ req = (
111
+ "Pages active",
112
+ "Pages inactive",
113
+ "File-backed pages",
114
+ "Anonymous pages",
115
+ "Pages purgeable",
116
+ )
117
+ if all(label in counts for label in req):
118
+ active = counts["Pages active"]
119
+ inactive = counts["Pages inactive"]
120
+ speculative = counts.get("Pages speculative", 0)
121
+ file_backed = counts["File-backed pages"]
122
+ anonymous = counts["Anonymous pages"]
123
+ purgeable = counts["Pages purgeable"]
124
+ non_purgeable_anon = max(0, anonymous - purgeable)
125
+ lower = max(0, inactive - max(0, file_backed - speculative))
126
+ upper = min(inactive, non_purgeable_anon)
127
+ if active + inactive > 0:
128
+ est = int(non_purgeable_anon * (inactive / (active + inactive)))
129
+ inactive_anon = max(lower, min(upper, est))
130
+ else:
131
+ inactive_anon = upper
132
+ details["inactive_anon_bytes"] = inactive_anon * page_size
133
+ return details
134
+
135
+
136
+ def vm_memory_details() -> dict[str, int]:
137
+ """Read macOS ``vm_stat`` breakdown; returns empty dict off macOS or on error."""
138
+ try:
139
+ result = subprocess.run(
140
+ ["/usr/bin/vm_stat"],
141
+ capture_output=True,
142
+ text=True,
143
+ timeout=10,
144
+ check=False,
145
+ )
146
+ if result.returncode:
147
+ return {}
148
+ return parse_vm_stat_details(result.stdout)
149
+ except (OSError, ValueError, subprocess.TimeoutExpired):
150
+ return {}
151
+
152
+
153
+ def parse_wired_limit_mb(text: str) -> int | None:
154
+ """Parse ``sysctl -n iogpu.wired_limit_mb`` into bytes; None when 0, unset, or invalid."""
155
+ try:
156
+ mb = int(text.strip())
157
+ except ValueError:
158
+ return None
159
+ return (mb << 20) if mb > 0 else None
160
+
161
+
162
+ def wired_limit_bytes() -> int | None:
163
+ """Read ``iogpu.wired_limit_mb`` in bytes when set (> 0), else None."""
164
+ try:
165
+ result = subprocess.run(
166
+ ["/usr/sbin/sysctl", "-n", "iogpu.wired_limit_mb"],
167
+ capture_output=True,
168
+ text=True,
169
+ timeout=10,
170
+ check=False,
171
+ )
172
+ if result.returncode:
173
+ return None
174
+ return parse_wired_limit_mb(result.stdout)
175
+ except (OSError, ValueError, subprocess.TimeoutExpired):
176
+ return None
177
+
178
+
179
+ def parse_agx_in_use_bytes(text: str) -> int | None:
180
+ """Parse live AGXAccelerator ``In use system memory`` bytes from ``ioreg`` output."""
181
+ matches = [int(m) for m in re.findall(r'"In use system memory"\s*=\s*(\d+)', text)]
182
+ return max(matches) if matches else None
183
+
184
+
185
+ def agx_in_use_bytes() -> int | None:
186
+ """Read live system-wide Apple GPU wired usage via ``ioreg -r -c AGXAccelerator``."""
187
+ try:
188
+ result = subprocess.run(
189
+ ["/usr/sbin/ioreg", "-r", "-c", "AGXAccelerator"],
190
+ capture_output=True,
191
+ text=True,
192
+ timeout=10,
193
+ check=False,
194
+ )
195
+ if result.returncode:
196
+ return None
197
+ return parse_agx_in_use_bytes(result.stdout)
198
+ except (OSError, ValueError, subprocess.TimeoutExpired):
199
+ return None
200
+
201
+
202
+ def metal_telemetry() -> dict[str, int]:
203
+ """Optional Apple Silicon wired-limit and AGX live-usage telemetry for ``facts['metal']``."""
204
+ found: dict[str, int] = {}
205
+ wired = wired_limit_bytes()
206
+ if wired is not None:
207
+ found["wired_limit_bytes"] = wired
208
+ in_use = agx_in_use_bytes()
209
+ if in_use is not None:
210
+ found["gpu_in_use_bytes"] = in_use
211
+ return found
212
+
213
+
214
+ def metal_device_with_telemetry() -> dict[str, Any] | None:
215
+ """Read ``metal_device()`` and attach available wired-limit/AGX telemetry when present."""
216
+ device = metal_device()
217
+ if device is not None:
218
+ device.update(metal_telemetry())
219
+ return device
220
+
221
+
55
222
  def memory_status() -> dict[str, int]:
56
223
  """Missing sysctl readings stay unknown, not zero pressure or zero swap."""
57
224
  values = {}
@@ -712,9 +712,9 @@ def collect(
712
712
  "python": platform.python_version(),
713
713
  "cpu": {"model": _cpu_model(), "logical_cores": os.cpu_count()},
714
714
  "ram": {
715
+ **(metal_probe.ram_status() if sys.platform == "darwin" else {}),
715
716
  "total_bytes": ram_total,
716
717
  "available_bytes": ram_avail,
717
- **(metal_probe.memory_status() if sys.platform == "darwin" else {}),
718
718
  },
719
719
  "gpu_vendor_class": vendor,
720
720
  "nvidia": nvidia,
@@ -730,7 +730,7 @@ def collect(
730
730
  "shared_libraries": shared_libraries() if is_linux else {},
731
731
  }
732
732
  if facts["platform"] == "darwin" and facts["arch"] == "arm64":
733
- facts["metal"] = metal_probe.metal_device()
733
+ facts["metal"] = metal_probe.metal_device_with_telemetry()
734
734
  if facts["platform"] == "win32" and gpus and (gpu_procs := win_probe.gpu_process_memory()):
735
735
  facts["gpu_processes"] = gpu_procs
736
736
  return facts
@@ -193,7 +193,12 @@ def recommendation(
193
193
  break
194
194
  if not fitting:
195
195
  return None
196
- entry_id, index = llm_rank.choose(fitting, "smartest", fallback_ids={fallback.id})
196
+ slow_ids = {
197
+ entry_id for (_, tok_s), entry_id, _ in fitting if tok_s < cat.USABLE_FLOOR_TOK_S
198
+ }
199
+ entry_id, index = llm_rank.choose(
200
+ fitting, "smartest", fallback_ids={fallback.id}, slow_ids=slow_ids
201
+ )
197
202
  if entry_id != fallback.id:
198
203
  return None
199
204
  fallback_placement = next((p for p in host if p.id == f"gpu:{index}"), None)
@@ -349,7 +349,12 @@ def _choose_llm(
349
349
  if kept := stack_auto.approved_llama_choice(fitting, approved):
350
350
  return kept[0], placement(kept[1])
351
351
  prefer, ladder = str(options.get("prefer") or "smartest"), llm_rank.mac_ladder(facts)
352
- llm_id, index = llm_rank.choose(fitting, prefer, ladder, fallback_ids=fallback_ids)
352
+ slow_ids = {
353
+ entry_id for (_, tok_s), entry_id, _ in fitting if tok_s < cat.USABLE_FLOOR_TOK_S
354
+ }
355
+ llm_id, index = llm_rank.choose(
356
+ fitting, prefer, ladder, fallback_ids=fallback_ids, slow_ids=slow_ids
357
+ )
353
358
  return llm_id, placement(index)
354
359
  where = (
355
360
  f"GPU {gpu}"
@@ -302,7 +302,9 @@ def llm_budget(
302
302
  uma=on_mac,
303
303
  gpu_name=gpu["name"],
304
304
  platform=facts.get("platform", ""),
305
- gpu_bandwidth_gb_s=None if on_mac else gpu_specs.bandwidth_gb_s(gpu["name"]),
305
+ gpu_bandwidth_gb_s=gpu_specs.bandwidth_gb_s(
306
+ gpu["name"], total_bytes=facts["ram"]["total_bytes"] if on_mac else None
307
+ ),
306
308
  )
307
309
  return budget, reserve
308
310
 
@@ -86,6 +86,7 @@ def picks(cards: Sequence[CardFits], ladder: llm_rank.MacLadder | None = None) -
86
86
  p["quality"]
87
87
  for p in found.values()
88
88
  if p["decode_tok_s"] is not None
89
+ and p["decode_tok_s"] >= cat.USABLE_FLOOR_TOK_S
89
90
  and p["id"] not in strata_ids
90
91
  and not p.get("candidate_fallback")
91
92
  ]
@@ -108,14 +109,27 @@ def picks(cards: Sequence[CardFits], ladder: llm_rank.MacLadder | None = None) -
108
109
 
109
110
  ranked = [((p["quality"], _smart_tie(p)), p["id"], p["card"]) for p in eligible]
110
111
  fallback_ids = {p["id"] for p in eligible if p.get("candidate_fallback")}
111
- smartest = found[llm_rank.choose(ranked, "smartest", ladder, fallback_ids=fallback_ids)[0]]
112
+ slow_ids = {
113
+ p["id"]
114
+ for p in eligible
115
+ if p["id"] not in strata_ids
116
+ and p["decode_tok_s"] is not None
117
+ and p["decode_tok_s"] < cat.USABLE_FLOOR_TOK_S
118
+ }
119
+ smartest = found[
120
+ llm_rank.choose(ranked, "smartest", ladder, fallback_ids=fallback_ids, slow_ids=slow_ids)[0]
121
+ ]
112
122
  llama_ranked = [
113
123
  ((p["quality"], float(p["decode_tok_s"])), p["id"], p["card"])
114
124
  for p in eligible
115
125
  if p["id"] not in strata_ids and p["decode_tok_s"] is not None
116
126
  ]
117
127
  fastest = (
118
- found[llm_rank.choose(llama_ranked, "fastest", ladder, fallback_ids=fallback_ids)[0]]
128
+ found[
129
+ llm_rank.choose(
130
+ llama_ranked, "fastest", ladder, fallback_ids=fallback_ids, slow_ids=slow_ids
131
+ )[0]
132
+ ]
119
133
  if llama_ranked
120
134
  else smartest
121
135
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simplex-localmodels
3
- Version: 0.1.0.dev57
3
+ Version: 0.1.0.dev58
4
4
  Summary: Detect hardware, recommend and install a verified local model stack
5
5
  License-Expression: LicenseRef-Proprietary
6
6
  License-File: NOTICE
@@ -1,5 +1,5 @@
1
1
  localmodels/HERMES-LICENSE,sha256=ghVW5jNnlkUKuFLTdRF7SKSIfnHSVXlP1jGNmZgqWrY,1070
2
- localmodels/__init__.py,sha256=c6g9OK5YnsNY2m51wIqBjtFX_S6Y2V7p-nMdubkgl-8,171
2
+ localmodels/__init__.py,sha256=Iyg1PBj1kzkJYdo7NMcmFVS3sgMM0j1eUIQPceAThtg,171
3
3
  localmodels/__main__.py,sha256=Yh5D_wmCJH-1Epee9dJtC4wS9dBYZp_RDcIg8rbpJ3k,25928
4
4
  localmodels/app.py,sha256=1YQxeQt1LtnFgZhy6KI3xJ08DhXYtbTUviSmHlBNSlY,19714
5
5
  localmodels/approval.py,sha256=QR3miw70RpREK6y-IMtL4ePk8p9tUz_cgZIXTxXlckM,14021
@@ -17,9 +17,9 @@ localmodels/bifrost_models.py,sha256=bG3NTl3bzgf-_LNSjGQ61TR3AWgJA8x_JZnE4yz4beE
17
17
  localmodels/bifrost_pi.py,sha256=DthkJaycYsZaSFk2L4_DE-V3mqsefV9Tptvtb-EYoFQ,7414
18
18
  localmodels/bifrost_provider.py,sha256=3OQoNPcv0VyFzJhgxxjW1RnTJ96d6PdK0NUmUEyK1PY,3808
19
19
  localmodels/bifrost_unit.py,sha256=4WZtEVdawlkOfJLNwXUd54YzyzxBBpjbfVoGxGsb_Lw,3983
20
- localmodels/budget.py,sha256=TGk1Q17TiRC0GsTKiOaPd_RUjbZSblyJH46XjXOCb-A,23179
20
+ localmodels/budget.py,sha256=cOLf9iExpFd-phiW9FjYn_YCVVCUghvxNR9-rQEiHQo,29880
21
21
  localmodels/catalog.json,sha256=UI3rTJOeBD_6t9ndWuFPAZ5YfPulZhwrn71cSO4gdVA,313553
22
- localmodels/catalog.py,sha256=Hj83gX23dnBOkldsjAS7wb1HuLxNMuhgnHKstLzYL1g,22193
22
+ localmodels/catalog.py,sha256=AvYmBMnFl5o0jPl8-1vyaSTqdcIoLretjrAoOPQY2Vo,22419
23
23
  localmodels/catalog_add.py,sha256=lpAG8vV8jV9FTYTm2VidklIZ2pL3Vpat08vQSXyehyY,11815
24
24
  localmodels/catalog_license.py,sha256=7vDNHcjfi5YGtDRYXKJtAnpNUpJ8AF2NgizNCNm8lAY,1471
25
25
  localmodels/catalog_recipes.py,sha256=ZVwOUOu7tLY4ZvMQssj88Z-NiDI6-N2SFROcOYVfA64,15131
@@ -72,7 +72,7 @@ localmodels/gateway_server.py,sha256=kCXJFrowBwbQh65uZLxHj90DDMPCgyQZ22CQDyTwVDo
72
72
  localmodels/gateway_speed.py,sha256=o4NpjHDjXaQaFGKrh9BFiuv6TuMQcUAhmR8oIo1YUwQ,7288
73
73
  localmodels/gateway_switch.py,sha256=DIgOYrowC7lwuKyHv1IH7OK92ZjsobP3F5Zk6vVGBEo,2419
74
74
  localmodels/gguf.py,sha256=_Yp9eQDzLmQkzTM759yVHwUJYvIwilhcDhxOgmIP7J4,19641
75
- localmodels/gpu_specs.py,sha256=3wP-cH6aystaJKH9PpN69Ao7xSauufhbdEwMGMwUTcQ,4080
75
+ localmodels/gpu_specs.py,sha256=wgz80ZWZ9lVOThVexXPgJjE1ShbzJ77ls2m4MCLKaiY,5311
76
76
  localmodels/guard-requirements.lock,sha256=FSq2HUFXrnmDLjGE2nRNHPMfFUsBJz_UclKIrRKHS3k,20513
77
77
  localmodels/guard.py,sha256=hjoCr_qj3FZU4IKTY2x7Go6hBAmA2OFGn0HSFGE7TNw,20959
78
78
  localmodels/guard_runtime.py,sha256=zWqtgEJyvZWCtrBVeA-eSU28vB1_zV8pttCqY0Uqhy8,8445
@@ -85,28 +85,29 @@ localmodels/hosts.py,sha256=ME4sLRQROFW9SxJ7a9OOGQZqpPgopBhAhjlgRXofu44,21602
85
85
  localmodels/http_local.py,sha256=wH2sPnwG3-ZVVdyxcuORgUATGVxsgY80KciFsuyFHXg,2032
86
86
  localmodels/install.py,sha256=osNuVWd4nXSY5RPdvDOwhmwEE01TvhFVcSwZZUvhrtU,5893
87
87
  localmodels/kokoro-tts-0.6.1.txt,sha256=7FYUqMFvE4ZtJe2QdkcpbIGinSDKfrdJM86AK8S2w7Y,23662
88
- localmodels/library_cli.py,sha256=Y50eMdCWA8vWTJB0j5gbGFR2YR3CZuV0OI-qyeT3i54,7398
88
+ localmodels/library_cli.py,sha256=wufc9DguFmUuOvWmy81EhJM7PKmwYSM57VEbhQ5UR2c,7686
89
89
  localmodels/library_convert.py,sha256=OPoWSRjzvF7R8MfdkPoq0Ie-5E15qhoZZt5Bc4o68Rc,21463
90
+ localmodels/library_elastic.py,sha256=oPDqZLOVysH8vu0NwSkIksIko1iFHHueHSNWWXCM8Ck,24634
90
91
  localmodels/library_floor.py,sha256=vBfEs7a5WBmI1DoWY5ZlDMEjStcUxr_vyWFtSoDL8PE,3544
91
92
  localmodels/library_gateway.py,sha256=Zy14sHeQQ6EGf038CFSe2fS9M9kiGf7RwQo5MZVjNkk,27121
92
93
  localmodels/library_jobs.py,sha256=8Fx9cXkbC7p8oX_6jEiy9HNg2HTCdSfyLQKEcI-TwNY,24285
93
94
  localmodels/library_kept.py,sha256=qTCzTFBBBeUZpdQLwVIhg4XnU2I9QxctkhNOKSTKH10,4375
94
- localmodels/library_model.py,sha256=wQEQaQxyYbDSGxsWFP80sDWa2VsVD4npivon9YdoQLU,9670
95
+ localmodels/library_model.py,sha256=Z-Q24Y-c0HcdHHiKluQRs47r8oX1aVsgIwj-6-O3PRY,12847
95
96
  localmodels/library_order.py,sha256=v28q_IxRshm-ONoKrNc3OEGksQ1ym4O4iEJZLpxs7Ww,8391
96
97
  localmodels/library_poly.py,sha256=2Frlhyk2wmSbH1R1zXQ96ybbcWWG-ANwGDyMm4KRlw0,13777
97
- localmodels/library_pricing.py,sha256=xlFgnnpSkMNRiJEMjCOI2rRMfSGIUE7uBq55uWgbiFU,28304
98
- localmodels/library_serve.py,sha256=ylit6mo8gWVN_FSj_0ZNuHclqmwVSG4tWRPrChXKqwI,19155
99
- localmodels/library_state.py,sha256=L2AvVBEO79ZI0p_iRHknvRaTyn6yEEsk0y_Jwob7QVM,15424
100
- localmodels/library_status.py,sha256=ETzO8T8pCn4hw1xmrHuWszlru3lOnCrI0ZrJkimZ3nc,22362
98
+ localmodels/library_pricing.py,sha256=w3ZrQ-uIpzDVQrBo4H5vHYINddwI3gJPsGs3RPjZ0q8,27990
99
+ localmodels/library_serve.py,sha256=0CeuEAbEzcYLKSXpxebftJ14DCjOT-I4jp0a6Z7libQ,25270
100
+ localmodels/library_state.py,sha256=Yp_lzF3bXxNneryAdbaKiXzBdUPnLUeGWCuvU7XTjTE,16133
101
+ localmodels/library_status.py,sha256=aF7swoV1aG77Ye6szYHVi5SeaeQUrKI4ueiPRkGyU_M,26128
101
102
  localmodels/library_vram.py,sha256=PBUpWun2hhOM-SzXFcmo7u_8wwSZSN47dMYinyOzE1U,4617
102
- localmodels/llm_rank.py,sha256=Q60iPr2RUci1cYkacZTqZqkN6xeJA7a-Or2SKq3HX98,17332
103
+ localmodels/llm_rank.py,sha256=V3TrEwWFLbZLxEMLsvwoU1Zs-J-I0Gd3qZXwWIE40WM,17801
103
104
  localmodels/magpie_setup.py,sha256=AoZmTf_RnyHHMrxKn1q7XH17t0zm3hiv-q0LIgLE5cQ,29772
104
105
  localmodels/magpie_windows.py,sha256=DMuKR1Cq8UPvjcdlLXF4azfqrZlHoQg50xMzYsPOBSs,11265
105
106
  localmodels/memcalc.py,sha256=lTmzoHjPYz5-56gzh4VQElT1iR6u67B28sdVrr5dr_w,20458
106
107
  localmodels/memcalc_cli.py,sha256=yDG4cNirtjZTwbloY8Sb0IGy1_dpUI92Z4qMng4_Wwc,7739
107
108
  localmodels/memcalc_load.py,sha256=kNudHxnFlIsOtbZIbckJx3ucTE23PeRDElhXWUegwVA,7832
108
- localmodels/metal.py,sha256=dtZ3IeDRPqvq57STsO03YPCm99H90csmhijED0rP5EQ,16675
109
- localmodels/metal_probe.py,sha256=aht-bY2bfHpfZkEaSjWnWbH1ACHSTEIE-K0zXJAuC_M,6356
109
+ localmodels/metal.py,sha256=doA9-Vn-8VmPvYO9rZXsHC7EhZkVvUOVbsCAORe35CQ,22791
110
+ localmodels/metal_probe.py,sha256=3rM2Rn4l_KfWEz5lbW3ewbKc7-VerAnd3Q4afxNo7YQ,12310
110
111
  localmodels/mirrors.py,sha256=9jLgSFtbO24_hVwnYCZJHumtOlzSw7e55IDr_IEc-dc,15924
111
112
  localmodels/mlx-lm-0.32.2-requirements.txt,sha256=sFSEnHM-H5rKZKKJCl3gCAEw4aqlGBM21oN9mlZ4SxE,57369
112
113
  localmodels/mlx_server.py,sha256=ayvcfxHvc55dJ8nyrGXfcmIfAFGlKw0Peyagu_AGsJs,3979
@@ -117,14 +118,14 @@ localmodels/plan_envelope.py,sha256=tHNzie-E2pvvN3PQSgsGoK7q247--oPmM_0katUUBEw,
117
118
  localmodels/preparation.py,sha256=ozCL10fNYcxY5S87rDqV96e8tdyk3ZVMUFQUjla9jTg,1751
118
119
  localmodels/privacy.py,sha256=SxBYPEWn4IguoeNtzV6GU2r9_PxEyiKzVbOl90VoBHI,12229
119
120
  localmodels/privacy_acceptance.py,sha256=Cu5SxBXi5_0kbYrpS7SxAS_ypx6_F-M_L1PgjiUm45Y,4534
120
- localmodels/probe.py,sha256=UHpsvCusQZpBTiB-YRx0bx0B42V1emWfERH2hDsK3Y4,27437
121
+ localmodels/probe.py,sha256=wZoV-GeO0YChFFSCYBfMrIY2oSVxvSRZpnJLEkeaisQ,27449
121
122
  localmodels/process_identity.py,sha256=f3D1hX9klnIJo78IBliVNiS9GiCJCxRPvG0um9kjT28,29482
122
123
  localmodels/process_identity_darwin.py,sha256=JstncE6-Iu7pPkHAJbGi9wImyicdy42Uay-mq37-XTE,12304
123
124
  localmodels/process_identity_linux.py,sha256=NG9xwzC0S48oexvxgbzrFhD4X3iQnoiEQEpsQGmTkt4,6473
124
125
  localmodels/process_windows.py,sha256=P9RnyX1kSyT3xgqTNB3PMk_mDW8RIJvIIZ75UVfOf-A,9100
125
126
  localmodels/python-bootstrap-lock.json,sha256=cCSWKas2LT88hS9XbmZAsQkb9eInvaNUpWT6NhrQD3g,1850
126
127
  localmodels/quant_formats.py,sha256=qbrYVLZ5fcfpHOh-ADv4wKIunxppmkKBvJp8bXVMPLE,5216
127
- localmodels/recommend.py,sha256=grl06mDxSG1rSzN1Ak4GAe2Q2z3PBJ5fdfi7aGSzjwc,13413
128
+ localmodels/recommend.py,sha256=ixVB8LKg4uiUXXqr7Al_l8QSoD9zK9m2mx1lwk5m6cI,13579
128
129
  localmodels/recommend_cli.py,sha256=eDdXevzDGp4XKXsjxqgZ-z1014r1Wn7EniPLVm6YGTU,12129
129
130
  localmodels/records.py,sha256=KW_DmBuRABPFLKRMSAyRVi_Ny5qnDvRFaY6QiFLciwM,6350
130
131
  localmodels/region.py,sha256=guF2t0g_H8d0rBsRQIPqnakryGHv0fGarlp3VAHse9g,25216
@@ -184,7 +185,7 @@ localmodels/stack_cleanup.py,sha256=5jZLT6RcXyI0uSE3NnEaTjA_RVREdiuRbXW4NTuARmY,
184
185
  localmodels/stack_cli.py,sha256=zx6I6nedpkTiYfWbYTgs7KAOKXBBSOtN3v79Gwzvv78,11019
185
186
  localmodels/stack_client_settings.py,sha256=BmsFwx17a6IEShyvksDWPbvAyndezLOvggL0mDCSJO4,4214
186
187
  localmodels/stack_clients.py,sha256=1Y2zx0FBbj7dRZdcmlw4WacYla_UnMMbbMSpA6nAdHc,7285
187
- localmodels/stack_compose.py,sha256=rwd3XB2y1z_yf81bMi_9ydUCUGQE8VX-7f9gY4z_76c,30118
188
+ localmodels/stack_compose.py,sha256=Y33bUx5Exp4I1SB1q0NXbRxLA5LLOaJUI1u2PtSxd2I,30284
188
189
  localmodels/stack_console.py,sha256=SmPGMJ56MfiQqJNgrIQu3wn2TK4aZoYEqq5e83gyPIQ,14044
189
190
  localmodels/stack_debug.py,sha256=KCZfw4n0Djr6iYxEKCY_LrKKNOH6ODXwGKN4BkDvzMg,6137
190
191
  localmodels/stack_decision.py,sha256=cxBlaricBKSxcTodr7QVnum44jqQHLDqjYSuzlst4vk,30632
@@ -192,7 +193,7 @@ localmodels/stack_doctor.py,sha256=ZxwCLRfcPiIcYtZ200AmDmBVDx7OXTfzL5cCSPlZ84I,2
192
193
  localmodels/stack_down.py,sha256=f9XYTTm1bFNaB0JyAaFDhk5kQ-2VXRGwnAhYE0fW8Ak,8547
193
194
  localmodels/stack_events.py,sha256=e2pQrMhFz3UJQ7_xnbtO60FRjRhZ9CcgnYP3kpRUVRk,12023
194
195
  localmodels/stack_gpu_memory.py,sha256=N5n25NlXvHWV6nHSpF0W9uathcwP-6RsUpiJ5WuNGzw,2776
195
- localmodels/stack_hardware.py,sha256=ppDD1oqmCmy80yArlhh9LLN7O4aXQIcNzlF5AEAEkGg,25264
196
+ localmodels/stack_hardware.py,sha256=argUH9VkZCaQtm4j0iiTVGGA6nzeN5378SxJkRtmNBc,25327
196
197
  localmodels/stack_hardware_text.py,sha256=eg9GnmyQIN9yFdjMMJ6Q5NhVQhcvu11Qz4Y-XCDilf4,11739
197
198
  localmodels/stack_journal.py,sha256=jhxRyjU_RUTqUrdxkpCzUz03Iwjtt0rf26lWtcTidV0,7481
198
199
  localmodels/stack_ledger.py,sha256=kq13FmUCvPC-x7daQUxCwDCTaKhwhokRSZmoB4JwANE,17315
@@ -201,7 +202,7 @@ localmodels/stack_llm_ram.py,sha256=gEZkagp4nI5KdexoV25p_a--QzztCvSD5oXy5XnHcNk,
201
202
  localmodels/stack_mcp.py,sha256=JJnagmKXaY5Jb0106BbtJI7ZXQiCnRPHrJIwmAuZzaE,28583
202
203
  localmodels/stack_memory.py,sha256=pOTGT-x43UY-q2n7kOPOU0xvPCq-l_uOpcoYdiCtiF4,30784
203
204
  localmodels/stack_mlx.py,sha256=c8hdm0jhSHEQZ3W0GsTdsBhCh5EIZ17thxJSntie264,10088
204
- localmodels/stack_picks.py,sha256=DwDGHKUtLGiM7RIg9W7oJOy035nE8gT4FEEgoeNTVCU,8889
205
+ localmodels/stack_picks.py,sha256=D-CKl0ifL0gq_X1DO8tWm8fAO4wuwiiiuR9EeFaVeKA,9248
205
206
  localmodels/stack_plan.py,sha256=90lTTYGWq_xZM735K2pxRJW6yDPDQs2ZdoRcur0-azA,28461
206
207
  localmodels/stack_ports.py,sha256=szQTlUuf_vYpv597r8WdV2Glj0WyjGzgzWOBA-XP-8Q,7447
207
208
  localmodels/stack_preflight.py,sha256=hO7PKf7FM-oW80R9uQmaqigdiIwcSxhvqEwl12xQgWg,26586
@@ -278,9 +279,9 @@ localmodels/web/view/view.css,sha256=95yGHfCxbIzQWHLYjx_CkQAjM2UZExZxoM1ky0kK8X4
278
279
  localmodels/web/view/view.js,sha256=HyTxW6DIcXhxbRVSSEvlWmp3UjH0Ro_JXEF39t_70IE,114938
279
280
  localmodels/win_probe.py,sha256=hFNeocVK62i_v741e38Z56LWm5zp_y9PfotqZo926z8,7151
280
281
  localmodels/windows_job.py,sha256=075FQtmz8yphvGXMQmSnQwGw6rbzAqMPQ-h46emyKNY,3058
281
- simplex_localmodels-0.1.0.dev57.dist-info/licenses/NOTICE,sha256=tXcQr_xMoRwTBXz3P_ZhvNUPugRV0uvg4jtAyxHFpus,2712
282
- simplex_localmodels-0.1.0.dev57.dist-info/licenses/localmodels/HERMES-LICENSE,sha256=ghVW5jNnlkUKuFLTdRF7SKSIfnHSVXlP1jGNmZgqWrY,1070
283
- simplex_localmodels-0.1.0.dev57.dist-info/WHEEL,sha256=1dD_GoEqEIxQ7VnrUExgdj_eExY4b4UgfR0iBlGKVac,80
284
- simplex_localmodels-0.1.0.dev57.dist-info/entry_points.txt,sha256=OjBZISrGAXgRMRDqrq-m26_nLFmNZNNhbLtJiunIgfc,59
285
- simplex_localmodels-0.1.0.dev57.dist-info/METADATA,sha256=rpnw4TQr6OrWMbnOYO5lFAOUWJWqIKqVJZr7ZW6DtW8,312
286
- simplex_localmodels-0.1.0.dev57.dist-info/RECORD,,
282
+ simplex_localmodels-0.1.0.dev58.dist-info/licenses/NOTICE,sha256=tXcQr_xMoRwTBXz3P_ZhvNUPugRV0uvg4jtAyxHFpus,2712
283
+ simplex_localmodels-0.1.0.dev58.dist-info/licenses/localmodels/HERMES-LICENSE,sha256=ghVW5jNnlkUKuFLTdRF7SKSIfnHSVXlP1jGNmZgqWrY,1070
284
+ simplex_localmodels-0.1.0.dev58.dist-info/WHEEL,sha256=1dD_GoEqEIxQ7VnrUExgdj_eExY4b4UgfR0iBlGKVac,80
285
+ simplex_localmodels-0.1.0.dev58.dist-info/entry_points.txt,sha256=OjBZISrGAXgRMRDqrq-m26_nLFmNZNNhbLtJiunIgfc,59
286
+ simplex_localmodels-0.1.0.dev58.dist-info/METADATA,sha256=zFnec-eSHJ4NwTVPFMNd3sxrLsJe0YD2cN9YhobKzuM,312
287
+ simplex_localmodels-0.1.0.dev58.dist-info/RECORD,,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplexai/localmodels-linux-arm64",
3
- "version": "0.1.0-dev.57",
3
+ "version": "0.1.0-dev.58",
4
4
  "license": "UNLICENSED",
5
5
  "files": [
6
6
  "**/*"