Network Architectures

tinymind provides a range of neural network architectures, all as header-only C++ templates with both fixed-point and floating-point support.

Architecture Memory (Q8.8, trainable) Key Advantage
LSTM, GRU & Liquid (LTC/CfC) 952 / 808 bytes Sequential data, temporal patterns; continuous-time cells for irregular sampling
Kolmogorov-Arnold Networks 1,200 bytes Learnable activation functions
Conv & Pooling Layers 1,825 bytes (1D pipeline) 1D time-series + 2D spectrogram/image feature extraction, MobileNet-style separable blocks
Linear Self-Attention ~6 KB (mid-range) Sequence dependency modeling without O(N^2)
FFT Layer 768 bytes (64-pt Q8.8) Frequency-domain feature extraction
Quantized Networks 128 bytes (packed binary) 32-64x weight compression
Int8 Affine Quantization int8 weights + int32 accum TFLite/CMSIS-NN style post-training int8 across dense/conv/pool/BN/LN/softmax/RNN/attention/FFT
Mixed Precision int8 + fp16 + bf16 bridges qbridge converters between int8 affine / QValue Q-format / float / fp16 / bf16
SIMD Backends n/a (perf, not capacity) ISA-capability gates: NEON / SVE / Helium / AVX2 / AVX-512, byte-identical to scalar
Mixture of Experts router + N resident experts Decouples compute from capacity: 1 of N experts runs per inference (top-1), or k-of-N softmax-blended
Transformer Decoder (seq2seq) O(1) linear KV state / growing softmax cache Causal self-attention, cross-attention to encoder memory, autoregressive decode that matches the full-sequence pass byte-for-byte
State-Space (S4-lite) O(1) per-step state, any length Diagonal linear-recurrent sequence model (LTI + input-gated “selective”); streaming step() matches the full-sequence pass byte-for-byte
Decision Trees & GBDT int8 compare + branch, no MACs Single trees + gradient-boosted ensembles for tabular data; quantized thresholds preserve splits exactly
Neuro-Fuzzy (ANFIS) 448 bytes (16-rule Q16.16) Takagi-Sugeno rules learned from data, with per-rule firing strengths readable back after every inference
On-Device Fine-Tuning Heads 792 / 784 bytes (32-value embedding, 6 classes, Q16.16) DenseHead and PrototypeHead adapt a frozen model on the device from a few labelled samples, with no backpropagation through the model

Table of contents


Back to top

Dan McLeran — danmcleran@gmail.com — MIT License

This site uses Just the Docs, a documentation theme for Jekyll.