@aigentic/attention-unified-wasm 0.1.29

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.
@@ -0,0 +1,790 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ export class DagAttentionFactory {
5
+ private constructor();
6
+ free(): void;
7
+ [Symbol.dispose](): void;
8
+ /**
9
+ * Get available DAG attention types
10
+ */
11
+ static availableTypes(): any;
12
+ /**
13
+ * Get description for a DAG attention type
14
+ */
15
+ static getDescription(attention_type: string): string;
16
+ }
17
+
18
+ export class GraphAttentionFactory {
19
+ private constructor();
20
+ free(): void;
21
+ [Symbol.dispose](): void;
22
+ /**
23
+ * Get recommended use cases for a graph attention type
24
+ */
25
+ static getUseCases(attention_type: string): any;
26
+ /**
27
+ * Get available graph attention types
28
+ */
29
+ static availableTypes(): any;
30
+ /**
31
+ * Get description for a graph attention type
32
+ */
33
+ static getDescription(attention_type: string): string;
34
+ }
35
+
36
+ /**
37
+ * Graph attention mechanism types
38
+ */
39
+ export enum GraphAttentionType {
40
+ /**
41
+ * Graph Attention Networks (Velickovic et al., 2018)
42
+ */
43
+ GAT = 0,
44
+ /**
45
+ * Graph Convolutional Networks (Kipf & Welling, 2017)
46
+ */
47
+ GCN = 1,
48
+ /**
49
+ * GraphSAGE (Hamilton et al., 2017)
50
+ */
51
+ GraphSAGE = 2,
52
+ }
53
+
54
+ export class HybridMambaAttention {
55
+ free(): void;
56
+ [Symbol.dispose](): void;
57
+ /**
58
+ * Create a new hybrid Mamba-Attention layer
59
+ */
60
+ constructor(config: MambaConfig, local_window: number);
61
+ /**
62
+ * Forward pass
63
+ */
64
+ forward(input: Float32Array, seq_len: number): Float32Array;
65
+ /**
66
+ * Get local window size
67
+ */
68
+ readonly localWindow: number;
69
+ }
70
+
71
+ export class MambaConfig {
72
+ free(): void;
73
+ [Symbol.dispose](): void;
74
+ /**
75
+ * Set state space dimension
76
+ */
77
+ withStateDim(state_dim: number): MambaConfig;
78
+ /**
79
+ * Set expansion factor
80
+ */
81
+ withExpandFactor(factor: number): MambaConfig;
82
+ /**
83
+ * Set convolution kernel size
84
+ */
85
+ withConvKernelSize(size: number): MambaConfig;
86
+ /**
87
+ * Create a new Mamba configuration
88
+ */
89
+ constructor(dim: number);
90
+ /**
91
+ * Model dimension (d_model)
92
+ */
93
+ dim: number;
94
+ /**
95
+ * State space dimension (n)
96
+ */
97
+ state_dim: number;
98
+ /**
99
+ * Expansion factor for inner dimension
100
+ */
101
+ expand_factor: number;
102
+ /**
103
+ * Convolution kernel size
104
+ */
105
+ conv_kernel_size: number;
106
+ /**
107
+ * Delta (discretization step) range minimum
108
+ */
109
+ dt_min: number;
110
+ /**
111
+ * Delta range maximum
112
+ */
113
+ dt_max: number;
114
+ /**
115
+ * Whether to use learnable D skip connection
116
+ */
117
+ use_d_skip: boolean;
118
+ }
119
+
120
+ export class MambaSSMAttention {
121
+ free(): void;
122
+ [Symbol.dispose](): void;
123
+ /**
124
+ * Create with default configuration
125
+ */
126
+ static withDefaults(dim: number): MambaSSMAttention;
127
+ /**
128
+ * Compute attention-like scores (for visualization/analysis)
129
+ *
130
+ * Returns pseudo-attention scores showing which positions influence output
131
+ */
132
+ getAttentionScores(input: Float32Array, seq_len: number): Float32Array;
133
+ /**
134
+ * Create a new Mamba SSM attention layer
135
+ */
136
+ constructor(config: MambaConfig);
137
+ /**
138
+ * Forward pass through Mamba SSM
139
+ *
140
+ * # Arguments
141
+ * * `input` - Input sequence (seq_len, dim) flattened to 1D
142
+ * * `seq_len` - Sequence length
143
+ *
144
+ * # Returns
145
+ * Output sequence (seq_len, dim) flattened to 1D
146
+ */
147
+ forward(input: Float32Array, seq_len: number): Float32Array;
148
+ /**
149
+ * Get the configuration
150
+ */
151
+ readonly config: MambaConfig;
152
+ /**
153
+ * Get the inner dimension
154
+ */
155
+ readonly innerDim: number;
156
+ }
157
+
158
+ export class UnifiedAttention {
159
+ free(): void;
160
+ [Symbol.dispose](): void;
161
+ /**
162
+ * Check if this mechanism supports graph/DAG structures
163
+ */
164
+ supportsGraphs(): boolean;
165
+ /**
166
+ * Check if this mechanism supports sequence processing
167
+ */
168
+ supportsSequences(): boolean;
169
+ /**
170
+ * Check if this mechanism supports hyperbolic geometry
171
+ */
172
+ supportsHyperbolic(): boolean;
173
+ /**
174
+ * Create a new unified attention selector
175
+ */
176
+ constructor(mechanism: string);
177
+ /**
178
+ * Get the category of the selected mechanism
179
+ */
180
+ readonly category: string;
181
+ /**
182
+ * Get the currently selected mechanism type
183
+ */
184
+ readonly mechanism: string;
185
+ }
186
+
187
+ export class WasmCausalConeAttention {
188
+ free(): void;
189
+ [Symbol.dispose](): void;
190
+ /**
191
+ * Create a new causal cone attention instance
192
+ *
193
+ * # Arguments
194
+ * * `future_discount` - Discount for future nodes
195
+ * * `ancestor_weight` - Weight for ancestor influence
196
+ */
197
+ constructor(future_discount: number, ancestor_weight: number);
198
+ /**
199
+ * Compute attention scores for the DAG
200
+ */
201
+ forward(dag: WasmQueryDag): Float32Array;
202
+ }
203
+
204
+ export class WasmCriticalPathAttention {
205
+ free(): void;
206
+ [Symbol.dispose](): void;
207
+ /**
208
+ * Create a new critical path attention instance
209
+ *
210
+ * # Arguments
211
+ * * `path_weight` - Weight for critical path membership
212
+ * * `branch_penalty` - Penalty for branching nodes
213
+ */
214
+ constructor(path_weight: number, branch_penalty: number);
215
+ /**
216
+ * Compute attention scores for the DAG
217
+ */
218
+ forward(dag: WasmQueryDag): Float32Array;
219
+ }
220
+
221
+ export class WasmFlashAttention {
222
+ free(): void;
223
+ [Symbol.dispose](): void;
224
+ /**
225
+ * Create a new flash attention instance
226
+ *
227
+ * # Arguments
228
+ * * `dim` - Embedding dimension
229
+ * * `block_size` - Block size for tiled computation
230
+ */
231
+ constructor(dim: number, block_size: number);
232
+ /**
233
+ * Compute flash attention
234
+ */
235
+ compute(query: Float32Array, keys: any, values: any): Float32Array;
236
+ }
237
+
238
+ export class WasmGNNLayer {
239
+ free(): void;
240
+ [Symbol.dispose](): void;
241
+ /**
242
+ * Create a new GNN layer with attention
243
+ *
244
+ * # Arguments
245
+ * * `input_dim` - Dimension of input node embeddings
246
+ * * `hidden_dim` - Dimension of hidden representations
247
+ * * `heads` - Number of attention heads
248
+ * * `dropout` - Dropout rate (0.0 to 1.0)
249
+ */
250
+ constructor(input_dim: number, hidden_dim: number, heads: number, dropout: number);
251
+ /**
252
+ * Forward pass through the GNN layer
253
+ *
254
+ * # Arguments
255
+ * * `node_embedding` - Current node's embedding (Float32Array)
256
+ * * `neighbor_embeddings` - Embeddings of neighbor nodes (array of Float32Arrays)
257
+ * * `edge_weights` - Weights of edges to neighbors (Float32Array)
258
+ *
259
+ * # Returns
260
+ * Updated node embedding (Float32Array)
261
+ */
262
+ forward(node_embedding: Float32Array, neighbor_embeddings: any, edge_weights: Float32Array): Float32Array;
263
+ /**
264
+ * Get the output dimension
265
+ */
266
+ readonly outputDim: number;
267
+ }
268
+
269
+ export class WasmHierarchicalLorentzAttention {
270
+ free(): void;
271
+ [Symbol.dispose](): void;
272
+ /**
273
+ * Create a new hierarchical Lorentz attention instance
274
+ *
275
+ * # Arguments
276
+ * * `curvature` - Hyperbolic curvature parameter
277
+ * * `temperature` - Temperature for softmax
278
+ */
279
+ constructor(curvature: number, temperature: number);
280
+ /**
281
+ * Compute attention scores for the DAG
282
+ */
283
+ forward(dag: WasmQueryDag): Float32Array;
284
+ }
285
+
286
+ export class WasmHyperbolicAttention {
287
+ free(): void;
288
+ [Symbol.dispose](): void;
289
+ /**
290
+ * Create a new hyperbolic attention instance
291
+ *
292
+ * # Arguments
293
+ * * `dim` - Embedding dimension
294
+ * * `curvature` - Hyperbolic curvature parameter (negative for hyperbolic space)
295
+ */
296
+ constructor(dim: number, curvature: number);
297
+ /**
298
+ * Compute hyperbolic attention
299
+ */
300
+ compute(query: Float32Array, keys: any, values: any): Float32Array;
301
+ /**
302
+ * Get the curvature parameter
303
+ */
304
+ readonly curvature: number;
305
+ }
306
+
307
+ export class WasmLinearAttention {
308
+ free(): void;
309
+ [Symbol.dispose](): void;
310
+ /**
311
+ * Create a new linear attention instance
312
+ *
313
+ * # Arguments
314
+ * * `dim` - Embedding dimension
315
+ * * `num_features` - Number of random features for kernel approximation
316
+ */
317
+ constructor(dim: number, num_features: number);
318
+ /**
319
+ * Compute linear attention
320
+ */
321
+ compute(query: Float32Array, keys: any, values: any): Float32Array;
322
+ }
323
+
324
+ export class WasmLocalGlobalAttention {
325
+ free(): void;
326
+ [Symbol.dispose](): void;
327
+ /**
328
+ * Create a new local-global attention instance
329
+ *
330
+ * # Arguments
331
+ * * `dim` - Embedding dimension
332
+ * * `local_window` - Size of local attention window
333
+ * * `global_tokens` - Number of global attention tokens
334
+ */
335
+ constructor(dim: number, local_window: number, global_tokens: number);
336
+ /**
337
+ * Compute local-global attention
338
+ */
339
+ compute(query: Float32Array, keys: any, values: any): Float32Array;
340
+ }
341
+
342
+ export class WasmMinCutGatedAttention {
343
+ free(): void;
344
+ [Symbol.dispose](): void;
345
+ /**
346
+ * Create a new MinCut-gated attention instance
347
+ *
348
+ * # Arguments
349
+ * * `gate_threshold` - Threshold for gating (0.0-1.0)
350
+ */
351
+ constructor(gate_threshold: number);
352
+ /**
353
+ * Compute attention scores for the DAG
354
+ */
355
+ forward(dag: WasmQueryDag): Float32Array;
356
+ }
357
+
358
+ export class WasmMoEAttention {
359
+ free(): void;
360
+ [Symbol.dispose](): void;
361
+ /**
362
+ * Create a new MoE attention instance
363
+ *
364
+ * # Arguments
365
+ * * `dim` - Embedding dimension
366
+ * * `num_experts` - Number of expert attention mechanisms
367
+ * * `top_k` - Number of experts to activate per query
368
+ */
369
+ constructor(dim: number, num_experts: number, top_k: number);
370
+ /**
371
+ * Compute MoE attention
372
+ */
373
+ compute(query: Float32Array, keys: any, values: any): Float32Array;
374
+ }
375
+
376
+ export class WasmMultiHeadAttention {
377
+ free(): void;
378
+ [Symbol.dispose](): void;
379
+ /**
380
+ * Create a new multi-head attention instance
381
+ *
382
+ * # Arguments
383
+ * * `dim` - Embedding dimension (must be divisible by num_heads)
384
+ * * `num_heads` - Number of parallel attention heads
385
+ */
386
+ constructor(dim: number, num_heads: number);
387
+ /**
388
+ * Compute multi-head attention
389
+ *
390
+ * # Arguments
391
+ * * `query` - Query vector
392
+ * * `keys` - Array of key vectors
393
+ * * `values` - Array of value vectors
394
+ */
395
+ compute(query: Float32Array, keys: any, values: any): Float32Array;
396
+ /**
397
+ * Get the embedding dimension
398
+ */
399
+ readonly dim: number;
400
+ /**
401
+ * Get the dimension per head
402
+ */
403
+ readonly headDim: number;
404
+ /**
405
+ * Get the number of attention heads
406
+ */
407
+ readonly numHeads: number;
408
+ }
409
+
410
+ export class WasmParallelBranchAttention {
411
+ free(): void;
412
+ [Symbol.dispose](): void;
413
+ /**
414
+ * Create a new parallel branch attention instance
415
+ *
416
+ * # Arguments
417
+ * * `max_branches` - Maximum number of branches to consider
418
+ * * `sync_penalty` - Penalty for synchronization between branches
419
+ */
420
+ constructor(max_branches: number, sync_penalty: number);
421
+ /**
422
+ * Compute attention scores for the DAG
423
+ */
424
+ forward(dag: WasmQueryDag): Float32Array;
425
+ }
426
+
427
+ export class WasmQueryDag {
428
+ free(): void;
429
+ [Symbol.dispose](): void;
430
+ /**
431
+ * Create a new empty DAG
432
+ */
433
+ constructor();
434
+ /**
435
+ * Serialize to JSON
436
+ */
437
+ toJson(): string;
438
+ /**
439
+ * Add an edge between nodes
440
+ *
441
+ * # Arguments
442
+ * * `from` - Source node ID
443
+ * * `to` - Target node ID
444
+ *
445
+ * # Returns
446
+ * True if edge was added successfully
447
+ */
448
+ addEdge(from: number, to: number): boolean;
449
+ /**
450
+ * Add a node with operator type and cost
451
+ *
452
+ * # Arguments
453
+ * * `op_type` - Operator type: "scan", "filter", "join", "aggregate", "project", "sort"
454
+ * * `cost` - Estimated execution cost
455
+ *
456
+ * # Returns
457
+ * Node ID
458
+ */
459
+ addNode(op_type: string, cost: number): number;
460
+ /**
461
+ * Get the number of edges
462
+ */
463
+ readonly edgeCount: number;
464
+ /**
465
+ * Get the number of nodes
466
+ */
467
+ readonly nodeCount: number;
468
+ }
469
+
470
+ export class WasmSearchConfig {
471
+ free(): void;
472
+ [Symbol.dispose](): void;
473
+ /**
474
+ * Create a new search configuration
475
+ */
476
+ constructor(k: number, temperature: number);
477
+ /**
478
+ * Number of top results to return
479
+ */
480
+ k: number;
481
+ /**
482
+ * Temperature for softmax
483
+ */
484
+ temperature: number;
485
+ }
486
+
487
+ export class WasmTemporalBTSPAttention {
488
+ free(): void;
489
+ [Symbol.dispose](): void;
490
+ /**
491
+ * Create a new temporal BTSP attention instance
492
+ *
493
+ * # Arguments
494
+ * * `eligibility_decay` - Decay rate for eligibility traces (0.0-1.0)
495
+ * * `baseline_attention` - Baseline attention for nodes without history
496
+ */
497
+ constructor(eligibility_decay: number, baseline_attention: number);
498
+ /**
499
+ * Compute attention scores for the DAG
500
+ */
501
+ forward(dag: WasmQueryDag): Float32Array;
502
+ }
503
+
504
+ export class WasmTensorCompress {
505
+ free(): void;
506
+ [Symbol.dispose](): void;
507
+ /**
508
+ * Decompress a compressed tensor
509
+ */
510
+ decompress(compressed: any): Float32Array;
511
+ /**
512
+ * Compress with explicit compression level
513
+ *
514
+ * # Arguments
515
+ * * `embedding` - The input embedding vector
516
+ * * `level` - Compression level: "none", "half", "pq8", "pq4", "binary"
517
+ */
518
+ compressWithLevel(embedding: Float32Array, level: string): any;
519
+ /**
520
+ * Get compression ratio estimate for a given access frequency
521
+ */
522
+ getCompressionRatio(access_freq: number): number;
523
+ /**
524
+ * Create a new tensor compressor
525
+ */
526
+ constructor();
527
+ /**
528
+ * Compress an embedding based on access frequency
529
+ *
530
+ * # Arguments
531
+ * * `embedding` - The input embedding vector
532
+ * * `access_freq` - Access frequency in range [0.0, 1.0]
533
+ * - f > 0.8: Full precision (hot data)
534
+ * - f > 0.4: Half precision (warm data)
535
+ * - f > 0.1: 8-bit PQ (cool data)
536
+ * - f > 0.01: 4-bit PQ (cold data)
537
+ * - f <= 0.01: Binary (archive)
538
+ */
539
+ compress(embedding: Float32Array, access_freq: number): any;
540
+ }
541
+
542
+ export class WasmTopologicalAttention {
543
+ free(): void;
544
+ [Symbol.dispose](): void;
545
+ /**
546
+ * Create a new topological attention instance
547
+ *
548
+ * # Arguments
549
+ * * `decay_factor` - Decay factor for position-based attention (0.0-1.0)
550
+ */
551
+ constructor(decay_factor: number);
552
+ /**
553
+ * Compute attention scores for the DAG
554
+ *
555
+ * # Returns
556
+ * Attention scores for each node
557
+ */
558
+ forward(dag: WasmQueryDag): Float32Array;
559
+ }
560
+
561
+ /**
562
+ * Get information about all available attention mechanisms
563
+ */
564
+ export function availableMechanisms(): any;
565
+
566
+ /**
567
+ * Compute cosine similarity between two vectors
568
+ */
569
+ export function cosineSimilarity(a: Float32Array, b: Float32Array): number;
570
+
571
+ /**
572
+ * Get summary statistics about the unified attention library
573
+ */
574
+ export function getStats(): any;
575
+
576
+ /**
577
+ * Differentiable search using soft attention mechanism
578
+ *
579
+ * # Arguments
580
+ * * `query` - The query vector
581
+ * * `candidate_embeddings` - List of candidate embedding vectors
582
+ * * `config` - Search configuration
583
+ *
584
+ * # Returns
585
+ * Object with indices and weights for top-k candidates
586
+ */
587
+ export function graphDifferentiableSearch(query: Float32Array, candidate_embeddings: any, config: WasmSearchConfig): any;
588
+
589
+ /**
590
+ * Hierarchical forward pass through multiple GNN layers
591
+ *
592
+ * # Arguments
593
+ * * `query` - The query vector
594
+ * * `layer_embeddings` - Embeddings organized by layer
595
+ * * `gnn_layers` - Array of GNN layers
596
+ *
597
+ * # Returns
598
+ * Final embedding after hierarchical processing
599
+ */
600
+ export function graphHierarchicalForward(query: Float32Array, layer_embeddings: any, gnn_layers: WasmGNNLayer[]): Float32Array;
601
+
602
+ /**
603
+ * Initialize the WASM module with panic hook for better error messages
604
+ */
605
+ export function init(): void;
606
+
607
+ /**
608
+ * Compute scaled dot-product attention
609
+ *
610
+ * Standard transformer attention: softmax(QK^T / sqrt(d)) * V
611
+ *
612
+ * # Arguments
613
+ * * `query` - Query vector (Float32Array)
614
+ * * `keys` - Array of key vectors (JsValue - array of Float32Arrays)
615
+ * * `values` - Array of value vectors (JsValue - array of Float32Arrays)
616
+ * * `scale` - Optional scaling factor (defaults to 1/sqrt(dim))
617
+ *
618
+ * # Returns
619
+ * Attention-weighted output vector
620
+ */
621
+ export function scaledDotAttention(query: Float32Array, keys: any, values: any, scale?: number | null): Float32Array;
622
+
623
+ /**
624
+ * Softmax normalization
625
+ */
626
+ export function softmax(values: Float32Array): Float32Array;
627
+
628
+ /**
629
+ * Temperature-scaled softmax
630
+ */
631
+ export function temperatureSoftmax(values: Float32Array, temperature: number): Float32Array;
632
+
633
+ /**
634
+ * Get the version of the unified attention WASM crate
635
+ */
636
+ export function version(): string;
637
+
638
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
639
+
640
+ export interface InitOutput {
641
+ readonly memory: WebAssembly.Memory;
642
+ readonly __wbg_dagattentionfactory_free: (a: number, b: number) => void;
643
+ readonly __wbg_get_mambaconfig_conv_kernel_size: (a: number) => number;
644
+ readonly __wbg_get_mambaconfig_dim: (a: number) => number;
645
+ readonly __wbg_get_mambaconfig_dt_max: (a: number) => number;
646
+ readonly __wbg_get_mambaconfig_dt_min: (a: number) => number;
647
+ readonly __wbg_get_mambaconfig_expand_factor: (a: number) => number;
648
+ readonly __wbg_get_mambaconfig_state_dim: (a: number) => number;
649
+ readonly __wbg_get_mambaconfig_use_d_skip: (a: number) => number;
650
+ readonly __wbg_get_wasmsearchconfig_temperature: (a: number) => number;
651
+ readonly __wbg_hybridmambaattention_free: (a: number, b: number) => void;
652
+ readonly __wbg_mambaconfig_free: (a: number, b: number) => void;
653
+ readonly __wbg_mambassmattention_free: (a: number, b: number) => void;
654
+ readonly __wbg_set_mambaconfig_conv_kernel_size: (a: number, b: number) => void;
655
+ readonly __wbg_set_mambaconfig_dim: (a: number, b: number) => void;
656
+ readonly __wbg_set_mambaconfig_dt_max: (a: number, b: number) => void;
657
+ readonly __wbg_set_mambaconfig_dt_min: (a: number, b: number) => void;
658
+ readonly __wbg_set_mambaconfig_expand_factor: (a: number, b: number) => void;
659
+ readonly __wbg_set_mambaconfig_state_dim: (a: number, b: number) => void;
660
+ readonly __wbg_set_mambaconfig_use_d_skip: (a: number, b: number) => void;
661
+ readonly __wbg_set_wasmsearchconfig_temperature: (a: number, b: number) => void;
662
+ readonly __wbg_unifiedattention_free: (a: number, b: number) => void;
663
+ readonly __wbg_wasmcausalconeattention_free: (a: number, b: number) => void;
664
+ readonly __wbg_wasmflashattention_free: (a: number, b: number) => void;
665
+ readonly __wbg_wasmgnnlayer_free: (a: number, b: number) => void;
666
+ readonly __wbg_wasmhyperbolicattention_free: (a: number, b: number) => void;
667
+ readonly __wbg_wasmlinearattention_free: (a: number, b: number) => void;
668
+ readonly __wbg_wasmmincutgatedattention_free: (a: number, b: number) => void;
669
+ readonly __wbg_wasmmoeattention_free: (a: number, b: number) => void;
670
+ readonly __wbg_wasmmultiheadattention_free: (a: number, b: number) => void;
671
+ readonly __wbg_wasmquerydag_free: (a: number, b: number) => void;
672
+ readonly __wbg_wasmtensorcompress_free: (a: number, b: number) => void;
673
+ readonly availableMechanisms: () => number;
674
+ readonly cosineSimilarity: (a: number, b: number, c: number, d: number, e: number) => void;
675
+ readonly dagattentionfactory_availableTypes: () => number;
676
+ readonly dagattentionfactory_getDescription: (a: number, b: number, c: number) => void;
677
+ readonly getStats: () => number;
678
+ readonly graphDifferentiableSearch: (a: number, b: number, c: number, d: number, e: number) => void;
679
+ readonly graphHierarchicalForward: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
680
+ readonly graphattentionfactory_availableTypes: () => number;
681
+ readonly graphattentionfactory_getDescription: (a: number, b: number, c: number) => void;
682
+ readonly graphattentionfactory_getUseCases: (a: number, b: number) => number;
683
+ readonly hybridmambaattention_forward: (a: number, b: number, c: number, d: number, e: number) => void;
684
+ readonly hybridmambaattention_localWindow: (a: number) => number;
685
+ readonly hybridmambaattention_new: (a: number, b: number) => number;
686
+ readonly mambaconfig_new: (a: number) => number;
687
+ readonly mambaconfig_withConvKernelSize: (a: number, b: number) => number;
688
+ readonly mambaconfig_withExpandFactor: (a: number, b: number) => number;
689
+ readonly mambaconfig_withStateDim: (a: number, b: number) => number;
690
+ readonly mambassmattention_config: (a: number) => number;
691
+ readonly mambassmattention_forward: (a: number, b: number, c: number, d: number, e: number) => void;
692
+ readonly mambassmattention_getAttentionScores: (a: number, b: number, c: number, d: number, e: number) => void;
693
+ readonly mambassmattention_innerDim: (a: number) => number;
694
+ readonly mambassmattention_new: (a: number) => number;
695
+ readonly mambassmattention_withDefaults: (a: number) => number;
696
+ readonly scaledDotAttention: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
697
+ readonly softmax: (a: number, b: number, c: number) => void;
698
+ readonly temperatureSoftmax: (a: number, b: number, c: number, d: number) => void;
699
+ readonly unifiedattention_category: (a: number, b: number) => void;
700
+ readonly unifiedattention_mechanism: (a: number, b: number) => void;
701
+ readonly unifiedattention_new: (a: number, b: number, c: number) => void;
702
+ readonly unifiedattention_supportsGraphs: (a: number) => number;
703
+ readonly unifiedattention_supportsHyperbolic: (a: number) => number;
704
+ readonly unifiedattention_supportsSequences: (a: number) => number;
705
+ readonly version: (a: number) => void;
706
+ readonly wasmcausalconeattention_forward: (a: number, b: number, c: number) => void;
707
+ readonly wasmcriticalpathattention_forward: (a: number, b: number, c: number) => void;
708
+ readonly wasmflashattention_compute: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
709
+ readonly wasmflashattention_new: (a: number, b: number) => number;
710
+ readonly wasmgnnlayer_forward: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
711
+ readonly wasmgnnlayer_new: (a: number, b: number, c: number, d: number, e: number) => void;
712
+ readonly wasmgnnlayer_outputDim: (a: number) => number;
713
+ readonly wasmhierarchicallorentzattention_forward: (a: number, b: number, c: number) => void;
714
+ readonly wasmhyperbolicattention_compute: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
715
+ readonly wasmhyperbolicattention_curvature: (a: number) => number;
716
+ readonly wasmhyperbolicattention_new: (a: number, b: number) => number;
717
+ readonly wasmlinearattention_compute: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
718
+ readonly wasmlinearattention_new: (a: number, b: number) => number;
719
+ readonly wasmlocalglobalattention_compute: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
720
+ readonly wasmlocalglobalattention_new: (a: number, b: number, c: number) => number;
721
+ readonly wasmmincutgatedattention_forward: (a: number, b: number, c: number) => void;
722
+ readonly wasmmoeattention_compute: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
723
+ readonly wasmmoeattention_new: (a: number, b: number, c: number) => number;
724
+ readonly wasmmultiheadattention_compute: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
725
+ readonly wasmmultiheadattention_dim: (a: number) => number;
726
+ readonly wasmmultiheadattention_headDim: (a: number) => number;
727
+ readonly wasmmultiheadattention_new: (a: number, b: number, c: number) => void;
728
+ readonly wasmmultiheadattention_numHeads: (a: number) => number;
729
+ readonly wasmparallelbranchattention_forward: (a: number, b: number, c: number) => void;
730
+ readonly wasmquerydag_addEdge: (a: number, b: number, c: number) => number;
731
+ readonly wasmquerydag_addNode: (a: number, b: number, c: number, d: number) => number;
732
+ readonly wasmquerydag_edgeCount: (a: number) => number;
733
+ readonly wasmquerydag_new: () => number;
734
+ readonly wasmquerydag_nodeCount: (a: number) => number;
735
+ readonly wasmquerydag_toJson: (a: number, b: number) => void;
736
+ readonly wasmtemporalbtspattention_forward: (a: number, b: number, c: number) => void;
737
+ readonly wasmtensorcompress_compress: (a: number, b: number, c: number, d: number, e: number) => void;
738
+ readonly wasmtensorcompress_compressWithLevel: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
739
+ readonly wasmtensorcompress_decompress: (a: number, b: number, c: number) => void;
740
+ readonly wasmtensorcompress_getCompressionRatio: (a: number, b: number) => number;
741
+ readonly wasmtensorcompress_new: () => number;
742
+ readonly wasmtopologicalattention_forward: (a: number, b: number, c: number) => void;
743
+ readonly init: () => void;
744
+ readonly wasmmincutgatedattention_new: (a: number) => number;
745
+ readonly wasmtopologicalattention_new: (a: number) => number;
746
+ readonly __wbg_set_wasmsearchconfig_k: (a: number, b: number) => void;
747
+ readonly wasmcausalconeattention_new: (a: number, b: number) => number;
748
+ readonly wasmcriticalpathattention_new: (a: number, b: number) => number;
749
+ readonly wasmhierarchicallorentzattention_new: (a: number, b: number) => number;
750
+ readonly wasmparallelbranchattention_new: (a: number, b: number) => number;
751
+ readonly wasmsearchconfig_new: (a: number, b: number) => number;
752
+ readonly wasmtemporalbtspattention_new: (a: number, b: number) => number;
753
+ readonly __wbg_get_wasmsearchconfig_k: (a: number) => number;
754
+ readonly __wbg_graphattentionfactory_free: (a: number, b: number) => void;
755
+ readonly __wbg_wasmcriticalpathattention_free: (a: number, b: number) => void;
756
+ readonly __wbg_wasmhierarchicallorentzattention_free: (a: number, b: number) => void;
757
+ readonly __wbg_wasmlocalglobalattention_free: (a: number, b: number) => void;
758
+ readonly __wbg_wasmparallelbranchattention_free: (a: number, b: number) => void;
759
+ readonly __wbg_wasmsearchconfig_free: (a: number, b: number) => void;
760
+ readonly __wbg_wasmtemporalbtspattention_free: (a: number, b: number) => void;
761
+ readonly __wbg_wasmtopologicalattention_free: (a: number, b: number) => void;
762
+ readonly __wbindgen_export: (a: number, b: number) => number;
763
+ readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
764
+ readonly __wbindgen_export3: (a: number) => void;
765
+ readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
766
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
767
+ readonly __wbindgen_start: () => void;
768
+ }
769
+
770
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
771
+
772
+ /**
773
+ * Instantiates the given `module`, which can either be bytes or
774
+ * a precompiled `WebAssembly.Module`.
775
+ *
776
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
777
+ *
778
+ * @returns {InitOutput}
779
+ */
780
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
781
+
782
+ /**
783
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
784
+ * for everything else, calls `WebAssembly.instantiate` directly.
785
+ *
786
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
787
+ *
788
+ * @returns {Promise<InitOutput>}
789
+ */
790
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;