@simplexai/localmodels-win32-x64 0.1.0-dev.58 → 0.1.0-dev.60
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/bootstrap.identity +1 -1
- package/bootstrap.sha256 +105 -98
- package/modules/localmodels/__init__.py +1 -1
- package/modules/localmodels/__main__.py +104 -43
- package/modules/localmodels/app.py +1 -1
- package/modules/localmodels/apple_sensors.py +431 -0
- package/modules/localmodels/bifrost_admin.py +83 -8
- package/modules/localmodels/bifrost_checks.py +2 -2
- package/modules/localmodels/bifrost_config.py +235 -13
- package/modules/localmodels/bifrost_log.py +166 -0
- package/modules/localmodels/bifrost_models.py +1 -1
- package/modules/localmodels/budget.py +1 -1
- package/modules/localmodels/catalog.json +192 -77
- package/modules/localmodels/catalog.py +20 -3
- package/modules/localmodels/catalog_add.py +42 -11
- package/modules/localmodels/custom_hub.py +983 -0
- package/modules/localmodels/custom_hub_http.py +579 -0
- package/modules/localmodels/custom_probe.py +451 -0
- package/modules/localmodels/deploy.py +27 -5
- package/modules/localmodels/deploy_steps.py +5 -0
- package/modules/localmodels/download-mirrors.json +8 -0
- package/modules/localmodels/engines-prism-b12178-03ec600.json +131 -0
- package/modules/localmodels/engines-strata-poly-0.2.20-poly.6.json +94 -0
- package/modules/localmodels/engines.py +38 -8
- package/modules/localmodels/estimator.py +60 -7
- package/modules/localmodels/frontend.py +26 -21
- package/modules/localmodels/gateway.py +48 -3
- package/modules/localmodels/gateway_app_bifrost.py +4 -4
- package/modules/localmodels/gateway_bifrost.py +128 -21
- package/modules/localmodels/gguf.py +6 -0
- package/modules/localmodels/host_sensors.py +704 -0
- package/modules/localmodels/hosts.py +99 -12
- package/modules/localmodels/library_cli.py +181 -3
- package/modules/localmodels/library_convert.py +34 -0
- package/modules/localmodels/library_custom.py +831 -0
- package/modules/localmodels/library_elastic.py +182 -127
- package/modules/localmodels/library_gateway.py +193 -40
- package/modules/localmodels/library_jobs.py +92 -18
- package/modules/localmodels/library_kept.py +50 -6
- package/modules/localmodels/library_model.py +254 -2
- package/modules/localmodels/library_pricing.py +97 -8
- package/modules/localmodels/library_serve.py +196 -66
- package/modules/localmodels/library_smoke.py +315 -0
- package/modules/localmodels/library_state.py +81 -2
- package/modules/localmodels/library_status.py +144 -8
- package/modules/localmodels/metal.py +1 -1
- package/modules/localmodels/metal_probe.py +4 -4
- package/modules/localmodels/nvml_ctypes.py +431 -0
- package/modules/localmodels/plan_envelope.py +18 -7
- package/modules/localmodels/process_identity_linux.py +39 -0
- package/modules/localmodels/records.py +1 -0
- package/modules/localmodels/remote_ops.py +57 -8
- package/modules/localmodels/remote_ops_download.py +205 -53
- package/modules/localmodels/remote_ops_mirrors.py +43 -2
- package/modules/localmodels/remote_ops_ranges.py +2 -5
- package/modules/localmodels/remote_ops_service.py +95 -37
- package/modules/localmodels/remote_ops_verify.py +22 -5
- package/modules/localmodels/runtime-lock.json +19 -19
- package/modules/localmodels/runtime_auth.py +4 -1
- package/modules/localmodels/service_control.py +32 -1
- package/modules/localmodels/service_wiring.py +237 -12
- package/modules/localmodels/service_worker.py +6 -2
- package/modules/localmodels/services_cli.py +35 -27
- package/modules/localmodels/setup_inspection.py +47 -70
- package/modules/localmodels/setup_inspection_harness.py +159 -15
- package/modules/localmodels/setup_text.py +14 -0
- package/modules/localmodels/setup_upgrade.py +1 -1
- package/modules/localmodels/source_byok.py +9 -7
- package/modules/localmodels/source_byok_probe.py +6 -1
- package/modules/localmodels/stack.py +9 -1
- package/modules/localmodels/stack_binding.py +3 -35
- package/modules/localmodels/stack_cleanup.py +4 -0
- package/modules/localmodels/stack_compose.py +18 -2
- package/modules/localmodels/stack_lifecycle.py +26 -3
- package/modules/localmodels/stack_memory.py +1 -0
- package/modules/localmodels/stack_plan.py +6 -2
- package/modules/localmodels/stack_ports.py +2 -0
- package/modules/localmodels/stack_remove.py +10 -1
- package/modules/localmodels/stack_up.py +33 -7
- package/modules/localmodels/stack_update.py +3 -1
- package/modules/localmodels/stack_view.py +77 -53
- package/modules/localmodels/stack_view_demo.py +36 -5
- package/modules/localmodels/stack_view_events.py +147 -12
- package/modules/localmodels/stack_view_gpu.py +97 -17
- package/modules/localmodels/stack_view_llm.py +15 -0
- package/modules/localmodels/stack_view_measure.py +4 -1
- package/modules/localmodels/stack_view_schema.py +54 -8
- package/modules/localmodels/stack_view_serve.py +40 -3
- package/modules/localmodels/stack_view_slots.py +89 -10
- package/modules/localmodels/stack_view_telemetry.py +163 -0
- package/modules/localmodels/stack_view_text.py +5 -2
- package/modules/localmodels/stack_view_tick.py +658 -0
- package/modules/localmodels/stack_view_words.py +4 -0
- package/modules/localmodels/{strata-poly-serve-0.2.19-poly.1.txt → strata-poly-serve-0.2.20-poly.6.txt} +1 -1
- package/modules/localmodels/suite.py +45 -27
- package/modules/localmodels/telemetry_math.py +538 -0
- package/modules/localmodels/transport.py +13 -2
- package/modules/localmodels/web/view/view.js +1 -1
- package/modules/{simplex_localmodels-0.1.0.dev58.dist-info → simplex_localmodels-0.1.0.dev60.dist-info}/METADATA +1 -1
- package/modules/{simplex_localmodels-0.1.0.dev58.dist-info → simplex_localmodels-0.1.0.dev60.dist-info}/RECORD +102 -95
- package/package.json +1 -1
- package/tool.json +1 -1
- package/modules/localmodels/bifrost_datasheet.py +0 -53
- package/modules/localmodels/bifrost_provider.py +0 -88
- package/modules/localmodels/bifrost_unit.py +0 -99
- package/modules/localmodels/engines-strata-poly-0.2.19-poly.1.json +0 -79
- package/modules/localmodels/gateway_switch.py +0 -51
- package/modules/localmodels/library_floor.py +0 -78
- package/modules/localmodels/service_stop.py +0 -52
- /package/modules/{simplex_localmodels-0.1.0.dev58.dist-info → simplex_localmodels-0.1.0.dev60.dist-info}/WHEEL +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev58.dist-info → simplex_localmodels-0.1.0.dev60.dist-info}/entry_points.txt +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev58.dist-info → simplex_localmodels-0.1.0.dev60.dist-info}/licenses/NOTICE +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev58.dist-info → simplex_localmodels-0.1.0.dev60.dist-info}/licenses/localmodels/HERMES-LICENSE +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "localmodels.engine-lock/v1",
|
|
3
|
+
"tag": "prism-b12178-03ec600",
|
|
4
|
+
"commit": "03ec60072cdd32a03ae931969af62e57bfb0c8dc",
|
|
5
|
+
"source": "https://github.com/PrismML-Eng/llama.cpp/releases/tag/prism-b12178-03ec600",
|
|
6
|
+
"note": "Release asset digests from the GitHub release API (PrismML-Eng/llama.cpp prism-b12178-03ec600, commit 03ec60072cdd32a03ae931969af62e57bfb0c8dc, read 2026-11-26). Required for Ternary Bonsai 2.5 27B (PTQ1_0, PQ2_0, and PQ2_0M ggml tensor types 142/143/145, unsupported in upstream llama.cpp). Linux x64 CUDA 12.8 archive imports up to GLIBC_2.34 plus libgomp.so.1, libcudart.so.12, and libcublas.so.12 (verified via readelf -V -d) and pairs with the pinned CUDA 12.8 cudart companion archive from ggml-org/llama.cpp b11370. Linux and macOS tarballs unpack with a single top directory llama-prism-b12178-03ec600/ stripped by remote_ops.unpack; Windows CUDA 12.4, CUDA 13.3, and CPU zips unpack flat with llama-server.exe beside their DLLs and pair with PrismML's pinned cudart companion zips.",
|
|
7
|
+
"builds": [
|
|
8
|
+
{
|
|
9
|
+
"platform": "linux",
|
|
10
|
+
"arch": "x64",
|
|
11
|
+
"backend": "cuda",
|
|
12
|
+
"min_cuda": "12.8",
|
|
13
|
+
"min_glibc": "2.34",
|
|
14
|
+
"host_libraries": {
|
|
15
|
+
"libgomp.so.1": "libgomp1"
|
|
16
|
+
},
|
|
17
|
+
"assets": [
|
|
18
|
+
{
|
|
19
|
+
"name": "llama-prism-b12178-03ec600-bin-linux-cuda-12.8-x64.tar.gz",
|
|
20
|
+
"url": "https://github.com/PrismML-Eng/llama.cpp/releases/download/prism-b12178-03ec600/llama-prism-b12178-03ec600-bin-linux-cuda-12.8-x64.tar.gz",
|
|
21
|
+
"sha256": "a50997fb29bb0684c00cdf21bb1382923c6bc70085a74c9c3d913dcf76af1899",
|
|
22
|
+
"size_bytes": 225887048
|
|
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
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"platform": "linux",
|
|
34
|
+
"arch": "x64",
|
|
35
|
+
"backend": "cpu",
|
|
36
|
+
"min_glibc": "2.34",
|
|
37
|
+
"host_libraries": {
|
|
38
|
+
"libgomp.so.1": "libgomp1"
|
|
39
|
+
},
|
|
40
|
+
"assets": [
|
|
41
|
+
{
|
|
42
|
+
"name": "llama-prism-b12178-03ec600-bin-ubuntu-x64.tar.gz",
|
|
43
|
+
"url": "https://github.com/PrismML-Eng/llama.cpp/releases/download/prism-b12178-03ec600/llama-prism-b12178-03ec600-bin-ubuntu-x64.tar.gz",
|
|
44
|
+
"sha256": "78d3796781c8f6c350c2b102aec9811939d377b10c9301f3a28576f5ba633fb4",
|
|
45
|
+
"size_bytes": 19816260,
|
|
46
|
+
"npm_copy": {
|
|
47
|
+
"package": "@simplexai/engine-llama-prism-b12178-03ec600-bin-ubuntu-x64",
|
|
48
|
+
"version": "0.0.0-sha256-78d3796781c8f6c3"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"platform": "darwin",
|
|
55
|
+
"arch": "arm64",
|
|
56
|
+
"backend": "metal",
|
|
57
|
+
"assets": [
|
|
58
|
+
{
|
|
59
|
+
"name": "llama-prism-b12178-03ec600-bin-macos-arm64.tar.gz",
|
|
60
|
+
"url": "https://github.com/PrismML-Eng/llama.cpp/releases/download/prism-b12178-03ec600/llama-prism-b12178-03ec600-bin-macos-arm64.tar.gz",
|
|
61
|
+
"sha256": "94d791a4ad9d6ea0c9884929830352397af8274ca107afab497b1de0147bf99b",
|
|
62
|
+
"size_bytes": 13209869,
|
|
63
|
+
"npm_copy": {
|
|
64
|
+
"package": "@simplexai/engine-llama-prism-b12178-03ec600-bin-macos-arm64",
|
|
65
|
+
"version": "0.0.0-sha256-94d791a4ad9d6ea0"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"platform": "win32",
|
|
72
|
+
"arch": "x64",
|
|
73
|
+
"backend": "cuda",
|
|
74
|
+
"min_cuda": "12.4",
|
|
75
|
+
"binary": "llama-server.exe",
|
|
76
|
+
"assets": [
|
|
77
|
+
{
|
|
78
|
+
"name": "llama-prism-b12178-03ec600-bin-win-cuda-12.4-x64.zip",
|
|
79
|
+
"url": "https://github.com/PrismML-Eng/llama.cpp/releases/download/prism-b12178-03ec600/llama-prism-b12178-03ec600-bin-win-cuda-12.4-x64.zip",
|
|
80
|
+
"sha256": "f1bef85254012f0e6f25502ee86696c7de6ccc76a922f05c3f23ab2e5719c531",
|
|
81
|
+
"size_bytes": 341653677
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "cudart-llama-bin-win-cuda-12.4-x64.zip",
|
|
85
|
+
"url": "https://github.com/PrismML-Eng/llama.cpp/releases/download/prism-b12178-03ec600/cudart-llama-bin-win-cuda-12.4-x64.zip",
|
|
86
|
+
"sha256": "8c79a9b226de4b3cacfd1f83d24f962d0773be79f1e7b75c6af4ded7e32ae1d6",
|
|
87
|
+
"size_bytes": 391443627
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"platform": "win32",
|
|
93
|
+
"arch": "x64",
|
|
94
|
+
"backend": "cuda",
|
|
95
|
+
"min_cuda": "13.3",
|
|
96
|
+
"binary": "llama-server.exe",
|
|
97
|
+
"assets": [
|
|
98
|
+
{
|
|
99
|
+
"name": "llama-prism-b12178-03ec600-bin-win-cuda-13.3-x64.zip",
|
|
100
|
+
"url": "https://github.com/PrismML-Eng/llama.cpp/releases/download/prism-b12178-03ec600/llama-prism-b12178-03ec600-bin-win-cuda-13.3-x64.zip",
|
|
101
|
+
"sha256": "a34bdb817e797243f86c5e2dd1bdf118d17ea32b6eaa4e6f32c41533b13bc2d8",
|
|
102
|
+
"size_bytes": 216516289
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "cudart-llama-bin-win-cuda-13.3-x64.zip",
|
|
106
|
+
"url": "https://github.com/PrismML-Eng/llama.cpp/releases/download/prism-b12178-03ec600/cudart-llama-bin-win-cuda-13.3-x64.zip",
|
|
107
|
+
"sha256": "1462a050eb4c684921ba51dcc4cc488a036674c3e73e9945ee705b854808d03e",
|
|
108
|
+
"size_bytes": 390970417
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"platform": "win32",
|
|
114
|
+
"arch": "x64",
|
|
115
|
+
"backend": "cpu",
|
|
116
|
+
"binary": "llama-server.exe",
|
|
117
|
+
"assets": [
|
|
118
|
+
{
|
|
119
|
+
"name": "llama-prism-b12178-03ec600-bin-win-cpu-x64.zip",
|
|
120
|
+
"url": "https://github.com/PrismML-Eng/llama.cpp/releases/download/prism-b12178-03ec600/llama-prism-b12178-03ec600-bin-win-cpu-x64.zip",
|
|
121
|
+
"sha256": "f88c2dcf9557e47403f7e5f30ee18236ebe7ea7f6ee6f2d9daa35226b5bcf420",
|
|
122
|
+
"size_bytes": 21687453,
|
|
123
|
+
"npm_copy": {
|
|
124
|
+
"package": "@simplexai/engine-llama-prism-b12178-03ec600-bin-win-cpu-x64",
|
|
125
|
+
"version": "0.0.0-sha256-f88c2dcf9557e474"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "localmodels.engine-lock/v1",
|
|
3
|
+
"tag": "strata-poly-0.2.20-poly.6",
|
|
4
|
+
"commit": "v0.2.20-poly.6",
|
|
5
|
+
"source": "https://github.com/simplexai-labs/PolyStrata/releases/tag/v0.2.20-poly.6",
|
|
6
|
+
"note": "PolyStrata 0.2.20-poly.6 (MIT, commit ce7010d6cd, strata-poly engine 0.1.66) for CUDA 13 NVIDIA Linux and Windows recipes (Inkling 2 Mini). Adds optional LoopCD-Hidden extrapolation (--loopcd-hidden F), concise Inkling 2 reasoning_effort defaults (0.2 for Q2, 0.4 for Q3/Q4), header-time tool-call streaming (#313), faster post-prefill expert cache refill (#299), and Q8_0 / Q2_0 CUDA kernel fixes. Linux: strata-poly and strata-vision from the release archive with NVIDIA CUDA 13.0.3 runtime libraries (libcublas, libcublasLt, libcudart) reused from 0.1.45-poly.9 under NVIDIA's licence; needs NVIDIA driver for CUDA 13.0 (580 or newer), glibc 2.34, and libstdc++ 12. Windows: strata-poly.exe and strata-vision.exe (CUDA 13.0) paired with NVIDIA's cuBLAS 13.0.2.14 wheel (nvidia/cu13/bin/x86_64 on lib_dirs). On both platforms the tag archive supplies PolyStrata's Python server and tokenizer tools under terminal/ (terminal/serve/, terminal/tools/, terminal/strata_control/, terminal/strata_cli/, and LICENSE).",
|
|
7
|
+
"builds": [
|
|
8
|
+
{
|
|
9
|
+
"platform": "linux",
|
|
10
|
+
"arch": "x64",
|
|
11
|
+
"backend": "cuda",
|
|
12
|
+
"min_cuda": "13.0",
|
|
13
|
+
"min_glibc": "2.34",
|
|
14
|
+
"binary": "strata-poly",
|
|
15
|
+
"assets": [
|
|
16
|
+
{
|
|
17
|
+
"name": "strata-poly-linux-x64-cuda13-a5588664228fc21e.tar.gz",
|
|
18
|
+
"url": "https://github.com/simplexai-labs/PolyStrata/releases/download/v0.2.20-poly.6/strata-poly-linux-x64-cuda13-a5588664228fc21e.tar.gz",
|
|
19
|
+
"sha256": "bff503d7faf7b9fe4d0ddf03024813a2cc40a66f3b5dffa96ee11a02b1dd4fec",
|
|
20
|
+
"size_bytes": 81247593,
|
|
21
|
+
"npm_copy": {
|
|
22
|
+
"package": "@simplexai/engine-strata-poly-linux-x64-cuda13-a5588664228fc21e",
|
|
23
|
+
"version": "0.0.0-sha256-bff503d7faf7b9fe"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "polystrata-0.2.20-poly.6-source.tar.gz",
|
|
28
|
+
"url": "https://github.com/simplexai-labs/PolyStrata/archive/refs/tags/v0.2.20-poly.6.tar.gz",
|
|
29
|
+
"sha256": "9fd665c72c5be294b71fbddd80c039cda65df74df1665021febaf4bb8951c330",
|
|
30
|
+
"size_bytes": 50457549,
|
|
31
|
+
"members": [
|
|
32
|
+
"terminal/serve/",
|
|
33
|
+
"terminal/tools/",
|
|
34
|
+
"terminal/strata_control/",
|
|
35
|
+
"terminal/strata_cli/",
|
|
36
|
+
"LICENSE"
|
|
37
|
+
],
|
|
38
|
+
"npm_copy": {
|
|
39
|
+
"package": "@simplexai/engine-polystrata-0.2.20-poly.6-source",
|
|
40
|
+
"version": "0.0.0-sha256-9fd665c72c5be294"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "cudart-strata-poly-linux-x64-cuda13.0.3.tar.gz",
|
|
45
|
+
"url": "https://d2ikbbcl3j6jz9.cloudfront.net/cli/localmodels/engines/strata-poly/0.1.45-poly.9/cudart-strata-poly-linux-x64-cuda13.0.3.tar.gz",
|
|
46
|
+
"sha256": "189c3a9fb5fd5f87331ffcedf03d5469c2a9c91f46379299ee6ea277364f05d2",
|
|
47
|
+
"size_bytes": 422462968
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"platform": "win32",
|
|
53
|
+
"arch": "x64",
|
|
54
|
+
"backend": "cuda",
|
|
55
|
+
"min_cuda": "13.0",
|
|
56
|
+
"binary": "strata-poly.exe",
|
|
57
|
+
"assets": [
|
|
58
|
+
{
|
|
59
|
+
"name": "strata-poly-windows-x64-be429311cde9fc84.zip",
|
|
60
|
+
"url": "https://github.com/simplexai-labs/PolyStrata/releases/download/v0.2.20-poly.6/strata-poly-windows-x64-be429311cde9fc84.zip",
|
|
61
|
+
"sha256": "937f0d9ac763498bc331d39fa8332b10ea153fc8b864f06e5e4d63b962a875ab",
|
|
62
|
+
"size_bytes": 81200427,
|
|
63
|
+
"npm_copy": {
|
|
64
|
+
"package": "@simplexai/engine-strata-poly-windows-x64-be429311cde9fc84",
|
|
65
|
+
"version": "0.0.0-sha256-937f0d9ac763498b"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "polystrata-0.2.20-poly.6-source.tar.gz",
|
|
70
|
+
"url": "https://github.com/simplexai-labs/PolyStrata/archive/refs/tags/v0.2.20-poly.6.tar.gz",
|
|
71
|
+
"sha256": "9fd665c72c5be294b71fbddd80c039cda65df74df1665021febaf4bb8951c330",
|
|
72
|
+
"size_bytes": 50457549,
|
|
73
|
+
"members": [
|
|
74
|
+
"terminal/serve/",
|
|
75
|
+
"terminal/tools/",
|
|
76
|
+
"terminal/strata_control/",
|
|
77
|
+
"terminal/strata_cli/",
|
|
78
|
+
"LICENSE"
|
|
79
|
+
],
|
|
80
|
+
"npm_copy": {
|
|
81
|
+
"package": "@simplexai/engine-polystrata-0.2.20-poly.6-source",
|
|
82
|
+
"version": "0.0.0-sha256-9fd665c72c5be294"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "nvidia_cublas-13.0.2.14-py3-none-win_amd64.whl",
|
|
87
|
+
"url": "https://files.pythonhosted.org/packages/f3/91/bda39230b7a4c102bb724c21b50823efc63544490a885fea0b604911c0ab/nvidia_cublas-13.0.2.14-py3-none-win_amd64.whl",
|
|
88
|
+
"sha256": "5f7a90456b1392db60e28719547ba6e00696bfa81304b6887cf287f9edf2c1d7",
|
|
89
|
+
"size_bytes": 401887280
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
@@ -98,6 +98,24 @@ def engine_lock_path(tag: str | None = None) -> Path:
|
|
|
98
98
|
return ENGINE_LOCK if tag is None else ENGINE_LOCK.with_name(f"engines-{tag}.json")
|
|
99
99
|
|
|
100
100
|
|
|
101
|
+
def engine_lock_commit(tag: str | None) -> str | None:
|
|
102
|
+
"""Full commit hash pinned by ``engines-<tag>.json`` (or ``engines.json`` for None), if present."""
|
|
103
|
+
path = engine_lock_path(tag)
|
|
104
|
+
return _load_engine_lock(path)["commit"] if path.is_file() else None
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def commit_matches(expected: str | None, found: str | None) -> bool:
|
|
108
|
+
"""True when ``found`` is a >=7-hex-char prefix of ``expected``."""
|
|
109
|
+
if not expected or not found:
|
|
110
|
+
return False
|
|
111
|
+
cand = found.strip().lower()
|
|
112
|
+
return (
|
|
113
|
+
len(cand) >= 7
|
|
114
|
+
and all(ch in "0123456789abcdef" for ch in cand)
|
|
115
|
+
and expected.lower().startswith(cand)
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
|
|
101
119
|
_ENGINE_LOCK_CACHE: dict[Path, tuple[int, int, EngineLock]] = {}
|
|
102
120
|
|
|
103
121
|
|
|
@@ -227,21 +245,33 @@ def host_engine(
|
|
|
227
245
|
itself, so that check reads the local filesystem."""
|
|
228
246
|
wanted = {a for a in argv[1:] if re.fullmatch(r"--?[A-Za-z][\w-]*", a)}
|
|
229
247
|
least = cat.build_number(min_build)
|
|
248
|
+
least_prism = cat.prism_build_number(min_build)
|
|
230
249
|
for engine in facts.get("engines") or []:
|
|
231
250
|
tag, built = engine["build"], cat.build_number(engine["build"])
|
|
251
|
+
built_prism = cat.prism_build_number(tag)
|
|
232
252
|
flags = set(engine.get("flags") or [])
|
|
233
253
|
if not engine["runs"] or not flags or not wanted <= flags:
|
|
234
254
|
continue
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
255
|
+
same = commit_matches(commit, engine.get("commit"))
|
|
256
|
+
if least_prism is not None:
|
|
257
|
+
newer = built_prism is not None and built_prism >= least_prism
|
|
258
|
+
if not (newer or same):
|
|
259
|
+
continue
|
|
260
|
+
else:
|
|
261
|
+
built_num = built if built is not None else built_prism
|
|
262
|
+
newer = built is not None and (least is None or built >= least)
|
|
263
|
+
if need_build and not (newer or same):
|
|
264
|
+
continue
|
|
265
|
+
if not need_build and least is not None and built_num is not None and built_num < least:
|
|
266
|
+
continue
|
|
241
267
|
if cuda and not any(Path(engine["path"]).parent.glob("libggml-cuda.so*")):
|
|
242
268
|
continue
|
|
243
|
-
label =
|
|
244
|
-
|
|
269
|
+
label = (
|
|
270
|
+
min_build
|
|
271
|
+
if same and (not tag or (least_prism is not None and built_prism is None))
|
|
272
|
+
else tag
|
|
273
|
+
)
|
|
274
|
+
where = f"commit {engine.get('commit') or 'unknown'}"
|
|
245
275
|
warnings.append(
|
|
246
276
|
f"{why}; using the {label} CUDA build already on this host, {engine['path']} ({where}); "
|
|
247
277
|
if cuda
|
|
@@ -417,22 +417,67 @@ def _kv_dtype_scale(profile: ModelProfile, kv_types: tuple[str, str]) -> float:
|
|
|
417
417
|
return (k_bpe + v_bpe) / (2 * _F16_BYTES_PER_ELEM)
|
|
418
418
|
|
|
419
419
|
|
|
420
|
-
|
|
421
|
-
|
|
420
|
+
# llama.cpp pads the SWA KV cache cell count to 256 for backend kernel performance
|
|
421
|
+
# (src/llama-kv-cache-iswa.cpp, ggml-org/llama.cpp#17037).
|
|
422
|
+
_SWA_KV_PAD = 256
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
def _ggml_pad(n: int, align: int = _SWA_KV_PAD) -> int:
|
|
426
|
+
if n <= 0:
|
|
427
|
+
return 0
|
|
428
|
+
return ((n + align - 1) // align) * align
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
def _swa_kv_tokens(
|
|
432
|
+
window: int, swa_window: int, *, slots: int = 1, ubatch: int = 0, unified: bool = True
|
|
433
|
+
) -> int:
|
|
434
|
+
"""SWA KV cells allocated across all streams, matching llama.cpp's ``llama-kv-cache-iswa.cpp``:
|
|
435
|
+
``size_swa = GGML_PAD(min(size_base, n_swa * (unified ? n_seq_max : 1) + n_ubatch), 256)``.
|
|
436
|
+
In unified mode (``--kv-unified``) there is one stream of ``window`` cells; in split mode
|
|
437
|
+
(``unified=False``), ``slots`` streams each hold ``ceil(window / slots)`` base cells."""
|
|
438
|
+
if window <= 0 or swa_window <= 0:
|
|
439
|
+
return 0
|
|
440
|
+
n_seq = max(1, slots)
|
|
441
|
+
ub = max(0, ubatch)
|
|
442
|
+
if unified:
|
|
443
|
+
return _ggml_pad(min(window, swa_window * n_seq + ub))
|
|
444
|
+
size_base = (window + n_seq - 1) // n_seq
|
|
445
|
+
return n_seq * _ggml_pad(min(size_base, swa_window + ub))
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
def kv_pool_bytes(
|
|
449
|
+
profile: ModelProfile,
|
|
450
|
+
window: int,
|
|
451
|
+
kv_types: tuple[str, str],
|
|
452
|
+
*,
|
|
453
|
+
slots: int = 1,
|
|
454
|
+
ubatch: int = 0,
|
|
455
|
+
unified: bool = True,
|
|
456
|
+
) -> int:
|
|
457
|
+
"""KV cache bytes of a ``window``-token pool at the given K/V dtypes. Full layers hold
|
|
458
|
+
``window`` tokens; SWA layers follow llama.cpp's ``llama-kv-cache-iswa.cpp`` sizing
|
|
459
|
+
``GGML_PAD(min(size_base, swa_window * (unified ? slots : 1) + ubatch), 256)`` per stream
|
|
460
|
+
(WHI-676)."""
|
|
422
461
|
scale = _kv_dtype_scale(profile, kv_types)
|
|
462
|
+
swa_tokens = _swa_kv_tokens(
|
|
463
|
+
window, profile.swa_window, slots=slots, ubatch=ubatch, unified=unified
|
|
464
|
+
)
|
|
423
465
|
kv = 0.0
|
|
424
466
|
for kind, per_token_f16 in profile.layers:
|
|
425
467
|
if kind == LayerKind.RECURRENT:
|
|
426
468
|
continue
|
|
427
|
-
tokens =
|
|
469
|
+
tokens = swa_tokens if kind == LayerKind.SWA else window
|
|
428
470
|
kv += per_token_f16 * tokens * scale
|
|
429
471
|
return int(kv)
|
|
430
472
|
|
|
431
473
|
|
|
432
474
|
def session_state_bytes(profile: ModelProfile, window: int, kv_types: tuple[str, str]) -> int:
|
|
433
475
|
"""What one agent session holding the whole ``window`` saves when it leaves the shared pool:
|
|
434
|
-
its KV and one recurrent state (llama-server's
|
|
435
|
-
|
|
476
|
+
its KV (one slot, no ubatch scratch) and one recurrent state (llama-server's ``--cache-ram``
|
|
477
|
+
stores exactly this)."""
|
|
478
|
+
return kv_pool_bytes(profile, window, kv_types, slots=1, ubatch=0) + recurrent_state_bytes(
|
|
479
|
+
profile, slots=1
|
|
480
|
+
)
|
|
436
481
|
|
|
437
482
|
|
|
438
483
|
# A CUDA llama-server with every layer on the card holds host RAM besides its --cache-ram.
|
|
@@ -474,6 +519,7 @@ def agent_footprint_parts(
|
|
|
474
519
|
kv_types: tuple[str, str],
|
|
475
520
|
ubatch: int,
|
|
476
521
|
mtp: bool = False,
|
|
522
|
+
unified: bool = True,
|
|
477
523
|
) -> dict[str, int]:
|
|
478
524
|
"""``agent_footprint_bytes`` split into its FOOTPRINT_PARTS, for a view that shows where
|
|
479
525
|
the card's memory goes; the parts sum to exactly that footprint."""
|
|
@@ -486,7 +532,7 @@ def agent_footprint_parts(
|
|
|
486
532
|
)
|
|
487
533
|
return {
|
|
488
534
|
"weights": int(weights_gpu),
|
|
489
|
-
"kv": kv_pool_bytes(profile, window, kv_types),
|
|
535
|
+
"kv": kv_pool_bytes(profile, window, kv_types, slots=slots, ubatch=ubatch, unified=unified),
|
|
490
536
|
"state": recurrent_state_bytes(profile, slots=slots),
|
|
491
537
|
"compute": int(
|
|
492
538
|
_agent_compute_base_bytes(profile.n_embd)
|
|
@@ -505,6 +551,7 @@ def agent_footprint_bytes(
|
|
|
505
551
|
kv_types: tuple[str, str],
|
|
506
552
|
ubatch: int,
|
|
507
553
|
mtp: bool = False,
|
|
554
|
+
unified: bool = True,
|
|
508
555
|
) -> int:
|
|
509
556
|
"""What one agent-posture llama-server holds on the card (VP1 c4 + VP2, five
|
|
510
557
|
configurations): GPU-resident weights — untied models keep the token_embd table only
|
|
@@ -516,6 +563,12 @@ def agent_footprint_bytes(
|
|
|
516
563
|
draft context, no vocab logits buffer (VP2 measured it at 1.89 MiB on CUDA_Host) and
|
|
517
564
|
the MTP blocks stay unloaded."""
|
|
518
565
|
parts = agent_footprint_parts(
|
|
519
|
-
profile,
|
|
566
|
+
profile,
|
|
567
|
+
window,
|
|
568
|
+
slots=slots,
|
|
569
|
+
kv_types=kv_types,
|
|
570
|
+
ubatch=ubatch,
|
|
571
|
+
mtp=mtp,
|
|
572
|
+
unified=unified,
|
|
520
573
|
)
|
|
521
574
|
return sum(parts.values())
|
|
@@ -94,28 +94,33 @@ def install(
|
|
|
94
94
|
_own(venv)
|
|
95
95
|
return f"keeping the installed Python environment {venv.name}"
|
|
96
96
|
source = requirements_path(requirements)
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
97
|
+
lock_key = hashlib.sha256(str(venv.resolve()).encode("utf-8")).hexdigest()[:16]
|
|
98
|
+
with hosts.file_lock(hosts.stacks_dir() / f".frontend-{lock_key}.lock"):
|
|
99
|
+
if ready(base_dir, requirements):
|
|
100
|
+
_own(venv)
|
|
101
|
+
return f"keeping the installed Python environment {venv.name}"
|
|
102
|
+
if venv.is_symlink():
|
|
103
|
+
raise FrontendError(f"{venv} is a symbolic link; refusing to write")
|
|
104
|
+
if venv.exists():
|
|
105
|
+
shutil.rmtree(venv)
|
|
106
|
+
venv.parent.mkdir(parents=True, exist_ok=True)
|
|
107
|
+
log(f"creating Python environment {venv}")
|
|
108
|
+
python = venv_python(str(venv))
|
|
109
|
+
steps = [
|
|
110
|
+
[interpreter or sys.executable, "-m", "venv", "--without-pip", str(venv)],
|
|
111
|
+
_installer(python, source),
|
|
112
|
+
]
|
|
113
|
+
env = region.pip_environment() # hash-locked; in cn a China index unless pip has its own
|
|
114
|
+
for command in steps:
|
|
115
|
+
result = subprocess.run(
|
|
116
|
+
command, capture_output=True, text=True, timeout=1200, check=False, env=env
|
|
116
117
|
)
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
if result.returncode:
|
|
119
|
+
raise FrontendError(
|
|
120
|
+
f"{' '.join(command[:4])} failed: {(result.stderr or result.stdout).strip()[-400:]}"
|
|
121
|
+
)
|
|
122
|
+
(venv / MARKER).write_text(_digest(source) + "\n")
|
|
123
|
+
_own(venv)
|
|
119
124
|
return f"installed Python environment {venv}"
|
|
120
125
|
|
|
121
126
|
|
|
@@ -365,6 +365,51 @@ def wire_foundations(
|
|
|
365
365
|
return done
|
|
366
366
|
|
|
367
367
|
|
|
368
|
+
def leave_magpie(tools_dir: str) -> list[str]:
|
|
369
|
+
"""Before a Bifrost wiring: undo what this tool wired into Magpie (the stack moved). The
|
|
370
|
+
plan being wired is already the latest run record, so both the unwiring and the shutdown are
|
|
371
|
+
checked against the earlier approved plan that ran Magpie (``magpie_target``); without one
|
|
372
|
+
they fail closed and leave Magpie and its records as they are."""
|
|
373
|
+
from localmodels import bifrost_clients
|
|
374
|
+
|
|
375
|
+
doc = hosts.load_owned(tools_dir)
|
|
376
|
+
started = doc["gateway"]["started"]
|
|
377
|
+
if not bifrost_clients.magpie_wired(doc) and not started:
|
|
378
|
+
return []
|
|
379
|
+
if started: # a restored handoff receipt can precede a failed Magpie shutdown
|
|
380
|
+
bifrost_clients.refuse_changed_handoff(doc, tools_dir)
|
|
381
|
+
magpie = magpie_binary(doc)
|
|
382
|
+
previous = harness_gateway.magpie_target(tools_dir)
|
|
383
|
+
results = _unwire_magpie(magpie, tools_dir, plan=previous)
|
|
384
|
+
if all(r["ok"] for r in results) and started:
|
|
385
|
+
results.append(
|
|
386
|
+
stop_gateway(magpie, started, tools_dir, plan=previous)
|
|
387
|
+
if magpie is not None
|
|
388
|
+
else {"check": "magpie", "ok": False, "detail": "no Magpie started by this tool"}
|
|
389
|
+
)
|
|
390
|
+
if any(not r["ok"] for r in results):
|
|
391
|
+
raise HarnessError(
|
|
392
|
+
"undoing this tool's wiring in Magpie failed, not switched to Bifrost: "
|
|
393
|
+
+ "; ".join(r["check"] for r in results if not r["ok"])
|
|
394
|
+
)
|
|
395
|
+
return [f"Magpie wiring undone ({len(results)} items)"]
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
def leave(tools_dir: str) -> list[str]:
|
|
399
|
+
"""Before a Magpie wiring: stop this tool's Bifrost and give pi and the clients back."""
|
|
400
|
+
from localmodels import gateway_bifrost
|
|
401
|
+
|
|
402
|
+
if not hosts.load_owned(tools_dir)["gateway"].get("bifrost"):
|
|
403
|
+
return []
|
|
404
|
+
results = gateway_bifrost.unwire(tools_dir)
|
|
405
|
+
if any(not r["ok"] for r in results):
|
|
406
|
+
raise HarnessError(
|
|
407
|
+
"undoing this tool's Bifrost gateway failed, not switched to Magpie: "
|
|
408
|
+
+ "; ".join(r["check"] for r in results if not r["ok"])
|
|
409
|
+
)
|
|
410
|
+
return ["Bifrost gateway stopped, pi and the clients restored"]
|
|
411
|
+
|
|
412
|
+
|
|
368
413
|
def wire(
|
|
369
414
|
plan: HarnessPlan,
|
|
370
415
|
llm_key: str,
|
|
@@ -377,13 +422,13 @@ def wire(
|
|
|
377
422
|
point pi at it. Idempotent: providers are updated by id, and adding a group by its name
|
|
378
423
|
replaces it with its rules. A re-sync (``select_pi=False``) leaves the gateway keys alone, so a
|
|
379
424
|
key the user removed stays removed. A Bifrost plan goes to ``gateway_bifrost.wire``."""
|
|
380
|
-
from localmodels import gateway_bifrost
|
|
425
|
+
from localmodels import gateway_bifrost
|
|
381
426
|
|
|
382
427
|
tools_dir = plan["tools_dir"]
|
|
383
428
|
if _bifrost(plan):
|
|
384
|
-
done =
|
|
429
|
+
done = leave_magpie(tools_dir) if select_pi else []
|
|
385
430
|
return done + gateway_bifrost.wire(plan, llm_key, decision_key, aux, select_pi=select_pi)
|
|
386
|
-
done =
|
|
431
|
+
done = leave(tools_dir) if select_pi else []
|
|
387
432
|
if select_pi and (key := gateway_keys.ensure(plan)):
|
|
388
433
|
done.append(key)
|
|
389
434
|
|
|
@@ -8,7 +8,7 @@ from pathlib import Path
|
|
|
8
8
|
from typing import Any
|
|
9
9
|
|
|
10
10
|
from localmodels import (
|
|
11
|
-
|
|
11
|
+
bifrost_config,
|
|
12
12
|
gateway_bifrost,
|
|
13
13
|
gateway_cli,
|
|
14
14
|
gateway_foundations,
|
|
@@ -26,7 +26,7 @@ def render(
|
|
|
26
26
|
if provider is not None:
|
|
27
27
|
field = next(name for name in ("chat", "responses", "anthropic") if name in provider)
|
|
28
28
|
pid = provider["id"]
|
|
29
|
-
native =
|
|
29
|
+
native = bifrost_config.render_provider("llm", provider[field], "*", provider["key"], pid)
|
|
30
30
|
native["keys"][0]["models"] = provider["models"] or ["*"]
|
|
31
31
|
custom = native["custom_provider_config"]
|
|
32
32
|
if field == "anthropic":
|
|
@@ -45,13 +45,13 @@ def render(
|
|
|
45
45
|
except (OSError, ValueError, KeyError, TypeError):
|
|
46
46
|
decision, key, aux = None, None, []
|
|
47
47
|
if decision is not None and key is not None:
|
|
48
|
-
providers["localmodels-jev"] =
|
|
48
|
+
providers["localmodels-jev"] = bifrost_config.render_provider(
|
|
49
49
|
"decision", decision["url"], decision["model"], key, "localmodels-jev"
|
|
50
50
|
)
|
|
51
51
|
for ep in aux:
|
|
52
52
|
aux_pid = gateway_bifrost.AUX_PROVIDERS.get(ep["contract"])
|
|
53
53
|
if aux_pid:
|
|
54
|
-
providers[aux_pid] =
|
|
54
|
+
providers[aux_pid] = bifrost_config.render_provider(
|
|
55
55
|
ep["contract"], ep["url"], ep["model"], ep["key"], aux_pid
|
|
56
56
|
)
|
|
57
57
|
return gateway_bifrost.render_config(
|