diskformer 0.5.4 → 0.6.4

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 CHANGED
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.4 (2026-10-23)
4
+ - `engines/lfm2_5.js` (LFM2.5 230M/1.2B, `Lfm2Mobile`), `engines/gemma-4-e2b.js` (Gemma 4 E2B/E4B, `Gemma4Mobile`) and
5
+ `engines/ternary_bonsai_2_27b.js` (`TernaryBonsai2`), from LocalMind main a02f06e. Held back in 0.6.0 because their
6
+ webml-community Spaces showed no license; Chirag wrote them and released them under MIT (2026-10-23). All three
7
+ import in Node; their GPU checks are LocalMind's (`scripts/bench-engines.mjs`), not rerun here. With these,
8
+ diskformer holds every LocalMind engine.
9
+
10
+ ## 0.6.3 (2026-10-23)
11
+ - `LingMoeSsd.load` reads the two parts' headers (20 MB from Hugging Face) only when an ingest follows; a complete
12
+ store loads without them (found by LocalMind's live check through anyformer). Verified in a real browser by LocalMind
13
+ (after a 77 GB ingest through anyformer v0.2.5, a reload made no requests to the part URLs; answers correct before and
14
+ after). `qwen3_moe_ssd.js` exports `STORE_FORMAT` and `STORE_ROOT`.
15
+ - `scripts/sync-localmind.mjs` runs diskformer → LocalMind for every file now, engines included (imports rewritten
16
+ from `../src/` to `./`); `--ref` is gone, since LocalMind no longer writes engines.
17
+ - Native driver reads a split GGUF (`name-0000k-of-0000n.gguf`, as published) part by part, so it is never merged.
18
+ Ling 3.0 Flash (124B-A5B, 2 parts, 77 GB) on the llama.cpp path natively: replies identical at 8 and 32 slots on 3
19
+ prompts, 32 tokens. The browser build refuses a split GGUF with a message for now. Rebuilt browser build rechecked:
20
+ Granite 4.0 H Tiny 9/9 in Chrome.
21
+
22
+ ## 0.6.2 (2026-10-23)
23
+ - `engines/ling_moe_ssd.js`: the Ling 3.0 Flash engine (inclusionAI, 124B-A5B, `bailingmoe3`: KDA linear attention +
24
+ MLA, 512 experts), handed over by LocalMind (d210986); the first engine diskformer adopts rather than mirrors.
25
+ `splitFetch` ingests the two-part GGUF as one file. `engines/iq_quants.js` gains Q6_K and Q5_0. LocalMind's gate:
26
+ 6-layer cut 8/8 vs llama.cpp Metal; full model 5/8 vs llama.cpp CPU over 32 tokens, layer 0 within 5 decimals of a
27
+ float64 reference (CPU is 1-3% off); decode 5.53 tok/s, GPU 2.51 GB dense + 4.29 GB pool (M4 Pro). Here: imports in
28
+ Node, LocalMind's no-GPU test (`test-ling.mjs`) passes on this copy; the GPU gate was not rerun here.
29
+
30
+ ## 0.6.1 (2026-10-22)
31
+ - `Llama.chat(messages, { thinking: false })` renders the chat template with reasoning off (llama.cpp's
32
+ `enable_thinking`), for models that reason first: Qwen3.6 35B-A3B natively answers directly instead of opening with a
33
+ thinking process. Default unchanged (the template's own choice). Asked for by anyformer, whose other engines pass
34
+ `enableThinking: false`. Native driver: `df-chat model slots prompt n --no-think`. In Chrome (through anyformer's
35
+ diskformer-llama): Gemma 4 26B's explain-tcp chat with `thinking: false` is identical to `gemma.json`'s reply.
36
+
37
+ ## 0.6.0 (2026-10-22)
38
+ - `engines/` is the one home of LocalMind's hand-written engines (Chirag 2026-10-22: diskformer holds every custom
39
+ engine; anyformer routes; LocalMind loads through anyformer). New: `lfm2_moe_ssd.js`, `hy_v3_moe_ssd.js`,
40
+ `flint_moe_ssd.js`, `iq_quants.js`, `qwen35_dense.js`, `ple-opfs.js`, `flashmap_drafter.js`,
41
+ `ternary_bonsai_2_dflash.js`, `ternary_bonsai_2_mtp.js`, copied from LocalMind main b5c289d with imports rewritten;
42
+ each was gated in LocalMind and imports cleanly here (Node). Not copied: `lfm2_5.js`, `gemma-4-e2b.js` and
43
+ `ternary_bonsai_2_27b.js`, vendored from webml-community Spaces that publish no license.
44
+ - `scripts/sync-localmind.mjs --ref <commit>` reads LocalMind's engines from a commit instead of its working tree.
45
+ - `scripts/chrome-gate.mjs --env K=V,…` passes driver settings to the gate page.
46
+
3
47
  ## 0.5.4 (2026-10-22)
4
48
  - `diskformer/llama`: the GPU budget plan picks the physical batch size (llama.cpp's `n_ubatch`) as the largest of
5
49
  512, 256, 128 and 64 that leaves room for one token's experts. The compute buffers scale with it (Gemma 4 26B-A4B:
package/README.md CHANGED
@@ -5,7 +5,7 @@ WebGPU in a worker; the GGUF stays on disk in the browser's private storage (OPF
5
5
  needs are paged into GPU memory. 17 architectures are checked against llama.cpp, from Qwen3.6 35B to gpt-oss 20B.
6
6
 
7
7
  Plain ES modules, no dependencies, no build step. Chrome or Edge with WebGPU, on any origin (CDN or self-hosted).
8
- Weights stay in the user's own browser storage. The disk tier underneath (`src/`) also runs two hand-written engines.
8
+ Weights stay in the user's own browser storage. The disk tier underneath (`src/`) also runs hand-written engines.
9
9
 
10
10
  [![npm](https://img.shields.io/npm/v/diskformer?style=flat-square&color=555)](https://www.npmjs.com/package/diskformer)
11
11
  [![license](https://img.shields.io/badge/license-MIT-555?style=flat-square)](LICENSE)
@@ -18,7 +18,7 @@ Weights stay in the user's own browser storage. The disk tier underneath (`src/`
18
18
  | How | Command |
19
19
  |---|---|
20
20
  | npm | `npm install diskformer` |
21
- | CDN | `import { Llama } from 'https://cdn.jsdelivr.net/npm/diskformer@0.5.2/ggml/llama.js'` |
21
+ | CDN | `import { Llama } from 'https://cdn.jsdelivr.net/npm/diskformer@0.5.4/ggml/llama.js'` |
22
22
  | Copy | `src/`, `engines/` and `index.js`; nothing else is needed |
23
23
 
24
24
  ## Quick start
@@ -27,7 +27,7 @@ Paste into any page served over http(s), in Chrome or Edge. The first run downlo
27
27
  OPFS (resumable); later loads take seconds. Any MoE GGUF on a [checked architecture](docs/coverage.md) loads the same way.
28
28
  ```html
29
29
  <script type="module">
30
- import { Llama } from 'https://cdn.jsdelivr.net/npm/diskformer@0.5.2/ggml/llama.js';
30
+ import { Llama } from 'https://cdn.jsdelivr.net/npm/diskformer@0.5.4/ggml/llama.js';
31
31
  const llama = new Llama();
32
32
  const name = 'granite-4.0-h-tiny-Q4_K_M.gguf';
33
33
  await llama.download({ name, size: 4230976352,
@@ -64,8 +64,9 @@ weights in OPFS, read through sync access handles in workers, and moves only wha
64
64
 
65
65
  ## The engines
66
66
 
67
- The disk tier also stands alone: your engine keeps its own kernels and decides what a step needs. `engines/` holds three
68
- from-scratch WebGPU engines on it: Gemma 4 26B-A4B, Qwen3.6 35B-A3B and Qwen3-30B-A3B (at
67
+ The disk tier also stands alone: your engine keeps its own kernels and decides what a step needs. `engines/` is the home of
68
+ LocalMind's hand-written WebGPU engines (since 0.6.0): LFM2 MoE, Hunyuan v3 MoE, Flint, Ling 3.0 Flash, a dense Qwen3.5 layer streamer,
69
+ LFM2.5, Gemma 4 E2B, Ternary Bonsai 2 27B and speculative drafters, each gated in LocalMind; and Gemma 4 26B-A4B, Qwen3.6 35B-A3B and Qwen3-30B-A3B (at
69
70
  [/classic/](https://diskformer.naklitechie.com/classic/); `Gemma4MoeSsd.load(null, { gpuBudgetBytes })`). A budget that
70
71
  cannot hold the dense part and two tokens' experts is refused with the numbers. Kernels: gemma4-webgpu (Apache-2.0,
71
72
  `engines/NOTICE`). Measured on a MacBook M4 Pro, 24 GB, Chrome 154, 2026-10-05, decode the median of
package/engines/NOTICE CHANGED
@@ -9,9 +9,10 @@ fork of gemma4-webgpu:
9
9
  https://github.com/tylerstraub/gemma4-webgpu
10
10
 
11
11
  Changes from the original: rewritten for mixture-of-experts models whose experts stream from OPFS (Q8_0 and Q4_0
12
- split planes, slot-indexed expert GEMVs, GPU router top-k, chunked prefill, Q6_K head planes). Everything else in
12
+ split planes, slot-indexed expert GEMVs, GPU router top-k, chunked prefill, Q6_K head planes). `ternary_bonsai_2_dflash.js` is built from NakliTechie/dflash-mlx-bonsai2 (Apache-2.0). `lfm2_5.js`,
13
+ `gemma-4-e2b.js` and `ternary_bonsai_2_27b.js` are built from webml-community Hugging Face Spaces by the same author, MIT. Everything else in
13
14
  this folder is MIT (../LICENSE), Copyright (c) 2026 Chirag Patnaik.
14
15
 
15
16
  The engine files are copies of LocalMind's (https://github.com/NakliTechie/LocalMind), kept in step by
16
17
  scripts/sync-localmind.mjs. Model weights are not distributed: each model is downloaded by the user under its own
17
- terms (Gemma: https://ai.google.dev/gemma/terms; Qwen3.6: Apache-2.0).
18
+ terms (Gemma: https://ai.google.dev/gemma/terms; Qwen3.6: Apache-2.0; each other model under its own license).