@simplexai/localmodels-win32-x64 0.1.0-dev.104 → 0.1.0-dev.105
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.
- package/README.md +1 -1
- package/bootstrap.identity +1 -1
- package/bootstrap.sha256 +80 -78
- package/modules/localmodels/__init__.py +1 -1
- package/modules/localmodels/__main__.py +204 -86
- package/modules/localmodels/apple_sensors.py +23 -0
- package/modules/localmodels/approval.py +25 -2
- package/modules/localmodels/catalog.json +454 -31
- package/modules/localmodels/catalog.py +11 -0
- package/modules/localmodels/catalog_recipes.py +61 -3
- package/modules/localmodels/cli_help.py +10 -0
- package/modules/localmodels/cli_parser.py +313 -230
- package/modules/localmodels/component.py +20 -2
- package/modules/localmodels/custom_probe.py +4 -2
- package/modules/localmodels/deploy.py +11 -1
- package/modules/localmodels/engine_adapters/suite_plan.py +21 -21
- package/modules/localmodels/host_sensors.py +25 -2
- package/modules/localmodels/hosts.py +26 -5
- package/modules/localmodels/library_cli.py +34 -16
- package/modules/localmodels/library_custom.py +9 -1
- package/modules/localmodels/library_direct.py +41 -1
- package/modules/localmodels/library_jobs.py +23 -4
- package/modules/localmodels/library_model.py +146 -1
- package/modules/localmodels/library_order.py +175 -69
- package/modules/localmodels/library_poly.py +42 -11
- package/modules/localmodels/library_presentation.py +485 -0
- package/modules/localmodels/library_pricing.py +3 -1
- package/modules/localmodels/library_serve.py +208 -3
- package/modules/localmodels/library_state.py +47 -10
- package/modules/localmodels/library_status.py +29 -16
- package/modules/localmodels/llm_rank.py +9 -3
- package/modules/localmodels/plan_envelope.py +11 -2
- package/modules/localmodels/probe.py +34 -7
- package/modules/localmodels/quant_formats.py +9 -2
- package/modules/localmodels/records.py +19 -2
- package/modules/localmodels/remote_ops_verify.py +91 -24
- package/modules/localmodels/runtime_index.py +303 -0
- package/modules/localmodels/setup_inspection.py +22 -3
- package/modules/localmodels/speech_cli.py +20 -14
- package/modules/localmodels/speech_serve.py +9 -2
- package/modules/localmodels/speech_server.py +3 -0
- package/modules/localmodels/stack_args.py +270 -139
- package/modules/localmodels/stack_auto.py +90 -5
- package/modules/localmodels/stack_cli.py +117 -116
- package/modules/localmodels/stack_compose.py +5 -1
- package/modules/localmodels/stack_debug.py +14 -4
- package/modules/localmodels/stack_down.py +2 -0
- package/modules/localmodels/stack_hardware.py +14 -12
- package/modules/localmodels/stack_mlx.py +8 -1
- package/modules/localmodels/stack_picks.py +19 -20
- package/modules/localmodels/stack_plan.py +3 -2
- package/modules/localmodels/stack_review.py +28 -7
- package/modules/localmodels/stack_suite.py +11 -9
- package/modules/localmodels/stack_up.py +2 -0
- package/modules/localmodels/stack_view.py +180 -35
- package/modules/localmodels/stack_view_demo.py +2 -0
- package/modules/localmodels/stack_view_gpu.py +36 -2
- package/modules/localmodels/stack_view_schema.py +26 -3
- package/modules/localmodels/stack_view_slots.py +3 -1
- package/modules/localmodels/stack_view_telemetry.py +90 -4
- package/modules/localmodels/stack_view_tick.py +246 -40
- package/modules/localmodels/stack_view_words.py +7 -0
- package/modules/localmodels/stack_whatif_html.py +9 -12
- package/modules/localmodels/suite.py +129 -2
- package/modules/localmodels/telemetry_math.py +458 -18
- package/modules/localmodels/transport.py +8 -1
- package/modules/localmodels/tts_cli.py +24 -20
- package/modules/localmodels/tts_serve.py +9 -2
- package/modules/localmodels/tts_sidecar.py +3 -0
- package/modules/localmodels/web/whatif/app.js +1 -1
- package/modules/localmodels/web/whatif/sim.js +8 -14
- package/modules/localmodels/win_probe.py +89 -16
- package/modules/{simplex_localmodels-0.1.0.dev104.dist-info → simplex_localmodels-0.1.0.dev105.dist-info}/METADATA +1 -1
- package/modules/{simplex_localmodels-0.1.0.dev104.dist-info → simplex_localmodels-0.1.0.dev105.dist-info}/RECORD +76 -74
- package/package.json +1 -1
- package/tool.json +1 -1
- /package/modules/{simplex_localmodels-0.1.0.dev104.dist-info → simplex_localmodels-0.1.0.dev105.dist-info}/WHEEL +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev104.dist-info → simplex_localmodels-0.1.0.dev105.dist-info}/entry_points.txt +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev104.dist-info → simplex_localmodels-0.1.0.dev105.dist-info}/licenses/LICENSE +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev104.dist-info → simplex_localmodels-0.1.0.dev105.dist-info}/licenses/NOTICE +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev104.dist-info → simplex_localmodels-0.1.0.dev105.dist-info}/licenses/localmodels/HERMES-LICENSE +0 -0
|
@@ -181,6 +181,11 @@ class CatalogEntry:
|
|
|
181
181
|
publisher: str = ""
|
|
182
182
|
parameters: str = ""
|
|
183
183
|
active_parameters: str = ""
|
|
184
|
+
base_model: str = ""
|
|
185
|
+
capabilities: tuple[str, ...] = ()
|
|
186
|
+
quant_fidelity: str = ""
|
|
187
|
+
bits_per_weight: float | None = None
|
|
188
|
+
prefer_over_llama: bool = False
|
|
184
189
|
|
|
185
190
|
@property
|
|
186
191
|
def mtp_capable(self) -> bool:
|
|
@@ -516,6 +521,12 @@ def load_catalog(value: object) -> tuple[CatalogEntry, ...]:
|
|
|
516
521
|
publisher=m.get("publisher", ""),
|
|
517
522
|
parameters=m.get("parameters", ""),
|
|
518
523
|
active_parameters=m.get("active_parameters", ""),
|
|
524
|
+
base_model=m.get("base_model", ""),
|
|
525
|
+
capabilities=tuple(m.get("capabilities", [])),
|
|
526
|
+
quant_fidelity=m.get("quant_fidelity", ""),
|
|
527
|
+
bits_per_weight=(
|
|
528
|
+
float(m["bits_per_weight"]) if m.get("bits_per_weight") is not None else None
|
|
529
|
+
),
|
|
519
530
|
)
|
|
520
531
|
)
|
|
521
532
|
return tuple(entries)
|
|
@@ -6,6 +6,7 @@ import base64
|
|
|
6
6
|
import copy
|
|
7
7
|
import json
|
|
8
8
|
import re
|
|
9
|
+
from collections.abc import Mapping
|
|
9
10
|
from pathlib import Path
|
|
10
11
|
from typing import TypedDict, cast
|
|
11
12
|
|
|
@@ -21,6 +22,42 @@ EFFORT_LEVELS = ("low", "medium", "high") # reasoning_effort values a gateway m
|
|
|
21
22
|
TASKS = tuple("llm vision decision embedding reranker stt tts privacy-span".split())
|
|
22
23
|
# Model-card families Linger's LocalModelFamily knows (its contract); "other" for the rest.
|
|
23
24
|
FAMILIES = tuple("qwen gemma llama openai deepseek mistral phi glm kimi claude grok other".split())
|
|
25
|
+
CAPABILITIES = ("vision", "tool_use", "reasoning", "coding", "multilingual")
|
|
26
|
+
QUANT_FIDELITIES = (
|
|
27
|
+
"near_lossless",
|
|
28
|
+
"high_fidelity_compact",
|
|
29
|
+
"balanced",
|
|
30
|
+
"compact",
|
|
31
|
+
"ultra_compact",
|
|
32
|
+
)
|
|
33
|
+
FIDELITY_RANK: dict[str, int] = {name: idx for idx, name in enumerate(QUANT_FIDELITIES)}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def infer_quant_fidelity(explicit: str, quant: str) -> str:
|
|
37
|
+
"""Resolve the presentation/ranking fidelity tier for a model variant."""
|
|
38
|
+
if explicit in FIDELITY_RANK:
|
|
39
|
+
return explicit
|
|
40
|
+
upper = quant.strip().upper()
|
|
41
|
+
if any(tok in upper for tok in ("F32", "BF16", "F16", "FP8", "Q8", "Q6", "Q5", "Q4_K_XL")):
|
|
42
|
+
return "near_lossless"
|
|
43
|
+
if upper in ("UD-Q4_K_M",):
|
|
44
|
+
return "near_lossless"
|
|
45
|
+
if upper.startswith("GSQ-RCO-IQ3_S") or upper in ("UD-Q3_K_XL",):
|
|
46
|
+
return "high_fidelity_compact"
|
|
47
|
+
if any(tok in upper for tok in ("Q4", "IQ4", "NVFP4", "MXFP4", "MLX-4BIT")):
|
|
48
|
+
return "balanced"
|
|
49
|
+
if any(tok in upper for tok in ("Q3", "IQ3", "MLX-3BIT")):
|
|
50
|
+
return "compact"
|
|
51
|
+
if any(tok in upper for tok in ("Q2", "IQ2", "IQ1", "PTQ1")):
|
|
52
|
+
return "ultra_compact"
|
|
53
|
+
return "balanced"
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def fidelity_rank(explicit: str, quant: str) -> int:
|
|
57
|
+
"""Lower rank means higher fidelity (0 = near_lossless .. 4 = ultra_compact)."""
|
|
58
|
+
return FIDELITY_RANK[infer_quant_fidelity(explicit, quant)]
|
|
59
|
+
|
|
60
|
+
|
|
24
61
|
SCALE = r"[1-9][0-9]*(\.[0-9]+)?[BM]" # a parameter scale as a model's name states it: 27B, 1.7B
|
|
25
62
|
# intelligence_score: the installed SimplexAI score (decisions 26, 33); make check keeps it equal
|
|
26
63
|
QUALITY_SOURCE_TYPES = ("editorial", "own_eval", "external_index", "kld", "intelligence_score")
|
|
@@ -103,6 +140,9 @@ class CardData(TypedDict, total=False):
|
|
|
103
140
|
publisher: str
|
|
104
141
|
parameters: str
|
|
105
142
|
active_parameters: str
|
|
143
|
+
capabilities: list[str]
|
|
144
|
+
quant_fidelity: str
|
|
145
|
+
bits_per_weight: float
|
|
106
146
|
|
|
107
147
|
|
|
108
148
|
class DraftSpecData(TypedDict, total=False):
|
|
@@ -340,19 +380,35 @@ def _entry_problems(
|
|
|
340
380
|
return found
|
|
341
381
|
|
|
342
382
|
|
|
343
|
-
def _card_problems(model:
|
|
383
|
+
def _card_problems(model: Mapping[str, object]) -> list[str]:
|
|
344
384
|
found = []
|
|
345
385
|
if model.get("family") is not None and model.get("family") not in FAMILIES:
|
|
346
386
|
found.append(f"family is not one of {', '.join(FAMILIES)}")
|
|
347
387
|
publisher = model.get("publisher")
|
|
348
|
-
if publisher
|
|
388
|
+
if isinstance(publisher, str) and not (0 < len(publisher.strip()) <= 120):
|
|
349
389
|
found.append("publisher must be 1 to 120 characters")
|
|
350
390
|
for key in ("parameters", "active_parameters"):
|
|
351
|
-
value =
|
|
391
|
+
value = model.get(key)
|
|
352
392
|
if value is not None and not re.fullmatch(SCALE, str(value)):
|
|
353
393
|
found.append(f"{key} is not a scale such as 27B or 1.7B")
|
|
354
394
|
if model.get("active_parameters") and not model.get("parameters"):
|
|
355
395
|
found.append("active_parameters needs parameters")
|
|
396
|
+
caps = model.get("capabilities")
|
|
397
|
+
if caps is not None:
|
|
398
|
+
if (
|
|
399
|
+
not isinstance(caps, list)
|
|
400
|
+
or len(caps) != len(set(caps))
|
|
401
|
+
or any(c not in CAPABILITIES for c in caps)
|
|
402
|
+
):
|
|
403
|
+
found.append(f"capabilities must be unique items from {', '.join(CAPABILITIES)}")
|
|
404
|
+
fidelity = model.get("quant_fidelity")
|
|
405
|
+
if fidelity is not None and fidelity not in QUANT_FIDELITIES:
|
|
406
|
+
found.append(f"quant_fidelity is not one of {', '.join(QUANT_FIDELITIES)}")
|
|
407
|
+
bpw = model.get("bits_per_weight")
|
|
408
|
+
if bpw is not None and (
|
|
409
|
+
isinstance(bpw, bool) or not isinstance(bpw, int | float) or not (0 < float(bpw) <= 32.0)
|
|
410
|
+
):
|
|
411
|
+
found.append("bits_per_weight must be a number in (0, 32]")
|
|
356
412
|
return found
|
|
357
413
|
|
|
358
414
|
|
|
@@ -426,6 +482,8 @@ def problems(value: object) -> list[str]:
|
|
|
426
482
|
found += [f"models.{m['id']}: {issue}" for issue in issues]
|
|
427
483
|
for c in doc.get("components", []):
|
|
428
484
|
issues = _entry_problems(c, c["task"], c["runtime"])
|
|
485
|
+
if c["task"] == "llm":
|
|
486
|
+
issues += _card_problems(cast(dict[str, object], c))
|
|
429
487
|
found += [f"components.{c['id']}: {issue}" for issue in issues]
|
|
430
488
|
return found
|
|
431
489
|
|
|
@@ -16,6 +16,7 @@ import sys
|
|
|
16
16
|
import textwrap
|
|
17
17
|
import weakref
|
|
18
18
|
from collections.abc import Iterator, Sequence
|
|
19
|
+
from pathlib import Path
|
|
19
20
|
from typing import Any, NoReturn, TypedDict
|
|
20
21
|
|
|
21
22
|
from localmodels import console
|
|
@@ -23,6 +24,15 @@ from localmodels import console
|
|
|
23
24
|
Groups = Sequence[tuple[str, Sequence[str]]]
|
|
24
25
|
Example = tuple[str, str]
|
|
25
26
|
SCHEMA = "localmodels.cli-commands/v1"
|
|
27
|
+
DEFAULT_BASE_DIR = "~/.local/share/localmodels"
|
|
28
|
+
LOCAL_ID = "local"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def command() -> str:
|
|
32
|
+
"""How the operator ran this tool, for commands it tells them to run next."""
|
|
33
|
+
return "localmodels" if Path(sys.argv[0]).name == "localmodels" else "python3 -m localmodels"
|
|
34
|
+
|
|
35
|
+
|
|
26
36
|
_CHOICE = re.compile(r"invalid choice: '([^']*)'")
|
|
27
37
|
_EXAMPLES: weakref.WeakKeyDictionary[argparse.ArgumentParser, list[Example]] = (
|
|
28
38
|
weakref.WeakKeyDictionary()
|