@dniskav/neuron 0.2.6 → 0.2.7

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.
Files changed (2) hide show
  1. package/README.md +25 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -3,6 +3,28 @@
3
3
 
4
4
  A minimal, dependency-free neural network library built from scratch in TypeScript. Designed for learning and experimentation — every line of math is readable.
5
5
 
6
+ Each class is a building block for the next: from a single neuron to a full Transformer with causal attention.
7
+
8
+ ```mermaid
9
+ graph TD
10
+ A["Neuron\n1 input · 1 weight · 1 bias"]
11
+ B["NeuronN\nN inputs · Xavier init · configurable activation"]
12
+ C["Layer\ngroup of NeuronN sharing the same inputs"]
13
+ D["Network\nhidden + output · backprop"]
14
+ E["NetworkN\narbitrary depth · define as [inputs, ...hidden, outputs]"]
15
+ F["LSTMLayer\nrecurrent · hidden + cell state · BPTT"]
16
+ G["NetworkLSTM\nLSTM + dense layers · sequence memory"]
17
+ H["AttentionHead\nQ · K · V · scaled dot-product"]
18
+ I["MultiHeadAttention\nN heads in parallel"]
19
+ J["TransformerBlock\nattention + FFN + LayerNorm × 2 + residuals"]
20
+ K["NetworkTransformer\nembeddings → blocks → per-token logits"]
21
+ L["NetworkTransformerRL\ncontinuous projection → causal attention → Q-values"]
22
+
23
+ A --> B --> C --> D --> E
24
+ E --> F --> G
25
+ E --> H --> I --> J --> K --> L
26
+ ```
27
+
6
28
  ## What's inside
7
29
 
8
30
  | Export | Description |
@@ -311,6 +333,9 @@ const attnWeights = net.getAttentionWeights();
311
333
 
312
334
  ## Changelog
313
335
 
336
+ ### v0.2.7
337
+ - **Docs:** Added architecture diagram to README — visual progression from `Neuron` to `NetworkTransformerRL`
338
+
314
339
  ### v0.2.6
315
340
  - **Fix:** `Network.predict` now returns `number[]` (consistent with all other network classes)
316
341
  - **Fix:** `Network.train` now uses the configured optimizer and `activation.dfn()` instead of hardcoded SGD and sigmoid derivative
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dniskav/neuron",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Minimal neural network from scratch — neuron, layer, network, backpropagation. No dependencies.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",