@basecompute/basert 0.4.6 → 0.5.0
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 +14 -7
- package/bin/basert.js +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -0
- package/package.json +9 -5
package/README.md
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
# @basecompute/basert
|
|
2
2
|
|
|
3
|
-
Fast local LLM inference on Apple Silicon (Metal)
|
|
4
|
-
(CUDA)
|
|
5
|
-
Node.js / TypeScript bindings.
|
|
3
|
+
Fast local LLM inference on Apple Silicon (Metal), NVIDIA GB10 / DGX Spark
|
|
4
|
+
(CUDA) and AMD Strix Halo / Strix Point (ROCm). This package installs the
|
|
5
|
+
`basert` CLI, the prebuilt engine, and the Node.js / TypeScript bindings.
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
npm install -g @basecompute/basert # the CLI
|
|
9
9
|
npm install @basecompute/basert # the bindings, in a project
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Requires Node 18+, and
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
Requires Node 18+, and one of:
|
|
13
|
+
|
|
14
|
+
- Apple Silicon with macOS 15+;
|
|
15
|
+
- Linux/arm64 with an NVIDIA GPU and the CUDA 13 runtime (cuBLAS);
|
|
16
|
+
- Linux/x64 with an AMD Strix Halo (gfx1151) or Strix Point (gfx1150) GPU and
|
|
17
|
+
the ROCm 10 runtime in `/opt/rocm/core-10.0`
|
|
18
|
+
(`sudo apt install amdrocm-blas10.0-gfx1151`, or `-gfx1150`).
|
|
19
|
+
|
|
20
|
+
npm installs only the engine for your platform
|
|
21
|
+
(`@basecompute/basert-darwin-arm64`, `@basecompute/basert-linux-arm64-cuda` or
|
|
22
|
+
`@basecompute/basert-linux-x64-rocm`), so don't install with
|
|
16
23
|
`--omit=optional`.
|
|
17
24
|
|
|
18
25
|
## CLI
|
package/bin/basert.js
CHANGED
|
@@ -14,13 +14,14 @@ const path = require("path");
|
|
|
14
14
|
const ENGINE_PACKAGES = {
|
|
15
15
|
"darwin-arm64": "@basecompute/basert-darwin-arm64",
|
|
16
16
|
"linux-arm64": "@basecompute/basert-linux-arm64-cuda",
|
|
17
|
+
"linux-x64": "@basecompute/basert-linux-x64-rocm",
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
const platform = `${process.platform}-${process.arch}`;
|
|
20
21
|
const pkg = ENGINE_PACKAGES[platform];
|
|
21
22
|
if (!pkg) {
|
|
22
23
|
console.error(
|
|
23
|
-
`basert: no prebuilt engine for ${platform}. BaseRT ships macOS/arm64 (Apple Silicon)
|
|
24
|
+
`basert: no prebuilt engine for ${platform}. BaseRT ships macOS/arm64 (Apple Silicon), Linux/arm64 (NVIDIA CUDA) and Linux/x64 (AMD ROCm).`
|
|
24
25
|
);
|
|
25
26
|
process.exit(1);
|
|
26
27
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -109,6 +109,8 @@ export declare const Engine: {
|
|
|
109
109
|
setPrefillChunk(n: number): void;
|
|
110
110
|
/** Paged-weights load policy: 0=auto, 1=force, 2=no-retry (issue #113). */
|
|
111
111
|
setPagedWeights(mode: number): void;
|
|
112
|
+
/** The prefill's Neural Engine split: true=on (default), false=GPU alone. */
|
|
113
|
+
setNeuralEngine(enable: boolean): void;
|
|
112
114
|
/** Toggle the baked-decode fast path: true=on (default), false=force live. */
|
|
113
115
|
setBakedDecode(enable: boolean): void;
|
|
114
116
|
/** GPU-wait timeout (ms); 0 = block indefinitely (default). Metal only. */
|
package/dist/index.js
CHANGED
|
@@ -82,6 +82,7 @@ function libNames() {
|
|
|
82
82
|
const ENGINE_PACKAGES = {
|
|
83
83
|
"darwin-arm64": "@basecompute/basert-darwin-arm64",
|
|
84
84
|
"linux-arm64": "@basecompute/basert-linux-arm64-cuda",
|
|
85
|
+
"linux-x64": "@basecompute/basert-linux-x64-rocm",
|
|
85
86
|
};
|
|
86
87
|
function enginePackageDir() {
|
|
87
88
|
const pkg = ENGINE_PACKAGES[`${process.platform}-${process.arch}`];
|
|
@@ -335,6 +336,7 @@ function lib() {
|
|
|
335
336
|
baseRT_set_max_batch_size: k.func("void baseRT_set_max_batch_size(int)"),
|
|
336
337
|
baseRT_set_prefill_chunk: k.func("void baseRT_set_prefill_chunk(int)"),
|
|
337
338
|
baseRT_set_paged_weights: k.func("void baseRT_set_paged_weights(int)"),
|
|
339
|
+
baseRT_set_neural_engine: k.func("void baseRT_set_neural_engine(int)"),
|
|
338
340
|
baseRT_set_baked_decode: k.func("void baseRT_set_baked_decode(int)"),
|
|
339
341
|
baseRT_set_gpu_wait_timeout_ms: k.func("void baseRT_set_gpu_wait_timeout_ms(double)"),
|
|
340
342
|
baseRT_encode: k.func("int baseRT_encode(void *, const char *, _Out_ uint32_t *, int)"),
|
|
@@ -422,6 +424,10 @@ exports.Engine = {
|
|
|
422
424
|
setPagedWeights(mode) {
|
|
423
425
|
lib().baseRT_set_paged_weights(mode);
|
|
424
426
|
},
|
|
427
|
+
/** The prefill's Neural Engine split: true=on (default), false=GPU alone. */
|
|
428
|
+
setNeuralEngine(enable) {
|
|
429
|
+
lib().baseRT_set_neural_engine(enable ? 1 : 0);
|
|
430
|
+
},
|
|
425
431
|
/** Toggle the baked-decode fast path: true=on (default), false=force live. */
|
|
426
432
|
setBakedDecode(enable) {
|
|
427
433
|
lib().baseRT_set_baked_decode(enable ? 1 : 0);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basecompute/basert",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Fast local LLM inference on Apple Silicon and
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Fast local LLM inference on Apple Silicon, NVIDIA GB10 and AMD Strix: the basert CLI and Node.js bindings",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
"apple-silicon",
|
|
16
16
|
"metal",
|
|
17
17
|
"cuda",
|
|
18
|
+
"rocm",
|
|
19
|
+
"amd",
|
|
18
20
|
"openai"
|
|
19
21
|
],
|
|
20
22
|
"main": "dist/index.js",
|
|
@@ -30,14 +32,16 @@
|
|
|
30
32
|
"linux"
|
|
31
33
|
],
|
|
32
34
|
"cpu": [
|
|
33
|
-
"arm64"
|
|
35
|
+
"arm64",
|
|
36
|
+
"x64"
|
|
34
37
|
],
|
|
35
38
|
"dependencies": {
|
|
36
39
|
"koffi": "^2.9.0"
|
|
37
40
|
},
|
|
38
41
|
"optionalDependencies": {
|
|
39
|
-
"@basecompute/basert-darwin-arm64": "0.
|
|
40
|
-
"@basecompute/basert-linux-arm64-cuda": "0.
|
|
42
|
+
"@basecompute/basert-darwin-arm64": "0.5.0",
|
|
43
|
+
"@basecompute/basert-linux-arm64-cuda": "0.5.0",
|
|
44
|
+
"@basecompute/basert-linux-x64-rocm": "0.5.0"
|
|
41
45
|
},
|
|
42
46
|
"files": [
|
|
43
47
|
"dist/**/*.js",
|