@tryhamster/gerbil 1.11.4 → 1.13.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 +104 -0
- package/dist/{architectures-DmZMEFsA.mjs → architectures-DHwj9AQD.mjs} +50 -38
- package/dist/architectures-DHwj9AQD.mjs.map +1 -0
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +11 -0
- package/dist/browser/index.js.map +1 -1
- package/dist/cli.mjs +8 -8
- package/dist/cli.mjs.map +1 -1
- package/dist/{defaults-DfGx4d1m.mjs → defaults-B0aQZJTM.mjs} +3 -2
- package/dist/defaults-B0aQZJTM.mjs.map +1 -0
- package/dist/frameworks/express.mjs +1 -1
- package/dist/frameworks/fastify.mjs +1 -1
- package/dist/frameworks/hono.mjs +1 -1
- package/dist/frameworks/next.d.mts +2 -2
- package/dist/frameworks/next.mjs +1 -1
- package/dist/frameworks/trpc.mjs +1 -1
- package/dist/gerbil-Bw6do78d.mjs +4 -0
- package/dist/{gerbil-5_80K0gA.d.mts → gerbil-CD_skiL3.d.mts} +2 -2
- package/dist/{gerbil-5_80K0gA.d.mts.map → gerbil-CD_skiL3.d.mts.map} +1 -1
- package/dist/{gerbil-CYVmU8sQ.mjs → gerbil-DAz_a4Jh.mjs} +33 -13
- package/dist/gerbil-DAz_a4Jh.mjs.map +1 -0
- package/dist/gpu/hooks.d.mts +1 -1
- package/dist/gpu/hooks.mjs +1 -1
- package/dist/gpu/index.d.mts +2 -2
- package/dist/gpu/index.mjs +5 -5
- package/dist/{gpu-CrzjQHv2.mjs → gpu-CU_Mldk0.mjs} +1959 -198
- package/dist/gpu-CU_Mldk0.mjs.map +1 -0
- package/dist/index-B3tjyDJI.d.mts.map +1 -1
- package/dist/{index-h8TDu1qm.d.mts → index-Fj2XkP-o.d.mts} +1946 -938
- package/dist/index-Fj2XkP-o.d.mts.map +1 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/dist/integrations/ai-sdk.mjs +1 -1
- package/dist/integrations/langchain.mjs +1 -1
- package/dist/integrations/llamaindex.mjs +1 -1
- package/dist/integrations/mcp.d.mts +2 -2
- package/dist/integrations/mcp.mjs +4 -4
- package/dist/{mcp-CAsD7eCj.mjs → mcp-CdMvLQ_9.mjs} +3 -3
- package/dist/{mcp-CAsD7eCj.mjs.map → mcp-CdMvLQ_9.mjs.map} +1 -1
- package/dist/{moonshine-stt-BXoZaHJE.mjs → moonshine-stt-COJeK2Zb.mjs} +6348 -2000
- package/dist/moonshine-stt-COJeK2Zb.mjs.map +1 -0
- package/dist/moonshine-stt-Dp4j5JEB.mjs +4 -0
- package/dist/{one-liner-ppgw4jHH.mjs → one-liner-CMiGNWJ7.mjs} +2 -2
- package/dist/{one-liner-ppgw4jHH.mjs.map → one-liner-CMiGNWJ7.mjs.map} +1 -1
- package/dist/repl-BhaLCJFb.mjs +9 -0
- package/dist/skills/index.d.mts +4 -4
- package/dist/skills/index.mjs +3 -3
- package/dist/{skills-CQa1Gshd.mjs → skills-BXybFWlG.mjs} +2 -2
- package/dist/{skills-CQa1Gshd.mjs.map → skills-BXybFWlG.mjs.map} +1 -1
- package/dist/tune/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/architectures-DmZMEFsA.mjs.map +0 -1
- package/dist/defaults-DfGx4d1m.mjs.map +0 -1
- package/dist/gerbil-CTefAwKp.mjs +0 -4
- package/dist/gerbil-CYVmU8sQ.mjs.map +0 -1
- package/dist/gpu-CrzjQHv2.mjs.map +0 -1
- package/dist/index-h8TDu1qm.d.mts.map +0 -1
- package/dist/moonshine-stt-BXoZaHJE.mjs.map +0 -1
- package/dist/moonshine-stt-DZVnKgPO.mjs +0 -4
- package/dist/repl-C0Ew7_Z-.mjs +0 -9
package/README.md
CHANGED
|
@@ -121,6 +121,84 @@ Reports steady-state decode tok/s, time-to-first-token, and the device it ran on
|
|
|
121
121
|
For a copy-pasteable version see [`examples/benchmark.ts`](./examples/benchmark.ts)
|
|
122
122
|
(and the rest of [`examples/`](./examples/)).
|
|
123
123
|
|
|
124
|
+
### Batched decode & per-lane adapters (experimental, Node/Dawn)
|
|
125
|
+
|
|
126
|
+
On Node the engine can decode many sequences in one lockstep batch — and each lane
|
|
127
|
+
can run a **different LoRA adapter** over one shared base (SGMV-style). Both are
|
|
128
|
+
flag-gated and token-exact: every lane's output matches the same prompt run solo.
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
GERBIL_BATCH=4 GERBIL_BATCH_LORA=1 node my-batch-script.mjs
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
const engine = await WebGPUEngine.create({ repo: "mlx-community/Qwen3.5-0.8B-4bit" });
|
|
136
|
+
|
|
137
|
+
// Register adapters once — their factors are packed into shared GPU buffers,
|
|
138
|
+
// and any number of lanes can run them concurrently.
|
|
139
|
+
await engine.registerAdapter("pirate", "you/qwen3.5-0.8b-pirate-lora");
|
|
140
|
+
await engine.registerAdapter("legal", "you/qwen3.5-0.8b-legal-lora");
|
|
141
|
+
|
|
142
|
+
const results = await engine.generateBatch(
|
|
143
|
+
[promptA, promptB, promptC, promptD],
|
|
144
|
+
{
|
|
145
|
+
sampling: { temperature: 0 },
|
|
146
|
+
// Per-lane adapter selection: null = bare base model.
|
|
147
|
+
adapters: ["pirate", "pirate", "legal", null],
|
|
148
|
+
},
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
// The continuous-batching scheduler takes an adapter per request — mixed
|
|
152
|
+
// adapters, queueing, and slot reuse stay token-exact vs solo runs:
|
|
153
|
+
const scheduler = engine.createScheduler();
|
|
154
|
+
const reply = await scheduler.submit(prompt, {
|
|
155
|
+
sampling: { temperature: 0 },
|
|
156
|
+
adapter: "legal",
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
// And a swarm fans ONE input out across tuned members concurrently (MoTA
|
|
160
|
+
// mode B — one batched pass, default plan broadcasts, default reduce returns
|
|
161
|
+
// a member-keyed map):
|
|
162
|
+
const swarm = await engine.createSwarm({
|
|
163
|
+
members: { pirate: "you/pirate-lora", legal: "you/legal-lora", base: null },
|
|
164
|
+
});
|
|
165
|
+
const answers = await swarm.run(prompt, { sampling: { temperature: 0 } });
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
| Env flag | Effect |
|
|
169
|
+
|----------|--------|
|
|
170
|
+
| `GERBIL_BATCH=N` | Fixed lockstep batch of N lanes (`generateBatch`), greedy decode |
|
|
171
|
+
| `GERBIL_BATCH_LORA=1` | Enables `registerAdapter`, the per-lane `adapters` option, per-request `adapter` on `scheduler.submit`, and `createSwarm` |
|
|
172
|
+
| `GERBIL_GEMM_FAST=1` | Relaxed-parity f16-accumulate GEMM tier (faster aggregate) |
|
|
173
|
+
| `GERBIL_DECODE_WINDOW=K` | Records K decode steps per GPU submit (2–8; Vulkan-targeted) |
|
|
174
|
+
|
|
175
|
+
### Swarm quickstart
|
|
176
|
+
|
|
177
|
+
A swarm is a set of named specialists: LoRA adapters tuned on one shared base
|
|
178
|
+
model, plus optionally the bare base itself. All members decode together in one
|
|
179
|
+
batched pass on one GPU, so asking four specialists costs about as much as
|
|
180
|
+
asking the slowest one, not four times as much.
|
|
181
|
+
|
|
182
|
+
Try it with the runnable example (Node with the native GPU path):
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
node scripts/engine/example-swarm.mjs
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
With no configuration it finds tuned adapters in your local caches, or falls
|
|
189
|
+
back to generated demo adapters so you can see the mechanics either way. Point
|
|
190
|
+
it at your own tuned adapters like this:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
GERBIL_SWARM_MEMBERS="support=hf:you/support-lora,legal=hf:you/legal-lora" \
|
|
194
|
+
node scripts/engine/example-swarm.mjs
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
The example shows both patterns: routing different prompts to different
|
|
198
|
+
members, and broadcasting one input to every member with `swarm.run()`. In
|
|
199
|
+
your own scripts, batched adapter decode needs `GERBIL_BATCH=N` and
|
|
200
|
+
`GERBIL_BATCH_LORA=1` set (the example sets them for you).
|
|
201
|
+
|
|
124
202
|
## React Quickstart
|
|
125
203
|
|
|
126
204
|
`useEngine` (from `@tryhamster/gerbil/hooks`) owns the full engine lifecycle —
|
|
@@ -271,6 +349,30 @@ const engine = await WebGPUEngine.create({ repo: "nineninesix/kani-tts-2-en" });
|
|
|
271
349
|
const { pcm, sampleRate } = await engine.speak("Hello, I'm Gerbil!"); // sampleRate === 22050
|
|
272
350
|
```
|
|
273
351
|
|
|
352
|
+
**Streaming TTS** — native **Gepard-1.0** (Apache-2.0). Gepard is a stock Qwen3.5
|
|
353
|
+
codec-LM with 32 parallel FSQ classifier heads that emit one whole audio frame per
|
|
354
|
+
forward pass, so speech is frame synchronous: audio streams out chunk by chunk while
|
|
355
|
+
the model is still generating. Pass `onChunk` to receive PCM as it is produced.
|
|
356
|
+
|
|
357
|
+
```typescript
|
|
358
|
+
const engine = await WebGPUEngine.create({ repo: "nineninesix/gepard-1.0" });
|
|
359
|
+
const { pcm, sampleRate } = await engine.speak("Hello from Gepard.", {
|
|
360
|
+
temperature: 0.4,
|
|
361
|
+
onChunk: ({ pcm, frameIndex, isFinal }) => {
|
|
362
|
+
// play or buffer each ~1.5s chunk as soon as it is decoded
|
|
363
|
+
},
|
|
364
|
+
}); // sampleRate === 22050
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Run the end to end example and write a .wav:
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
node scripts/engine/example-gepard-tts.mjs "The quick brown fox jumps over the lazy dog."
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
Voice cloning (the reference speaker compressor) is present in the checkpoint but not
|
|
374
|
+
wired yet, so Gepard ships a single default voice for now.
|
|
375
|
+
|
|
274
376
|
**Speech-to-text** — native **Moonshine** (raw-waveform encoder/decoder, no FFT/log-mel)
|
|
275
377
|
via the dedicated `MoonshineSTT` class.
|
|
276
378
|
|
|
@@ -469,6 +571,7 @@ via `WebGPUEngine.create({ repo })`.
|
|
|
469
571
|
|-------|------|-------|
|
|
470
572
|
| **Qwen3.5-0.8B** | `mlx-community/Qwen3.5-0.8B-4bit` | Default text model; vision-capable (`Qwen/Qwen3.5-0.8B` for the ViT) |
|
|
471
573
|
| **Qwen3.5-2B** | `Qwen/Qwen3.5-2B` | Higher quality; 262k context; multimodal (vision-capable) |
|
|
574
|
+
| **Qwen3.5-4B** | `mlx-community/Qwen3.5-4B-4bit` | Highest quality that fits browser WebGPU (~2.5 GB INT4); 262k context; vision-capable; thinking |
|
|
472
575
|
| **LFM2.5-350M** | `LiquidAI/LFM2.5-350M` | Hybrid conv/attention, very fast, ~199 MB q4 |
|
|
473
576
|
| **Gemma 4 E2B** | `mlx-community/gemma-4-e2b-it-4bit` | PLE CPU-streamed; vision-capable |
|
|
474
577
|
|
|
@@ -490,6 +593,7 @@ via `WebGPUEngine.create({ repo })`.
|
|
|
490
593
|
| Model | Type | Repo | Notes |
|
|
491
594
|
|-------|------|------|-------|
|
|
492
595
|
| **Kani-TTS-2** | TTS | `nineninesix/kani-tts-2-en` | `engine.speak()` → 22.05 kHz PCM |
|
|
596
|
+
| **Gepard-1.0** | TTS | `nineninesix/gepard-1.0` | Streaming `engine.speak({ onChunk })` → 22.05 kHz PCM, Apache-2.0 |
|
|
493
597
|
| **Moonshine** | STT | `UsefulSensors/moonshine-base` | `MoonshineSTT.transcribe()`, raw-waveform |
|
|
494
598
|
|
|
495
599
|
### Quantization & dtype
|
|
@@ -445,6 +445,8 @@ function ncWeight(name) {
|
|
|
445
445
|
}
|
|
446
446
|
function generateNanoCodecDecoderGraph(opts) {
|
|
447
447
|
const T = opts.numFrames;
|
|
448
|
+
const upSampleRates = opts.geometry?.upSampleRates ?? NANOCODEC_UP_SAMPLE_RATES;
|
|
449
|
+
const inputDim = opts.geometry?.inputDim ?? NANOCODEC_INPUT_DIM;
|
|
448
450
|
const tensors = {};
|
|
449
451
|
const nodes = [];
|
|
450
452
|
const executionOrder = [];
|
|
@@ -455,31 +457,39 @@ function generateNanoCodecDecoderGraph(opts) {
|
|
|
455
457
|
nodes.push(node);
|
|
456
458
|
executionOrder.push(node.id);
|
|
457
459
|
};
|
|
458
|
-
addTensor({
|
|
459
|
-
name: "audio_codes",
|
|
460
|
-
shape: [FSQ_NUM_GROUPS, T],
|
|
461
|
-
dtype: "u32",
|
|
462
|
-
storage: "activation"
|
|
463
|
-
});
|
|
464
|
-
addTensor({
|
|
460
|
+
if (opts.latentInput) addTensor({
|
|
465
461
|
name: "nc_latent",
|
|
466
|
-
shape: [
|
|
462
|
+
shape: [inputDim, T],
|
|
467
463
|
dtype: "f32",
|
|
468
464
|
storage: "activation"
|
|
469
465
|
});
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
466
|
+
else {
|
|
467
|
+
addTensor({
|
|
468
|
+
name: "audio_codes",
|
|
469
|
+
shape: [FSQ_NUM_GROUPS, T],
|
|
470
|
+
dtype: "u32",
|
|
471
|
+
storage: "activation"
|
|
472
|
+
});
|
|
473
|
+
addTensor({
|
|
474
|
+
name: "nc_latent",
|
|
475
|
+
shape: [inputDim, T],
|
|
476
|
+
dtype: "f32",
|
|
477
|
+
storage: "activation"
|
|
478
|
+
});
|
|
479
|
+
addNode({
|
|
480
|
+
id: "nc_fsq",
|
|
481
|
+
opType: "FSQDequant",
|
|
482
|
+
inputs: ["audio_codes"],
|
|
483
|
+
outputs: ["nc_latent"],
|
|
484
|
+
attributes: {
|
|
485
|
+
groups: FSQ_NUM_GROUPS,
|
|
486
|
+
dims: FSQ_DIMS_PER_GROUP,
|
|
487
|
+
T,
|
|
488
|
+
levels: [...FSQ_LEVELS],
|
|
489
|
+
base: [...FSQ_BASE]
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
}
|
|
483
493
|
/** Emit a causal Conv1dFull (padding = (K-1)*dilation, Lout = L). */
|
|
484
494
|
function causalConv(id, input, weightKey, biasKey, Cin, Cout, K, L, dilation, output) {
|
|
485
495
|
addTensor({
|
|
@@ -619,11 +629,11 @@ function generateNanoCodecDecoderGraph(opts) {
|
|
|
619
629
|
});
|
|
620
630
|
}
|
|
621
631
|
let cur = "nc_pre_conv_out";
|
|
622
|
-
causalConv("nc_pre_conv", "nc_latent", ncWeight("pre_conv.weight"), ncWeight("pre_conv.bias"),
|
|
632
|
+
causalConv("nc_pre_conv", "nc_latent", ncWeight("pre_conv.weight"), ncWeight("pre_conv.bias"), inputDim, NANOCODEC_BASE_CHANNELS, 7, T, 1, cur);
|
|
623
633
|
let channels = NANOCODEC_BASE_CHANNELS;
|
|
624
634
|
let length = T;
|
|
625
|
-
for (let stage = 0; stage <
|
|
626
|
-
const rate =
|
|
635
|
+
for (let stage = 0; stage < upSampleRates.length; stage++) {
|
|
636
|
+
const rate = upSampleRates[stage];
|
|
627
637
|
const outCh = channels / 2;
|
|
628
638
|
const upK = 2 * rate;
|
|
629
639
|
const hsOut = `nc_s${stage}_act`;
|
|
@@ -681,7 +691,7 @@ function generateNanoCodecDecoderGraph(opts) {
|
|
|
681
691
|
architecture: "NanoCodecDecoder",
|
|
682
692
|
config: {
|
|
683
693
|
hidden_size: NANOCODEC_BASE_CHANNELS,
|
|
684
|
-
num_layers:
|
|
694
|
+
num_layers: upSampleRates.length,
|
|
685
695
|
num_heads: 0,
|
|
686
696
|
num_kv_heads: 0,
|
|
687
697
|
head_dim: 0,
|
|
@@ -704,7 +714,7 @@ function generateNanoCodecDecoderGraph(opts) {
|
|
|
704
714
|
tensors,
|
|
705
715
|
nodes,
|
|
706
716
|
executionOrder,
|
|
707
|
-
inputs: ["audio_codes"],
|
|
717
|
+
inputs: [opts.latentInput ? "nc_latent" : "audio_codes"],
|
|
708
718
|
outputs: [postConv]
|
|
709
719
|
};
|
|
710
720
|
}
|
|
@@ -5826,11 +5836,12 @@ function generateQwen3_5Graph(rawConfig, dtype, groupSizeOverride, kvDtype, _emb
|
|
|
5826
5836
|
const kv_dim = num_kv_heads * head_dim;
|
|
5827
5837
|
const layerTypes = textConfig.layer_types ?? [];
|
|
5828
5838
|
const fullAttentionInterval = textConfig.full_attention_interval ?? 4;
|
|
5829
|
-
const
|
|
5839
|
+
const mamba_num_k_heads = textConfig.linear_num_key_heads ?? 16;
|
|
5840
|
+
const mamba_num_v_heads = textConfig.linear_num_value_heads ?? mamba_num_k_heads;
|
|
5830
5841
|
const mamba_key_dim = textConfig.linear_key_head_dim ?? 128;
|
|
5831
5842
|
const mamba_val_dim = textConfig.linear_value_head_dim ?? 128;
|
|
5832
|
-
const mamba_qkv_dim =
|
|
5833
|
-
const mamba_out_dim =
|
|
5843
|
+
const mamba_qkv_dim = 2 * mamba_num_k_heads * mamba_key_dim + mamba_num_v_heads * mamba_val_dim;
|
|
5844
|
+
const mamba_out_dim = mamba_num_v_heads * mamba_val_dim;
|
|
5834
5845
|
const conv_kernel_dim = textConfig.linear_conv_kernel_dim ?? 4;
|
|
5835
5846
|
const ropeParams = textConfig.rope_parameters;
|
|
5836
5847
|
const rope_base = ropeParams?.rope_theta ?? textConfig.rope_theta ?? 1e7;
|
|
@@ -6450,13 +6461,13 @@ function generateQwen3_5Graph(rawConfig, dtype, groupSizeOverride, kvDtype, _emb
|
|
|
6450
6461
|
});
|
|
6451
6462
|
addTensor({
|
|
6452
6463
|
name: aProjOut,
|
|
6453
|
-
shape: ["T",
|
|
6464
|
+
shape: ["T", mamba_num_v_heads],
|
|
6454
6465
|
dtype: "f32",
|
|
6455
6466
|
storage: "activation"
|
|
6456
6467
|
});
|
|
6457
6468
|
addTensor({
|
|
6458
6469
|
name: bProjOut,
|
|
6459
|
-
shape: ["T",
|
|
6470
|
+
shape: ["T", mamba_num_v_heads],
|
|
6460
6471
|
dtype: "f32",
|
|
6461
6472
|
storage: "activation"
|
|
6462
6473
|
});
|
|
@@ -6467,8 +6478,8 @@ function generateQwen3_5Graph(rawConfig, dtype, groupSizeOverride, kvDtype, _emb
|
|
|
6467
6478
|
storage: "activation"
|
|
6468
6479
|
});
|
|
6469
6480
|
addLinearOp(`${prefix}_qkv_proj`, norm1Out, inProjQKV_W, [mamba_qkv_dim, hidden_size], qkvOut, hidden_size, mamba_qkv_dim);
|
|
6470
|
-
addLinearOp(`${prefix}_a_proj`, norm1Out, inProjA_W, [
|
|
6471
|
-
addLinearOp(`${prefix}_b_proj`, norm1Out, inProjB_W, [
|
|
6481
|
+
addLinearOp(`${prefix}_a_proj`, norm1Out, inProjA_W, [mamba_num_v_heads, hidden_size], aProjOut, hidden_size, mamba_num_v_heads);
|
|
6482
|
+
addLinearOp(`${prefix}_b_proj`, norm1Out, inProjB_W, [mamba_num_v_heads, hidden_size], bProjOut, hidden_size, mamba_num_v_heads);
|
|
6472
6483
|
addLinearOp(`${prefix}_z_proj`, norm1Out, inProjZ_W, [mamba_out_dim, hidden_size], zProjOut, hidden_size, mamba_out_dim);
|
|
6473
6484
|
const conv1dW = CANONICAL_KEYS.mambaConv1d(i);
|
|
6474
6485
|
addTensor({
|
|
@@ -6522,14 +6533,14 @@ function generateQwen3_5Graph(rawConfig, dtype, groupSizeOverride, kvDtype, _emb
|
|
|
6522
6533
|
const dtBiasW = CANONICAL_KEYS.mambaDtBias(i);
|
|
6523
6534
|
addTensor({
|
|
6524
6535
|
name: aLogW,
|
|
6525
|
-
shape: [
|
|
6536
|
+
shape: [mamba_num_v_heads],
|
|
6526
6537
|
dtype: "f32",
|
|
6527
6538
|
storage: "constant",
|
|
6528
6539
|
safetensorsKey: aLogW
|
|
6529
6540
|
});
|
|
6530
6541
|
addTensor({
|
|
6531
6542
|
name: dtBiasW,
|
|
6532
|
-
shape: [
|
|
6543
|
+
shape: [mamba_num_v_heads],
|
|
6533
6544
|
dtype: "f32",
|
|
6534
6545
|
storage: "constant",
|
|
6535
6546
|
safetensorsKey: dtBiasW
|
|
@@ -6538,7 +6549,7 @@ function generateQwen3_5Graph(rawConfig, dtype, groupSizeOverride, kvDtype, _emb
|
|
|
6538
6549
|
addTensor({
|
|
6539
6550
|
name: ssmState,
|
|
6540
6551
|
shape: [
|
|
6541
|
-
|
|
6552
|
+
mamba_num_v_heads,
|
|
6542
6553
|
mamba_key_dim,
|
|
6543
6554
|
mamba_val_dim
|
|
6544
6555
|
],
|
|
@@ -6565,7 +6576,8 @@ function generateQwen3_5Graph(rawConfig, dtype, groupSizeOverride, kvDtype, _emb
|
|
|
6565
6576
|
],
|
|
6566
6577
|
outputs: [ssmOut],
|
|
6567
6578
|
attributes: {
|
|
6568
|
-
num_heads:
|
|
6579
|
+
num_heads: mamba_num_v_heads,
|
|
6580
|
+
num_k_heads: mamba_num_k_heads,
|
|
6569
6581
|
key_dim: mamba_key_dim,
|
|
6570
6582
|
val_dim: mamba_val_dim,
|
|
6571
6583
|
qkv_dim: mamba_qkv_dim,
|
|
@@ -6767,4 +6779,4 @@ function isArchitectureSupported(name) {
|
|
|
6767
6779
|
|
|
6768
6780
|
//#endregion
|
|
6769
6781
|
export { kaniSinTensor as A, computeKaniPositions as C, kaniAttentionLayerIndices as D, generateNanoCodecDecoderGraph as E, CANONICAL_KEYS as F, DTYPE_BYTES as I, GEMMA4_VIS_KEYS as L, parseKaniConfig as M, DEFAULT_GROUP_SIZE as N, kaniCosTensor as O, quantizeInt4 as P, createDefaultHFKeyMapper as R, buildKaniLayerCosSin as S, generateKaniTtsGraph as T, moonshineEncoderFrames as _, PARLER_DAC_LATENT_DIM as a, KANI_START_OF_HUMAN as b, PARLER_SAMPLE_RATE as c, generateParlerEncoderGraph as d, parseParlerConfig as f, generateMoonshineEncoderGraph as g, generateMoonshineDecoderGraph as h, PARLER_DAC_DECODER_DIM as i, nanoCodecWeightMap as j, kaniLayerAlpha as k, buildT5RelativeBias as l, MOONSHINE_REMAINING_WORK as m, isArchitectureSupported as n, PARLER_DECODER_RATES as o, revertDelayPattern as p, PARLER_BOS_TOKEN_ID as r, PARLER_EOS_TOKEN_ID as s, generateGraph as t, generateParlerDecoderGraph as u, parseMoonshineConfig as v, foldNanoCodecWeightNorm as w, audioTokensToCodes as x, KANI_END_OF_HUMAN as y };
|
|
6770
|
-
//# sourceMappingURL=architectures-
|
|
6782
|
+
//# sourceMappingURL=architectures-DHwj9AQD.mjs.map
|