@openfluke/welvet 0.3.0 → 0.75.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/dist/types.js CHANGED
@@ -1,4 +1,65 @@
1
1
  /**
2
- * Type definitions for LOOM WASM API
2
+ * welvet — Type Definitions for the M-POLY-VTD AI Engine
3
+ *
4
+ * Wraps the Loom v0.75.0 WASM module which supports 21 numerical types,
5
+ * systolic grid propagation, target propagation, and WebGPU acceleration.
3
6
  */
4
- export {};
7
+ // ──────────────────────────────────────────────────────────────────────────────
8
+ // Numerical Type Constants (matches poly.DType)
9
+ // ──────────────────────────────────────────────────────────────────────────────
10
+ export const DType = {
11
+ FLOAT64: 0,
12
+ FLOAT32: 1,
13
+ FLOAT16: 2,
14
+ BFLOAT16: 3,
15
+ FP8_E4M3: 4,
16
+ FP8_E5M2: 5,
17
+ INT64: 6,
18
+ INT32: 7,
19
+ INT16: 8,
20
+ INT8: 9,
21
+ UINT64: 10,
22
+ UINT32: 11,
23
+ UINT16: 12,
24
+ UINT8: 13,
25
+ INT4: 14,
26
+ UINT4: 15,
27
+ FP4: 16,
28
+ INT2: 17,
29
+ UINT2: 18,
30
+ TERNARY: 19,
31
+ BINARY: 20,
32
+ };
33
+ // ──────────────────────────────────────────────────────────────────────────────
34
+ // Layer Type Constants (matches poly.LayerType)
35
+ // ──────────────────────────────────────────────────────────────────────────────
36
+ export const LayerType = {
37
+ DENSE: 0,
38
+ RMS_NORM: 1,
39
+ LAYER_NORM: 2,
40
+ MHA: 3,
41
+ SOFTMAX: 4,
42
+ SWIGLU: 5,
43
+ EMBEDDING: 6,
44
+ RESIDUAL: 7,
45
+ KMEANS: 8,
46
+ RNN: 9,
47
+ LSTM: 10,
48
+ CNN1: 11,
49
+ CNN2: 12,
50
+ CNN3: 13,
51
+ CONV_TRANSPOSED_1D: 14,
52
+ CONV_TRANSPOSED_2D: 15,
53
+ CONV_TRANSPOSED_3D: 16,
54
+ };
55
+ // ──────────────────────────────────────────────────────────────────────────────
56
+ // Activation Type Constants (matches poly.ActivationType)
57
+ // ──────────────────────────────────────────────────────────────────────────────
58
+ export const Activation = {
59
+ RELU: 0,
60
+ SILU: 1,
61
+ GELU: 2,
62
+ TANH: 3,
63
+ SIGMOID: 4,
64
+ LINEAR: 5,
65
+ };