diskformer 0.6.8 → 0.6.9
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/CHANGELOG.md +13 -0
- package/ggml/dist/BUILD.md +2 -2
- package/ggml/dist/df-chat.wasm +0 -0
- package/ggml/llama.js +3 -2
- package/ggml/worker.mjs +8 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.9 (2026-10-24)
|
|
4
|
+
- DeepSeek V4.1 Flash 1017 (763B, 6 of 384 experts active) in the chat demo as a tech demo: ISTA-DASLab's GSQ-RCO
|
|
5
|
+
IQ1_M (4 parts, 120.7 GB) plus its separate Engram tables (110.6 GB), 231.3 GB in all, at an 8 GB GPU budget.
|
|
6
|
+
In Chrome it loaded in 173 s and answered one prompt as the native build does ("The capital of France is
|
|
7
|
+
**Paris**."); about 0.4 tok/s natively from an external SSD (1.3 GB of experts read per token). Layers 0-2 on
|
|
8
|
+
llama.cpp's CPU backend match a float64 reference within llama.cpp's own rounding. Not gated on 9 prompts.
|
|
9
|
+
- The fork (`webgpu-diskformer` at `5ac033a52`) takes draft PR 30817 (DeepSeek-V4.1) with a loader for ISTA's
|
|
10
|
+
layout (separate Engram file, unfused gate, u32 candidate layer) and WebGPU shaders for its ops:
|
|
11
|
+
LIGHTNING_INDEXER, DSV4_HC_PRE/POST/COMB, TOP_K_MASK, POOL_1D, ROPE_BACK, f16 CONCAT and BF16 CPY.
|
|
12
|
+
Regression gates on the new build: Granite 4.0 H Tiny 9/9 and Nemotron 3.5 Bolt E4B 9/9 in Chrome.
|
|
13
|
+
- `load({ extra })` mounts stored side files beside the GGUF; the chat demo downloads a catalog entry's side
|
|
14
|
+
files with its parts. `scripts/chrome-gate.mjs --extra` and `--dist`.
|
|
15
|
+
|
|
3
16
|
## 0.6.8 (2026-10-24)
|
|
4
17
|
- Nemotron 3.5 Bolt E4B (dense, `gemma4`, 6.18 GB) in the chat demo: 9/9 replies identical to llama-server on WebGPU
|
|
5
18
|
in Chrome, 30 tok/s at a 5 GB budget. Three fixes made it run in a browser:
|
package/ggml/dist/BUILD.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
because diskformer.naklitechie.com and the HF Space serve them and their CI has no Emscripten; the npm package ships them
|
|
5
5
|
as `diskformer/llama`.
|
|
6
6
|
|
|
7
|
-
Built from the fork `NakliTechie/llama.cpp` branch `webgpu-diskformer` at `
|
|
7
|
+
Built from the fork `NakliTechie/llama.cpp` branch `webgpu-diskformer` at `5ac033a52` (upstream master of 2026-10-22 merged in; head size 512 flash attention on the GPU; a thread-free log in wasm; DeepSeek-V4.1 from draft PR 30817 with WebGPU shaders for its ops), Emscripten 6.0.13 (Homebrew),
|
|
8
8
|
emdawnwebgpu from the fork's `emdawnwebgpu_pkg`, all C++ with `-fwasm-exceptions`. Rebuild (copies here as a
|
|
9
9
|
post-build step):
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ post-build step):
|
|
|
12
12
|
|
|
13
13
|
sha256 (check a copy with `shasum -a 256`):
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
9c532bdddb66821d7be2dff2d2008f9a976ca7b497574fa2f1520b4f9ab9ff58 df-chat.wasm
|
|
16
16
|
0f8a1a7e3eb75ef8f999d553d2fc1a124c4de1b6c6edb597643486752bcdce08 df-chat.mjs
|
|
17
17
|
|
|
18
18
|
Update the fork commit and the checksums whenever the build changes.
|
package/ggml/dist/df-chat.wasm
CHANGED
|
Binary file
|
package/ggml/llama.js
CHANGED
|
@@ -52,8 +52,9 @@ export class Llama {
|
|
|
52
52
|
|
|
53
53
|
// Loads a stored GGUF: budget (bytes of GPU memory, slots planned from it) or slots (experts per layer on the GPU).
|
|
54
54
|
// draft: a stored drafter GGUF (DFlash, DSpark, MTP...) for speculative decoding; replies stay greedy-identical.
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
// extra: stored side files the model opens beside the GGUF, by name (DeepSeek-V4.1's Engram tables).
|
|
56
|
+
load({ name, budget = 0, slots = 0, ctx = 1024, env = {}, draft = null, extra = [] }, onPlan) {
|
|
57
|
+
return this.request({ type: 'load', opfsName: name, budget, slots, ctx, env, draft, extra }, ['loaded'], (d) => { if (d.type === 'plan' && onPlan) onPlan(d.plan); });
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
// A reply through the model's chat template; greedy. Resolves { text, stats }. thinking: false renders the template
|
package/ggml/worker.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// sync access handles, straight into the wasm heap. A GGUF gets into OPFS by download (resumable, from a URL) or by
|
|
4
4
|
// copying a picked file; with opfs: false a picked File is read in place instead (slower).
|
|
5
5
|
//
|
|
6
|
-
// Messages in: load {opfsName | file, budget | slots, ctx, env, draft} · chat {messages, n, thinking} · complete {prompt, n} (the gate)
|
|
6
|
+
// Messages in: load {opfsName | file, budget | slots, ctx, env, draft, extra} · chat {messages, n, thinking} · complete {prompt, n} (the gate)
|
|
7
7
|
// · abort · download {url, name, size} · list · remove {name}
|
|
8
8
|
// Messages out: log · progress · plan · loaded · piece · done · downloaded · models · removed · error
|
|
9
9
|
import createModule from './dist/df-chat.mjs'; // built from ggml/build-wasm, see ggml/dist/BUILD.md
|
|
@@ -195,8 +195,14 @@ onmessage = async ({ data }) => {
|
|
|
195
195
|
// draft: a drafter GGUF in OPFS (DFlash, DSpark, MTP...) for speculative decoding; read whole at load, not paged
|
|
196
196
|
const draftFile = data.draft ? await (await ggufDir(false)).getFileHandle(data.draft).then((h) => h.getFile())
|
|
197
197
|
.catch(() => { throw new Error(`${data.draft} is not in OPFS; download the drafter first`); }) : null;
|
|
198
|
+
// extra: side files the model opens by name beside the GGUF (DeepSeek-V4.1's Engram tables), from OPFS
|
|
199
|
+
const extraFiles = [];
|
|
200
|
+
for (const name of data.extra || []) {
|
|
201
|
+
extraFiles.push(await (await ggufDir(false)).getFileHandle(name).then((h) => h.getFile())
|
|
202
|
+
.catch(() => { throw new Error(`${name} is not in OPFS; download it first`); }));
|
|
203
|
+
}
|
|
198
204
|
mod.FS.mkdir('/m');
|
|
199
|
-
mod.FS.mount(mod.WORKERFS, { files:
|
|
205
|
+
mod.FS.mount(mod.WORKERFS, { files: [...files, ...(draftFile ? [draftFile] : []), ...extraFiles] }, '/m');
|
|
200
206
|
if (draftFile) mod._df_set_draft(str('/m/' + draftFile.name));
|
|
201
207
|
const t0 = performance.now();
|
|
202
208
|
// a GPU budget (bytes) becomes slots through df_plan; else data.slots as given
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "diskformer",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"description": "Run a model larger than your GPU memory in a browser tab: weights stay in OPFS, WebGPU holds only what each step needs. llama.cpp with paged MoE experts (diskformer/llama), a disk tier, and hand-written MoE engines.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|