Releases

Every tinymind release, newest first. This page is generated from GitHub Releases each time the site is built; each release there also carries the source archives.

v18.6 — Lookup tables that hold across the whole format, logit-ranked classifiers, and a wider ONNX importer

Released 2026-11-21 · v18.6 on GitHub

Fixes

  • The exp table no longer wraps in narrow formats (#288). The table generator converted each value straight to the table’s storage type, which wrapped when the format could not hold it. In Q8.8 the last nine exp entries were garbage, so exp(5.0) came out negative; the same overflow hit every format with fewer than 10 integer bits, stored cos(0) as -1 in every Q1 format and overflowed log in the Q1 and Q2 formats. Entries now saturate, and every in-range entry is unchanged.
  • log, sin and cos reduce their input instead of clamping it (#291, fixes #289 and #290). These three used the same 96-knot table over [-6, 6) as the activations. log interpolated every input below 0.125 toward 0, so the cross-entropy loss fell as a prediction became more confidently wrong (0.166 at p = 0.01 instead of 4.605), and sin and cos returned the value at 5.875 for every input of 6 or more. The new cpp/lookupFunctions.hpp writes x as m * 2^e and reads log(m) from a 65-entry table over [1, 2], and it reduces sin and cos by pi/2 into a 65-entry quarter-wave table. In Q16.16, log is within 8e-5 of std::log for every positive input, and sin and cos are within 1.2e-4 of std::sin and std::cos over the whole range of the format. CrossEntropyLossCalculator and the fixed-point dual numbers use them.

New features

  • getPredictedClass() ranks classifier outputs by their logits (#293). The fixed-point sigmoid table is flat beyond ±6, so confident outputs tie there and an argmax over getLearnedValues() can only pick the first of them. NeuralNetwork::getOutputPreActivations() returns the output layer’s logits, bit-exact with what the layer computed and at no extra memory, and getPredictedClass() returns their argmax. The gas_sensor_drift, iris, optical_digits and har_activity examples now use it. Over 10 seeds, gas_sensor_drift’s batch-10 accuracy rises from 0.726 to 0.766 and improves on every seed; optical_digits improves slightly, and iris and har_activity are unchanged.
  • The ONNX importer covers residual CNNs (#286). It now maps depthwise convolution to QDepthwiseConv2D, MaxPool to QMaxPool2D, average and global average pooling to a QDepthwiseConv2D that averages and changes grid in one rounding, a residual Add to QAdd, and QLinearSoftmax to a softmax record. A new layer-graph check refuses a model in which a layer reads a tensor in a different grid from the one the previous layer wrote, which used to import silently and compute something else, and each record lists the layers it reads. This was contributed as a patch from the tinymind-rs port of the importer.

Removed

  • The 128-bit lookup tables (#292, fixes #287). They did not compile, and no format could read them, since QValue caps a format at 64 bits. The six cpp/*Values128Bit.hpp headers are deleted, and cpp/lookupTables.cpp shrinks from about 145,000 lines to 59,000. All 8- to 64-bit tables are byte-identical.

Upgrade notes

  • log, sin and cos now return different, correct values outside the old table range, and the log and trig tables hold 65 entries instead of 96. Cross-entropy losses reported during training change accordingly.
  • Code that included a *Values128Bit.hpp header directly no longer compiles; no build could have used those tables.

Docs

  • docs/activation-luts.md describes saturation, the log and trig table layout and the table sizes; docs/neural-networks.md explains how to pick a class; the README and the Pages index give the real 64-bit format ceiling and the table sizes (#294).

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v18.5…v18.6

v18.5 — The int16 FFTs run about twice as fast on Cortex-M4

Released 2026-11-16 · v18.5 on GitHub

Faster FFTs, same output (#284, #285)

  • QFFT1D is 1.75 to 2.32 times faster on a Cortex-M4F (NUCLEO-F411RE, -O3, N = 64 to 1,024) and QRFFT1D 1.64 to 2.00 times. A 256-point real-input transform now takes 0.24 ms at 100 MHz, down from 0.47 ms in v18.4. On a Cortex-M0+ (NUCLEO-L031K6) QFFT1D is 1.04 to 1.33 times faster at -O3 and 1.03 to 1.57 times at -O2.
  • FFT1D<Q8.8> is 1.08 to 1.36 times faster on the Cortex-M4F at -O3 and 1.15 to 1.23 times on the Cortex-M0+.
  • Every output is bit-identical to v18.4’s: forward, inverse and real-input, for every N from 2 to 4,096 (QFFT1D, QRFFT1D) and for Q8.8, Q16.16, float and double (FFT1D). The on-board benchmark checks each transform’s output against the host before it records a timing.

What was slow

  • The int16 saturation, written as early-return compares, compiled to four compare-and-branch pairs per butterfly. It is now one SSAT where the compiler reports the instruction (__ARM_FEATURE_SAT, as on the Cortex-M4) and a conditional elsewhere.
  • GCC kept the stage and group bookkeeping in registers and spilled the butterfly’s own values to the stack, and how much depended on the transform length and even on unrelated code: one build of QFFT1D<64> did 16 stack accesses per butterfly, another 1. Each stage is now its own out-of-line function with three values live across the inner loop, so the cost per butterfly is smooth in N: 46 to 53 cycles for QFFT1D on the Cortex-M4F, down from 78 to 114.
  • Two Cortex-M0+ figures are slower, which the benchmark README lists: QRFFT1D<128> at -O3 by 0.1%, and QFFT1D<512> with the twiddle tables in RAM by 5%.

Benchmark and docs

  • benchmarks/fft_onboard gains IMG=fft1d, which times FFT1D<Q8.8> with host-checked output.
  • The FFT page’s “ARM Cortex-M0 Performance Estimates” table claimed about 22,000 cycles for a 256-point Q8.8 transform. Measured on the Cortex-M0+ it was 219,379 at -O2 (202,696 after #285); the page now shows measured figures for both boards. Its conclusion, that a 256-point FFT keeps up with a 1 kHz sample rate on a small M0+, still holds.
  • QRFFT1D is now 1.98 to 2.23 times faster than QFFT1D, down from about 2.3 in v18.4, because QFFT1D gained more.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v18.4…v18.5

v18.4 — QRFFT1D, a real-input FFT at about twice the speed, and LSTM import from PyTorch

Released 2026-11-15 · v18.4 on GitHub

Real-input FFT: QRFFT1D (#281, #282)

  • QRFFT1D<N> takes N real int16 samples and returns the N/2 + 1 distinct bins, scaled by 1/N like QFFT1D<N>::forward, from the same buildQFFTTwiddles(N) table. Audio, vibration and IMU front ends no longer pay for a zeroed imaginary buffer and a mirrored half spectrum.
  • Measured on the boards (cycles per forward transform, -O3, median of 33 runs, output bit-exact with the host): 2.25 to 2.32 times faster than QFFT1D on a Cortex-M4F (NUCLEO-F411RE, N = 64 to 1,024) and 1.99 to 2.47 times on a Cortex-M0+ (NUCLEO-L031K6, N = 64 to 512). At N = 256 it takes 0.47 ms instead of 1.07 ms on the 100 MHz M4F, and 2.4 ms instead of 5.2 ms on the 32 MHz M0+.
  • No int16 input can saturate it. Packing two real samples into one complex value lets an inner component reach √2 times full scale; QRFFT1D takes that headroom in the first inner stage, whose twiddle is exactly 1. The cost is a largest bin error about 1.3 to 1.7 times QFFT1D’s, a few LSB of the 16-bit spectrum.
  • Tests check every bin against an exact DFT and against QFFT1D for N = 4 to 256; eight planted defects each fail them. The FFT fuzz harness checks it on every input, with six new corpus inputs that trap a layout that saturates.
  • New benchmarks/fft_onboard reproduces the timings on both boards at -O2 and -O3, with the twiddle tables in flash or RAM, and refuses to record a run whose output differs from the host’s.

PyTorch importer: models that start with one nn.LSTM (#279)

  • LSTM.from_state_dict turns an nn.LSTM state dict into a descriptor that maps onto QLSTMCell, with int16 (default) or int8 cell state, per-gate symmetric int8 weights in PyTorch’s gate order, and biases quantized the way quantizeQLSTMBiases does. Stacked, bidirectional and projected LSTMs are refused, as is an LSTM anywhere but first.
  • New examples/import_lstm_demo imports a 3-input, 8-unit LSTM with a linear head and compares 16 held-out 24-step sequences against a float reference written apart from the importer: max output error 0.063 with the int16 cell and 0.074 with the int8 cell.

Smaller fixes (#280)

  • The FFT bit-reversal tables use the narrowest index type that fits: at N = 256 each table drops from 1,024 to 256 bytes of memory. The permutation is unchanged.
  • q15Mul’s comment wrongly said its -32768 × -32768 corner overflows and never occurs; both claims are corrected and the corner is now tested.
  • examples/air_quality stops at the first epoch in which no sample trains (epoch 28 instead of 15,000). Its forecast is byte-identical and the run drops from 18.4 s to 0.04 s.

Docs

  • docs/architectures/fft.md documents QRFFT1D with the on-board timing table; README lists the LSTM descriptor in the importer entry (#283).

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v18.3…v18.4

v18.3 — on-device fine-tuning heads

Released 2026-11-13 · v18.3 on GitHub

New features

  • Head-only fine-tuning. Two standalone heads adapt a frozen model on the device from a few labelled samples, without backpropagating through the model (#277).
    • DenseHead (cpp/densehead.hpp) is a trainable dense layer with a softmax cross-entropy loss (the default) or a squared-error loss. Its SGD step rounds learning rate × gradient to nearest like every other trainable layer, and the update is fused into the backward pass, so its RAM is only its parameters: 792 bytes for a 32-value embedding and 6 classes in Q16.16. backward() returns the gradient with respect to the embedding for callers that also adapt layers in front of the head. In fixed point the softmax gives probability 0 to classes more than 6 behind the largest logit, beyond the exp table; otherwise the gradient never reaches zero and a well-separated head grows its logits until the format wraps.
    • PrototypeHead (cpp/prototypehead.hpp) is a gradient-free nearest-class-mean classifier: one running mean per class, an optional count cap that turns it into a moving average, and squared-Euclidean or Manhattan distance. It needs no learning rate or epochs, and a class can be added at any time.
    • The squared-error DenseHead and both PrototypeHead distances run at TINYMIND_ENABLE_FLOAT=0, TINYMIND_ENABLE_STD=0, and are exercised in every embedded gate corner.

Examples

  • gas_sensor_drift now corrects the drift it shows. The trained 128→32→6 MLP is split into a frozen backbone and a head (bit-exact on the hidden layer), and seven ways to adapt to each drifted batch are compared from 1 to 20 labelled samples per class. Over data seeds 1 to 10, batch 10 accuracy rises from 0.766 unadapted to 0.985 with a PrototypeHead and to 0.936 with head-only fine-tuning from one sample per class (0.988 from five). Training the backbone’s biases as well adds almost nothing, and re-normalizing the inputs from the whole unlabelled batch reaches 0.924, because by batch 10 the drift has flipped the sign of some features’ gain. After adapting, the DenseHead still classifies the original batch perfectly while the PrototypeHead has partly forgotten it. The data is synthetic and cleanly separable, so this is a demonstration on one drift model, not a general ranking.

Docs

  • A new on-device fine-tuning guide covers the API, how to choose between the heads, memory against training the whole network (an inference-only model plus a head needs 28% of the RAM), and what the application still owns: saving the adapted head, forgetting, and label quality.
  • The heads are listed on the Pages landing table and the architectures overview (#278), and the gallery has the new adaptation plot.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v18.2…v18.3

v18.2 — int8 residual adds at a third of CMSIS-NN’s cycles, and the Cortex-M0+ dense speed restored

Released 2026-11-12 · v18.2 on GitHub

Performance

  • QAdd rescales each input in one rounding (#273). TFLite ADD rescales both inputs with a two-step rounding and a branch on the shift’s sign. When the parameters allow it, which covers every int8 input at TFLite’s left_shift of 20, QAdd now composes the two roundings into one 64-bit multiply-add and a shift, and requantizes the sum with the single-rounding requantizer the convolutions already use. Other parameters take the reference loop, kept out of line with a new TINYMIND_NOINLINE macro so that forward() stays small enough to inline and a const layer keeps its parameters folded as constants. On the NUCLEO-F411RE the three residual adds of the MLPerf Tiny ResNet-8 take 21%, 37% and 42% fewer cycles, a third of CMSIS-NN’s, and the whole model 1.2% fewer, bit-exact. A QAdd whose parameters sit in RAM runs in about half the cycles, and on the Cortex-M0+ QAdd is 10% faster.
  • Cortex-M0+ dense layers get their speed back (#275). The L031 MLP benchmark had been running 36% slower at -O2 since #230 (35,637 to 48,619 cycles). The dense layers call the requantizer once per output, and its rarely taken saturating path, though never executed, kept GCC from giving the dot product the registers it needed on Thumb-1. Under the new TINYMIND_SPLIT_REQUANTIZER_FORMS, on by default for GCC on Thumb-1 only, QDense and the single-pixel pointwise layers check once per layer whether every requantizer takes the one-rounding path (Requantizer::oneRounding()) and then run a copy of the loop that calls applyOneRounding(). The MLP now takes 33,010 cycles at -O2 and 32,644 at -O3, faster than before #230 at both levels, bit-exact. Other compilers and cores measured slower with the split and compile to the same code as before.
  • Member reads hoisted out of store loops (#272). An int8_t store may alias the layer object itself, so a member read inside such a loop is reloaded on every element. QAdd, QPad2D and QEmbedding now copy their fields into locals first, as the convolutions already did: with the layer in RAM, QPad2D is 10% faster and QEmbedding 20% faster. The same change was measured and dropped where it gained nothing, and for QAvgPool2D, where it made the layer 7% slower.

Verification

  • The CBMC requantizer proof gains 32 jobs proving QAdd’s one-rounding input step free of undefined behaviour and equal to the gemmlowp reference for every input, zero point, left shift and multiplier in its domain, with two new planted defects that must be caught (#273).
  • The quantization suite compares QAdd with the reference arithmetic over all 65,536 input pairs for 480 parameter sets, and builds with the split dense loops on, so every dense test runs them; new tests check applyOneRounding() against apply() for four storage types (#273, #275).

Benchmarks

  • Every table on the benchmarks page is re-measured on both boards. With the SMLAD backend, tinymind takes 16.4% fewer cycles than TFLM with CMSIS-NN on the MLPerf Tiny keyword-spotting model and 29.4% fewer on image classification (#274).
  • make TOOLCHAIN=clang builds the tinymind images with Clang through a new clang-arm-cxx wrapper, which adds -munaligned-access (without it the SMLAD backend’s word loads become byte loads) and -fshort-enums. Every Clang image is bit-exact with the GCC build; GCC is 3–45% faster, and the page says so (#274).
  • The bench harness’s idle loops were undefined behaviour in C++ (an empty infinite loop), which Clang deleted; they now hold an empty asm volatile, and the GCC images compile to identical code (#274).

Docs and CI

  • The agent instructions are split into one AGENTS.md per area, with CLAUDE.md importing them (#270), and the har_activity seed statistic is corrected (#269).
  • The CI apt installer falls back to mirrors outside Canonical’s network when the default archive is unreachable (#271).
  • README, the Pages site and the architecture notes describe QAdd’s one-rounding inputs and the Thumb-1 dense split (#276).

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v18.1…v18.2

v18.1 — Q8.8 training works again: fixed-point SGD steps round to nearest

Released 2026-11-10 · v18.1 on GitHub

Fix

  • Fixed-point SGD no longer drifts downward. The learningRate x gradient step was rounded with the format’s own rounding policy. The default TruncatePolicy floors, so a step smaller than one LSB became 0 when positive and a full -1 LSB when negative, and every weight with a small gradient drifted down by about half an LSB per training step. In Q8.8 that swamps the gradient: after v18.0 removed a momentum bug that had been masking it, the xor example built in Q8.8 learned XOR from only 25 of 100 seeds (2 of 100 at learning rate 0.1 with momentum 0.9). It now learns from 100 of 100 in both settings, and from 99 of 100 with no momentum. (#267)
  • The gradient step now rounds to nearest, with ties away from zero, at every SGD update: NeuralNetwork weights, gated weights and biases, KAN, and the standalone Conv1D, Conv2D, DepthwiseConv2D, PointwiseConv2D, SelfAttention1D, BatchNorm1D, BinaryDense and TernaryDense layers. The momentum and acceleration terms still round toward zero, as in v18.0, so a delta that no gradient refreshes decays to exactly zero.
  • Rounding the gradient step toward zero was tried first and rejected: its one-LSB dead zone stalled recurrent Q16.16 training. Rounding to nearest halves the dead zone and keeps the step symmetric in sign.
  • New header cpp/include/tinymind_rounding.hpp holds multiplyRoundNearest and multiplyRoundTowardZero; the QValue overloads live in qformat.hpp. Floating-point training and int8 inference are bit-identical to v18.0.

Examples

  • har_activity: the learning rate goes from 0.05 to 0.1. The old value had been tuned against the downward drift; with unbiased steps it left 8 of 10 seeds at chance. At 0.1, mean test accuracy over seeds 1 to 10 is 0.90 ± 0.10 with no seed at chance, against 0.76 ± 0.16 with three at chance before. The default seed scores 76.5% (it was 92.5%, the best of the old seeds), and the docs report both numbers.
  • dqn_maze: the network’s Q values are now within 0.0005 RMS of the exact optimum Q*, down from 0.0017.
  • The other fixed-point examples move within seed noise (10-seed means): predictive_maintenance on the real AI4I CSV gives precision / recall / F1 of 0.65 / 0.80 / 0.71 (was 0.67 / 0.78 / 0.72). Examples that use RoundUpPolicy (lstm_sinusoid, lstm_sinusoid_float, elman_temporal_xor) are bit-identical.

Tests

  • unit_test/nn/sgd_step_rounding_tests.hpp drives exact gradients through every standalone layer, and checks that every LSTM, GRU, self-attention and KAN parameter moves by exactly its gradient step rounded to nearest. A Q8.8 xor case must learn from 20 of 20 seeds. Planting either the old floor or a toward-zero step fails a test at every update site.

Docs

  • docs/neural-networks.md documents the rounding rules; the affected example pages, READMEs and 15 plots are re-measured and regenerated.
  • The README project tree lists the new header. (#268)

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v18.0…v18.1

v18.0 — Every trainable model audited: what was learning by accident, and the fixes

Released 2026-11-10 · v18.0 on GitHub

v17.0 found that LSTM and GRU gates had never trained while the examples still looked good. That raised the question of what else was producing good results without training correctly, so every trainable component in tinymind was audited. Each parameter’s update was compared with central finite differences of the library’s own forward pass, every parameter group was checked to move during training, each example was compared with a trivial baseline and with the same model training only its readout, and every check was shown to catch a planted defect before it was trusted.

The core held up: plain gradient descent for feed-forward networks, single-layer LSTM, GRU and Elman networks, the convolution, pooling and attention layers, KAN, the PINN and its automatic differentiation, LTC, CfC, the ANFIS trainer and the PyTorch and tree importers all train every parameter with the correct gradient. The defects were in the add-ons around that core, and four published results depended on them.

This is a major release: some APIs changed and some removed features never worked. If you trained a model with Adam, RMSprop, batching, stacked recurrent layers, Q-learning or DQN, retrain it.

Results that depended on a bug

  • elman_vowels: 96.76% → 92.97%. Its per-utterance reset stopped working in v17.0, so context leaked from one utterance into the next during training and evaluation. With a real reset, float, Q16.16 and Q8.8 agree on all 370 test utterances at 92.97%.
  • maze and dqn_maze found shortest paths with the wrong Q values. The update learned from the exploring policy’s random next action instead of the best one, and the DQN skipped training whenever its error was inside the fixed-point zero tolerance, which froze it after about 200 of 10,000 episodes. Both now learn the optimal Q values (maze within 0.0007, dqn_maze 0.0017 RMS, against 2.15 and 3.07 before) and still take a shortest path in 100 of 100 runs.
  • energy_efficiency lost to linear regression because it skipped training on any sample within the zero tolerance. Without that gate: test R² 0.903 / 0.883 → 0.958 / 0.924 (heating / cooling), MAE 2.80 / 2.77 → 1.69 / 1.95.
  • lstm_sinusoid_float stopped training for the same reason, so training only the readout beat training everything. Training every step: one-step RMS 0.044 → 0.0058.

Library fixes

  • Fixed-point momentum never let a weight change decay. The momentum terms were rounded with the format’s own rounding policy, so 0.5 times a one-LSB change rounded back to one LSB and repeated forever: affected weights drifted by an LSB on every step whatever the gradient, which saturated long recurrent runs. The momentum products now round toward zero; floating-point results are bit-identical. Every fixed-point example that trains with momentum was re-measured: gas_sensor_drift on its most-drifted batch 0.734 → 0.792, optical_digits 1729 → 1732 of 1797, predictive_maintenance F1 0.805 → 0.798 on synthetic data and 0.657 → 0.692 on the real UCI CSV, air_quality MAE 0.0672 → 0.0692, gru_xor 0.0606 → 0.0590.
  • Adam and RMSprop never updated any bias, including gate biases; Adam advanced its timestep once per layer instead of once per update; weight decay was ignored under both. All fixed. Fixed-point defaults are now correct in every Q format (they were Q8.8 raw values, giving Adam β1 = 0.0035 in Q16.16), fixed-point Adam’s bias correction no longer stops at step 100, and gradient clipping is symmetric and covers biases. Fixed-point Adam now defaults to β2 = 0.99 and ε = sqrt(LSB/(1−β2)) because the textbook constants round small gradients to zero; the float optimizer keeps the textbook values.
  • Stacked recurrent layers (HiddenLayers<A,B> with LSTM, GRU or Elman) now train every weight; before, the inner layers’ gates and input weights never moved and their recurrent weights were never initialised. resetState() clears every layer, setWeights copies every weight, and weight files keep every weight at full precision.
  • BatchSize > 1 now applies the mean gradient once per batch, biases included. Before, it applied a stale average on every sample and did not compile under -Werror.
  • Activations: the softmax classifier output trained in the wrong direction; GELU’s derivative was taken at the output instead of the input; CappedReluActivationPolicy did not cap. All fixed.
  • Layers: BatchNorm1D returned the wrong input gradient and normalised across one sample’s features; it now has a batch API with per-feature statistics and an exact gradient, and its single-sample path computes the same function in training and inference. BinaryDense clips latent weights to [−1, 1] so they cannot freeze. Xavier “normal” initialisation now draws from a normal distribution.
  • Q-learning: updateFromExperience uses experience.state; exploration probability is exactly p/100; learning rate and discount factor of 1.0 are accepted; the DQN target network starts as a copy of the online network; ties between two actions are broken at random.
  • std::vector<QValue> compiles at C++17 and C++20.

Breaking changes

  • cpp/truncatedBPTT.hpp is removed. It trained once every K steps on the last target only; training uses one-step truncation.
  • RecurrentConnectionDepth other than 1 no longer compiles; it never had any effect.
  • BatchNorm1D gains a MaxBatchSize parameter and forwardBatch/backwardBatch; its single-sample path normalises with running statistics.
  • resetState() moved to the base network class.
  • Weight files for recurrent networks, and for feed-forward networks whose hidden layers differ in size, use a new layout (the old files were missing weights).
  • Fixed-point Adam, RMSprop, learning-rate schedule and weight-decay defaults changed.

Export and import

  • PyTorch GRU export produced a model that tinymind computed differently (PyTorch 4/4 on XOR, tinymind 1/4). The exporter now converts the update-gate convention and keeps the one bias tinymind cannot represent at zero during training; parity is 3e-13 in double.
  • ONNX importer silently produced no layers for ONNX Runtime’s default QDQ format and dropped dense layers in QOperator models. It now reads both, emits the layouts tinymind’s layers expect, and refuses anything it cannot map exactly; int8 outputs match ONNX Runtime within 1 LSB.

Examples made honest

  • har_activity could be solved without recurrence. Two of its classes are now time-reversals of each other: 92.5% test accuracy, against 50% for readout-only and 52.5% for a nearest-centroid baseline.
  • lstm_sinusoid is now scored on a held-out signal: one-step RMS 0.0076, free-run 0.011.
  • cfc_sequence now needs its time step: the full model beats one that ignores it by 11.4x.
  • anfis_mackey_glass_int8 calibrates from the training split only (int8 RMSE 0.008566); import_demo trains properly (held-out MSE 2.3e-6); kan_xor now fails when it does not learn.

Docs

  • docs/size-comparison.md is now generated by tools/size_report/. Instance sizes are unchanged; a ratio table that divided by the wrong network is corrected, and the GCC/Clang code-size snapshot, stale since August, is current.
  • Every changed example has its README, Pages page and dark-theme plot updated.

How the fixes are verified

  • Every fix has a regression test that fails when the fix is reverted.
  • New finite-difference gradient checks cover stacked recurrent networks, Adam and RMSprop on every weight and bias, softmax and GELU outputs and BatchNorm1D. Q-learning is checked against value-iteration optimal values, and fixed-point momentum is checked to decay to zero.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v17.0…v18.0

v17.0 — Recurrent networks train every weight; DQN reads the right state

Released 2026-11-10 · v17.0 on GitHub

This release fixes training in the recurrent networks and in deep Q-learning. Both changed what a trained model learns, so the major version moves: if you trained an LstmNeuralNetwork, GruNeuralNetwork, ElmanNeuralNetwork or a DQN with QValueNeuralNetworkPolicy, retrain it. The int8 layers, the importers and inference-only code are unchanged.

Fixes

  • LSTM and GRU gates never trained (cpp/neuralnet.hpp, #257). The call that turns the hidden layer’s error into one delta per gate was dropped in an April refactor, so every gate delta stayed 0: the input, input-bias and recurrent weights never changed, and only the hidden-to-output readout learned. The gates now train. The hidden-to-output bias of LSTM and GRU networks, which was also never trained, now trains too.
  • Recurrent state and gradients (#257). The forward pass wrote each neuron’s new output into the recurrent layer while later neurons were still reading it, so they saw a mix of this step’s and last step’s state, and the recurrent gradients used this step’s state instead of last step’s. Each layer now reads h_{t-1} consistently and keeps it for the gradients.
  • Fixed-point GRU and LSTM arithmetic (#257). The GRU computed 1 - z with ValueType(1), which for a QValue is the raw value 2^-16, not 1.0; the LSTM gate deltas did the same. The GRU candidate’s recurrent weights were also missing the reset gate in their gradient.
  • Resetting state (#257). LstmNeuralNetwork::resetState cleared the cell state but not h_{t-1}, so sequences bled into each other. It now clears both, and Elman and RecurrentNeuralNetwork networks get a resetState.
  • DQN read Q values for the wrong state (cpp/qlearn.hpp, #258). QValueNeuralNetworkPolicy::getQValue(state, action) ignored the state and returned the network’s outputs for whichever state it had last seen, so greedy action selection and the Q-learning update both used another state’s values. It now evaluates the state it is asked about.
  • Greedy choice with negative Q values (#258). With three or more valid actions, ArgMaxPolicy treated 0 as a floor, so when every Q value was negative it gave up and the learner moved at random. It now picks the largest Q value whatever its sign, and moves at random only when every action is tied, which keeps the tabular maze, whose Q table starts at 0, exploring as before.

How the fixes are verified

  • One training step of an LSTM, a GRU and an Elman network in double precision matches central finite differences to 1e-7 for every weight.
  • Q16.16 and double networks with the same weights produce the same outputs to within 0.01.
  • Six planted defects (each bug above, put back one at a time) each fail at least one of the new tests.
  • New Q-learning tests cover negative and tied Q values and per-state DQN values; three of their checks fail on v16.9.

Examples

  • har_activity: 97.5% → 100% test accuracy.
  • gru_xor: final four-case error 0.088 → 0.061.
  • air_quality: one-step forecast MAE 0.129 → 0.067.
  • elman_vowels: 94.05% → 96.76%, with Q8.8 still matching the float model exactly.
  • elman_temporal_xor: had been at chance (51%) since v16.3’s lookup-table fix while its docs still said 98.33%. It now trains at a learning rate of 0.1 (the default failed on 3 of 18 seeds) and scores 100%.
  • dqn_maze: its earlier 100/100 depended on the wrong-state reads; with correct Q values it reached the goal in 63 of 100 greedy runs. The state is now one-hot encoded and the output layer is linear (Q values reach 5, beyond tanh’s range), and it reaches the goal in 100 of 100, on a shortest path from every room.
  • The LSTM sinusoid unit tests now check one-step-ahead accuracy, which improved, instead of a 20-step free-running forecast, which drifts further in phase now that the gates train.

All of these were found while porting tinymind to Rust, where tinymind-rs’s parity tests require both implementations to produce the same model.

Docs

  • Example READMEs, their Pages pages and eight gallery plots carry the new results; the DQN tutorial describes the new state encoding and output layer.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v16.9…v17.0

v16.9 — Calibration fixes: Conv+BatchNorm fusion and the int8 KWS example

Released 2026-11-09 · v16.9 on GitHub

Two calibration fixes. One changes what the PyTorch importer exports for any model with a Conv2D directly followed by a BatchNorm2D; re-export such models to pick it up. The other makes the int8 keyword-spotting example produce real output. Nothing under cpp/ changed, so on-device code is the same as v16.8.

Fixes

  • PyTorch importer: Conv2D + BatchNorm2D calibration (apps/import_pytorch). When a BatchNorm follows a convolution, the importer folds the BN into the conv’s weights and bias. The folded weights were correct, but the fused layer kept the convolution’s own float forward, and calibration observes each layer through that function. The fused layer’s output scale was therefore fitted to the range before the BatchNorm, while the int8 layer outputs the values after it, so outputs either saturated or wasted resolution, depending on the BN’s scale and shift. The fused forward now runs the convolution and then the BatchNorm, with the same constants as the folded weights. A new numpy-only test file, apps/import_pytorch/test_import_pytorch.py, checks that the fused weights and the fused forward both compute conv-then-BN and that calibration observes the post-BN range; the last two fail on the old importer (an observed minimum of -1.74 against -4.73 after the BN). Models without a Conv2D-then-BatchNorm2D pair are unaffected. Present since the importer was added.
  • int8 keyword-spotting example (examples/kws_cortex_m_int8). The example gave every activation the same fixed scale, 1/127. Its synthetic weights shrink the signal several times over at each layer, so all ten int8 logits were 0 and the printed “predicted class” was the first of ten equal values. Each layer’s activation scale is now fitted from a float reference pass over 32 calibration inputs with RangeObserver, and the runner prints the int8 logits next to the float model’s: the largest difference is 0.6% of the float logits’ range, and both pick the same class. The input, the weights and the reported weight bytes are unchanged.

Both were found while porting to tinymind-rs, whose parity tests compare every tensor with the C++.

Docs

  • The example’s README and the Pages walkthrough describe the per-layer calibration and show the new output.
  • The importer README describes what the fused layer calibrates and how to run the new tests.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v16.8…v16.9

v16.8 — Importer fixes: tree feature grids and the requantizer clamp

Released 2026-11-08 · v16.8 on GitHub

Two of the importers could produce a model that compiled, ran and passed its own bit-exactness check while being less accurate than the source model, or carrying a requantizer shift outside the contract. Both are fixed. Nothing under cpp/ changed, so on-device code is the same as v16.7; re-export models made with the affected importers to pick up the fixes.

Fixes

  • Tree importer feature grid (apps/import_trees). FeatureQuant.from_data clipped each feature’s zero point to the storage range. A feature whose calibration range does not include 0, such as a length, a temperature in kelvin or any always-positive sensor reading, needs a zero point outside that range, so the clip shifted the grid and every value above (qmax - qmin) * scale saturated. On iris at int8, sepal length quantized to 127 for every sample. Thresholds past that point merged or were dropped, and accuracy fell with no error reported. The zero point is now left unclipped; it was already int32 in the generated header. Its only bound keeps the int32 sum in quantizeFeatures from overflowing, and a feature beyond it (far from 0 with a span below float32’s resolution there) falls back to a range that includes 0. A random forest on the wine dataset goes from 96.3% to 98.1% held-out accuracy, matching scikit-learn exactly, and an iris random-forest regressor on an int16 grid goes from a maximum error of 0.435 to 0. Four new tests fail on the old importer. Present since the importer was added in v16.1.
  • PyTorch importer requantizer clamp (apps/import_pytorch). quantize_multiplier now applies the same clamp as the C++ quantizeMultiplier from v16.7: a scale ratio small enough to need a shift above 31 becomes multiplier 0, and the shift is never below -31. It now matches the C++ on 644 ratios from 2^-80 to 2^80 (392 differed before), so the importer can no longer emit a shift outside Requantizer’s contract.

Both bugs were found while porting the importers to tinymind-rs, whose parity tests require the same integer model from both implementations.

Docs

  • README brought up to date: the Mixture-of-Experts and upsampling layers, the Requantizer shift contract, which SIMD backends CI actually executes, five missing blocking quality gates and two advisory ones, 15 examples and 7 test suites that were missing from the project tree.
  • GitHub Pages brought up to date: the SVE-first Arm dispatch order on two pages, a new “How the backends are validated” section, Upsample1D, pages for the moe_regimes_int8 and import_moe_demo examples, 17 gallery plots, and the lowercase project name throughout.
  • The gbdt_tabular_int8 example no longer claims that the second feature moves the region boundaries; the decision map is three vertical bands.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v16.7…v16.8

v16.7 — The requantizer, proved UB-free

Released 2026-11-08 · v16.7 on GitHub

A new CBMC proof covers the step that turns every int8 layer’s int32 accumulator back into a narrow output: Requantizer::apply (int8, uint8, int16 and int32 storage) and multiplyByQuantizedMultiplier. Writing it found two cases of undefined behaviour, and both are fixed in this release. The SMLAD dot-product proof now runs on every pull request as a required check.

Fixes

  • quantizeMultiplier shift out of range. For a scale ratio below 2^-32 it returned a shift of 32 or more, and Requantizer::apply then shifted a 32-bit value by that amount, which is undefined behaviour. Such a ratio rounds every int32 accumulator to 0, so it now returns multiplier 0. The left side is clamped at -31, beyond which every non-zero accumulator saturates anyway. No result changes. The shift contract, -31 <= shift <= 31, is now documented on Requantizer.
  • 32-bit storage zero-point overflow. With int32_t output storage, the one-rounding path added the zero point in int32 without the clamp the saturating path had, so a zero point near the rails overflowed. 32-bit storage now adds and clamps in int64 on both paths.
  • The int8, uint8 and int16 instantiations compile to byte-identical machine code before and after (Cortex-M0+ and Cortex-M4, -O3), so no deployed int8 model and no benchmark changes. Two regression tests in unit_test/quantization fail on the old header and pass now.

Formal verification

  • Requantizer proof (unit_test/formal/requantizer, opt-in): for every accumulator, multiplier, zero point and clamp bound at every shift from -31 to 31, the library is free of undefined behaviour and equals gemmlowp’s two-step definition computed exactly in int64. That is 317 proofs, about 11 CPU-hours, and 5 planted defects that must each be caught. The reference uses gemmlowp’s original forms rather than the library’s derivations, so the proof also covers the one-rounding fast path and the ±2^30 rail. FastRequantizer is not covered, because CBMC 5.95’s C++ front end cannot type-check it.
  • SMLAD proof in CI: the proof that the Cortex-M SMLAD int8 dot product equals the scalar reference for every input now runs on every pull request as the required check “CBMC proof (SMLAD dot product)”. It runs 15 proofs and 4 planted defects with Bitwuzla 0.9.1 pinned by hash, so every run also shows the proof can fail. master now requires 22 checks.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v16.6…v16.7

v16.6 — Every Arm SIMD backend now runs in CI

Released 2026-11-07 · v16.6 on GitHub

Until this release, six of tinymind’s Arm SIMD backends (NEON, NEON dot product, NEON fp16, SVE, Helium MVE-I and MVE-F) had never executed anywhere: no CI host could run them, so they were compiled at most. Every one of them now runs on every pull request, as a required check, against the scalar reference. Doing that turned up one backend that did not compile and one that no build could ever select.

Library changes

  • SVE is now selectable (#243). The SVE gate requires the NEON gate, and the dispatcher tested NEON first, so no build could ever reach the SVE backend. SVE now heads the Arm order: SVE > NEON_DOTPROD > NEON > HELIUM_MVE_I > ARM_DSP > scalar. Behaviour change: a build that sets both TINYMIND_ENABLE_SIMD_NEON and TINYMIND_ENABLE_SIMD_SVE now dispatches to sve where it used to get neon or neon_dotprod, and activeBackendName() reports it. Results are unchanged: every integer backend is bit-exact with the scalar reference.
  • The Helium MVE-F backend compiles (#245). simd_helium_mve_f.hpp reduced its accumulator with vaddvq_f32, which does not exist (MVE has no floating-point add-across-vector instruction), so any build with TINYMIND_ENABLE_SIMD_HELIUM_MVE_F=1 failed under both GCC and Clang. It now sums the four lanes in a fixed order, (l0 + l1) + (l2 + l3).

Verification

  • Arm A-profile backends on an arm64 runner (#241, #243). New required CI job “Arm SIMD backends (aarch64)” (make check-simd-arm) on GitHub’s Neoverse N2 runner. The int8 suites and the golden-output examples run under ASan+UBSan with layers dispatched to NEON, to NEON dot product and to SVE; the dot-product configuration is also built with Clang. Every compiled-in backend is also called directly against the scalar reference at every lane (45.7 million calls each) and at every length 0–300 from every buffer offset 0–15; NEON fp16 is checked against a model of its own arithmetic. SVE additionally runs under qemu-aarch64 at 128-, 256-, 512- and 2048-bit vectors, including the whole quantization suite, because vector-length-agnostic code has to be right at lengths the hardware does not have. All backends were correct.
  • Helium backends on an emulated Cortex-M55 (#245). New required CI job “Helium backends on emulated Cortex-M55” (make -C unit_test/embedded helium_qemu) on QEMU’s mps3-an547. MVE-I is bit-exact with the scalar reference for every (x, w, zero point) in each lane of a 16-lane vector, every length 0–80 at every misalignment, and through QPointwiseConv2D, QConv2DPerChannel and QDense end to end: 268.6 million cases, 0 mismatches. MVE-F is bit-exact against a model of its lane arithmetic. GCC and Clang images, plus a UBSan trap-mode image of each. The SMLAD test it shares moved from unit_test/embedded/arm_dsp/ to qemu_m/.
  • Each new gate was shown to fail. Planted defects were each reported: NEON switched off, a dropped tail element in neon_dotprod, an SVE stride fixed at 16 bytes (passes at 128 bits, caught at 256), the old SVE dispatch order, an unpredicated MVE-I or MVE-F tail, a flipped MVE-I zero-point sign, a different MVE-F lane reduction order (1 ULP, caught only by the lane model), and the Helium dispatch branch disabled.
  • CBMC equivalence proof of the SMLAD dot product (#240, opt-in). make -C unit_test/formal/arm_dsp_dot proves arm_dsp::int8DotWithZeroPoint equals the scalar reference for every input at lengths 0–8, with misaligned buffers and a big-endian memory model, and the absence of out-of-bounds access, signed overflow and undefined shifts. Four planted defects must each be caught. Needs Bitwuzla, so it is not part of CI.

Examples

  • Weight initialisation is seeded explicitly (#236). Eleven examples built their network at namespace scope, so its initial weights were drawn before main() called srand(), from glibc’s default seed. Each now seeds the weights explicitly (WEIGHT_INIT_SEED = 1) before building the network, then seeds everything else as before. Every output is byte-identical.
  • Initial weights stay in range at 8- and 16-bit storage (#239). Thirteen examples cast rand() to the storage type before taking the modulo, which at Q8.8 put initial weights as low as -322 against an intended minimum of -128. The cast now applies to the finished value. Every shipped configuration that uses these weights is Q16.16, where the old cast was harmless, so outputs are unchanged; if you copied one of these generators into an 8- or 16-bit build, apply the same fix. Found by the tinymind-rs port.
  • kan_xor --dense no longer reports a false failure (#236). It classified 1597 of 1600 grid points correctly but failed an MSE threshold that a step-shaped target makes unreachable. Dense mode is now judged by classification.
  • Stale sample output and run instructions refreshed (#237).

Project

  • SECURITY.md added and GitHub private vulnerability reporting enabled; CodeQL’s write permission is scoped to its own job (#238). OpenSSF Scorecard 7.9 → 8.6.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v16.5…v16.6

v16.5 — Cortex-M0+ int8 dense speed restored

Released 2026-10-27 · v16.5 on GitHub

Fix: Cortex-M0+ int8 dense layers were about a third slower in v16.3 and v16.4 (#235)

  • Re-running the on-target bench on a NUCLEO-L031K6 (Cortex-M0+, 32 MHz) showed the int8 MLP at 48,282 cycles, up from 35,963 in v16.2 (+34%). Bisecting on the board pinned it to the Requantizer undefined-behaviour fix in v16.3 (#230).
  • That fix clamps the saturating path’s result to the exact [qmin - zp, qmax - zp] window, in int64, before the zero point is added. The MLP never takes that path. But apply() is inlined into the dense output loop, and on Cortex-M0+, with eight low registers, keeping those bounds live cost the loop its registers: the dot product reloaded its index from the stack on every multiply-accumulate.
  • For storage narrower than int32, the path now clamps to a constant ±2^30. The zero point, qmin and qmax are all below 2^16 in magnitude, so the sum cannot overflow and the final clamp gives the same result. 32-bit storage keeps the exact int64 window. No undefined behaviour returns, and outputs are bit-exact with v16.4.
  • multiplyByQuantizedMultiplier now saturates its left shift with an int32 range test instead of an int64 multiply, which Cortex-M0+ performs in a library call. The result is unchanged. It does not move these benchmarks, but every caller that left-shifts (QAdd, QGRU, QSSM, QCfC and others) skips the 64-bit work.

On-target results (O3, v16.4 → v16.5, every model hash unchanged)

Image v16.4 v16.5
L031 int8 MLP 48,282 cycles 36,006 cycles (−25.4%), flash −5.7%, stack −18%
L031 int8 KWS 747,881 cycles 740,864 cycles (−0.9%), flash −11%
F411 int8 MLP, SMLAD 10,047 cycles 10,227 cycles (+1.8%)
F411 int8 KWS, SMLAD 178,514 cycles 181,853 cycles (+1.9%)

The F411 SMLAD builds return to the figures published on the benchmarks page (10,241 and 181,568 cycles); v16.3 had moved them through register allocation alone. Random forest, TFLM and emlearn images are unchanged.

Verification

  • Bit-exact against v16.4’s Requantizer over 85 million random cases (int8, uint8, int16, uint16 and int32 storage), and the new shift saturation over 11.7 million, both under UBSan.
  • New unit test requantizer_saturating_path_at_int32_rails checks accumulators at the int32 rails against the exact int64 result. It was shown to fail on a planted defect.
  • The full gate set passes: make check, check-cxx14, check-clang, cppcheck, header-selfcheck, ASan/UBSan, MemorySanitizer, the fuzz agreement and coverage gates, the Arm cross-compiles, and the SMLAD bit-exactness check on QEMU Cortex-M4.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v16.4…v16.5

v16.4 — Builds cleanly with GCC 15 and cppcheck 2.19

Released 2026-10-26 · v16.4 on GitHub

GitHub moved its ubuntu-latest runner image to Ubuntu 26.04, which brings GCC 15.2 and cppcheck 2.19. A scheduled CodeQL build failed overnight with no code change, and a run of every workflow on the new image turned up three more failures. This release fixes all four, adds a way to run the CI gates locally with the runner’s toolchain, and makes the CI package install retry against a second mirror.

Fixes (#232)

  • Softmax attention under GCC 15 at -O3. QCausalAttentionSoftmax1D::step and QCrossAttentionSoftmax1D::query loop over the KV cache’s length, which append() never lets exceed the cache’s capacity. GCC 15 at -O3 cannot see that bound and reports -Wstringop-overflow on the stores into the caller’s scratch buffers, so a -Werror build of code using these layers failed (the seq2seq_softmax_int8 release build did). The loops are now bounded by the capacity, which changes nothing for a cache filled through append().
  • QLearningEnvironment::getRandomActionForState removed. It called a method that only user-written derived environments declare, and nothing ever called it, so older compilers never instantiated it. GCC 15 rejects it at definition time. QLearner already chooses random valid actions through the environment; the buffer only this method used went with it.
  • cppcheck 2.19 parse error in qtree.hpp. The comparisons written inline as template arguments in QCompactTree are now named constants; the selected types are unchanged.
  • fuzz_qlstm under GCC 15. A byte-at-a-time fill loop triggered a false -Wstringop-overflow at -O3, failing the cross-build agreement gate. It is now a bulk read with the same semantics; every corpus input produces the same output as before.

Run the CI gates in the runner’s toolchain (#233)

  • make check-ci-image runs make check, cppcheck, header-selfcheck, check-cxx14, check-clang and make -C fuzz agree inside a podman container with the same Ubuntu 26.04 packages the workflows install, on a copy of the working tree. tools/ci-image.sh <command> runs any other command there.
  • The image enables the amd64v3 archive variant, as the runner does. That variant’s GCC defaults to -march=x86-64-v3 (AVX2), and the fuzz_qlstm warning above appears only with it.
  • Shown to fail before it was trusted: on the commit before #232, the container reproduces all four CI failures with the same diagnostics.

CI reliability (#234)

  • The runner’s Azure apt mirror repeatedly stalled on large packages until every install attempt timed out. After a failed first attempt, the shared apt-install action now switches to archive.ubuntu.com. Verified on a real runner with a forced timeout.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v16.3…v16.4

v16.3 — Fuzz targets that check what they claim, exhaustive sweeps, and the defects they found

Released 2026-10-24 · v16.3 on GitHub

A fuzz target that only feeds input to a kernel proves one thing: the kernel does not crash. This release makes every tinymind fuzz harness state what “correct” means, adds a suite that checks properties on every input of a domain wherever the domain is small enough to enumerate, and fixes the four defects those checks found on their first runs. The prompt was reading Theorem’s OSS Verify (https://theorem.dev/oss-verify/), which proves that fuzz targets cannot crash and makes the same point: a proof covers only what the fuzz target checks.

Defects found and fixed

  • Signed-overflow UB in Requantizer::apply (#230). The fallback path, taken when the multiplier is negative or the shift is below 2, computed acc * (1 << left_shift) in int32. That overflows for a large accumulator under a scale ratio above 1. It now uses the saturating multiplyByQuantizedMultiplier, which already had this fix. Adding the zero point could also overflow near the int32 limits; the result is now clamped to [qmin - zp, qmax - zp] first. Results for in-contract inputs are bit-identical, and the integration golden outputs are unchanged.
  • Wrong knot in the fixed-point LUT activations (#231). LookupTable::getValue compared a table y value with the raw x input where it meant to detect x landing on a knot. Whenever the two happened to be equal it returned the wrong table entry. Q8.8 sigmoid was off by up to 7.5 LSB and decreased in 3 places; tanh was off by 18.6 LSB and decreased in 9. Both are now within about 2 LSB and monotonic on every input. A sampled accuracy test at 1/64 spacing had passed over it.
  • Unsupported LUT formats (#231). Formats with fewer than 4 integer bits (Q1.7, Q2.6, Q3.5, Q1.15, Q2.14, Q3.13) cannot hold the tables’ ±6 range and returned values off by up to their full range. Formats with fewer than 3 fractional bits (Q6.2, Q7.1, Q14.2, Q15.1) divided by zero. LookupTable now rejects both at compile time with a clear message. No format in the repository was affected.

Fuzz harnesses with property checks (#230)

  • Every harness states its properties with TINYMIND_FUZZ_CHECK (fuzz/fuzz_check.hpp), which prints the failing expression and traps:
    • requantize: an exact 128-bit reference for multiplyByQuantizedMultiplier; Requantizer and FastRequantizer bit-identical to it.
    • softmax: order, probability mass, accuracy against double precision, shift invariance, row-reversal equivariance.
    • layernorm: accuracy against double precision within a derived error bound, constant rows, shift invariance.
    • FFT: forward and inverse against a double-precision DFT.
    • LSTM, GRU, CfC, softmax attention and multi-head attention: permutation equivariance over every axis; attention’s inline softmax equals QSoftmax1D; each attention head equals the same head run alone.
  • One planted in-bounds defect per kernel (a wrong stride, index, rounding term or head slot) is caught by replaying the committed corpus alone.

New CI gates (#230)

  • make -C fuzz agree: the corpus through unsanitized g++ and Clang builds at -O0 and -O3; every build must produce identical output digests.
  • make -C fuzz msan-replay: the corpus under MemorySanitizer, now part of make check-msan.
  • make -C fuzz check-coverage: every property check must execute on the committed corpus.
  • arm_dsp_qemu: two more images build the SMLAD test with GCC and Clang UndefinedBehaviorSanitizer in trap mode on the emulated Cortex-M4.
  • Corpus replay now times out a hung input after 10 s.

Exhaustive sweeps (#231)

New suite unit_test/exhaustive, part of make check, the sanitizer jobs, the Clang jobs and the AVX2 jobs:

  • Fixed-point LUT sigmoid and tanh on every input of every supported 8- and 16-bit signed format, and every input in [-7, 7] of Q8.24, Q16.16 and Q24.8: monotonic, in range, within a derived error bound.
  • The requantizer’s one-rounding fast path against the two-step form, and FastRequantizer against Requantizer, for every accumulator up to ±2²² (every int32 in the nightly run).
  • The int8 dot product: the scalar reference for every (x, w, zero point), and the active SIMD backend for every (x, w) in every lane of a 64-element block.
  • QSoftmax1D on every int8 row of 2 and 3 features, and the layernorm integer square root on every input up to 2²⁴ (every uint32 nightly).
  • The SMLAD backend gets the same per-lane sweep on the emulated Cortex-M4: 134 million cases per image.
  • exhaustive-nightly.yml runs the full int32 and uint32 sweeps.

Every new gate and check was shown to fail on a planted defect before it was trusted.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v16.2…v16.3

v16.2 — MLPerf® Tiny reference models on a Cortex-M4: blocked SMLAD convolutions, folded padding, TFLite-exact softmax

Released 2026-10-19 · v16.2 on GitHub

The framework comparison now runs two of the MLPerf Tiny reference int8 models, unmodified, on a NUCLEO-F411RE (Cortex-M4F, 100 MHz) with tinymind and with TFLM. They are keyword spotting (DS-CNN) and image classification (ResNet-8). Every output of every image is bit-exact between the two stacks. The first run lost image classification to CMSIS-NN by 16% and needed more RAM than TFLM. This release closes both gaps with library changes, all bit-exact.

These are not MLPerf results. They were not produced with the MLPerf Tiny benchmark runner or under its rules: there is no accuracy run on the benchmark datasets and no energy measurement, and MLCommons has not verified them. They compare two inference stacks on the same reference models and the same inputs, and should not be compared with published MLPerf Tiny scores. MLPerf® is a registered trademark of MLCommons Association in the United States and other countries; see https://mlcommons.org.

Results (#229)

-O3, 100 MHz, tinymind +SMLAD against TFLM with CMSIS-NN. RAM is static RAM plus peak stack, including TFLM’s tensor arena; flash includes the weights.

Model Framework Cycles Flash RAM
Keyword spotting (DS-CNN) tinymind +SMLAD 8,193,064 53,156 17,248
  TFLM CMSIS-NN 9,583,099 148,864 24,432
Image classification (ResNet-8) tinymind +SMLAD 26,753,191 108,324 54,424
  TFLM CMSIS-NN 37,372,049 191,212 56,608
  • tinymind takes 14.5% fewer cycles on keyword spotting and 28.4% fewer on image classification. It is faster on every layer of both models at -O2 and -O3.
  • It needs a third of TFLM’s flash on keyword spotting and 57% of it on image classification, and less RAM on both.
  • The existing benchmark models did not regress. The KWS-style CNN is within 0.3% at -O3 and up to 2% faster at -O2. The MLP and the Cortex-M0+ images are unchanged.

Library changes (#229)

  • Blocked SMLAD convolutions. simd::ConvRows2x2 / int8Dot2x2WithZeroPoint multiply two inputs against two weight rows.
    • On the ARM_DSP backend, the convolution form is an out-of-line SMLAD kernel computing two filters by two output pixels, so each load feeds two multiplies. When it was inlined, its accumulators spilled and the layer cost swung by 30% with unrelated code.
    • Every other backend makes four int8DotWithZeroPoint calls, with unchanged output and speed.
    • QConv2D / QConv2DPerChannel use the kernel on the row path (windows over 64 bytes). QPointwiseConv2D(PerChannel) uses it at 32 or more input channels when the backend has the blocked kernel.
  • Folded SAME padding. QConv2D, QConv2DPerChannel and QDepthwiseConv2D take optional PadTop, PadBottom, PadLeft and PadRight template parameters. Padding uses the input zero point, as TFLite does.
    • Instead of a QPad2D pass and a padded copy of the input, these layers keep a ring of KH padded rows on the stack. The stack band is bounded by TINYMIND_CONV_PAD_BAND_MAX_BYTES.
    • This removes the 12 KB and 18 KB padded copies that had put tinymind’s RAM above TFLM’s.
  • TFLite-exact softmax. QSoftmaxFixedPoint1D (cpp/qsoftmax_fixedpoint.hpp) reproduces the TFLite int8 softmax bit for bit. buildQSoftmaxFixedPointParams in qcalibration.hpp derives its parameters as TFLite Micro does.

Benchmark harness (#229)

  • SUITE=mlperf builds the MLPerf images.
  • make mlperf-models downloads the reference models at a pinned commit and checks their SHA-256. They are Apache-2.0 (MLCommons) and are not committed to the repository.
  • gen/make_mlperf.py rebuilds each graph from tinymind layers with the model’s own weights and requantizer parameters. make host-check-mlperf checks the result on the host.
  • Captures now stop at each image’s end marker instead of after a fixed 6 s. TFLM’s reference kernels take about 90 s on ResNet-8.
  • TFLM images rebuild when the Makefile changes, so a stale image is never re-measured after an arena-size edit.

Tests (#229)

  • The quantization suite gains these tests:
    • folded padding against QPad2D for convolution and depthwise layers, including a stride larger than the kernel height;
    • wide blocked pointwise against the reference;
    • softmax goldens and a hashed sweep from the TFLite Micro reference kernel.
  • The arm_dsp_qemu gate now also covers the 2×2 kernels, padded convolutions and wide pointwise. Run on the F411 itself, it checked 140,766 cases with 0 mismatches and caught four planted defects.

Docs

  • The benchmark page has a new MLPerf Tiny reference models section, with a per-layer table for ResNet-8 (#229).
  • The benchmark README and the Pages page credit the UCI digits dataset (CC BY 4.0) used by the framework comparison. Its generators emit that credit into the committed data headers (#228).

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v16.1…v16.2

v16.1 — Compile-time decision trees: emlearn’s speed on a Cortex-M0+, a 3 KB forest, and a tree importer

Released 2026-10-18 · v16.1 on GitHub

On a Cortex-M0+ (NUCLEO-L031K6), tinymind’s run-time tree walk was 3x slower than emlearn’s generated if/else forest. This release closes that gap and goes past it on size, then adds an importer so trained scikit-learn, XGBoost and LightGBM models reach these trees directly.

Compile-time decision trees (#223, #226)

  • QStaticDecisionTree / QStaticGBDT run a decision tree or boosted ensemble from a compile-time node pool (a constexpr QTreeNode array in a type), under an evaluation policy:
    • QTreeInlineEval expands every node at compile time into a compare against an immediate threshold and a branch. The pool itself is never stored.
    • QTreeCompactEval walks a packed copy built at compile time: decision nodes only, 4 bytes each, in pre-order so the walk needs no cycle guard, and a deduplicated leaf table in the narrowest type that holds the values.
    • QTreeWalkEval walks the original 12-byte QTreeNode pool at run time.
  • All three give the same result for every input. The model is validated when it compiles: a split on a feature the input does not have, a child, root or class index outside the pool, or a cyclic tree is a build error rather than an out-of-bounds read.
  • 10-tree random forest on the L031 at -O3 (cycles, code + weights):
  Cycles Code + weights
tinymind run-time walk 2,524 12.9 KB
tinymind compact 1,649 3.1 KB
tinymind inline (uint8 features) 845 7.9 KB
emlearn inline (generated if/else) 841 8.3 KB
emlearn loadable 6,409 7.1 KB

Inline ties emlearn’s generated code (and beats it at -O2, 872 vs 917 cycles), in less flash at -O3 and less RAM (112 vs 184 B). Compact is the footprint option: 3.0 KB at -O2, half of emlearn’s smallest build.

Tree-ensemble importer (#227)

  • apps/import_trees converts scikit-learn decision trees, random forests, extra trees and gradient boosting, XGBoost (gbtree) and LightGBM models, classifiers or regressors, into a C++14 header of these pools.
  • Integer features reproduce every split exactly; float features go onto a calibrated per-feature int8 / uint8 / int16 grid. XGBoost’s strict x < t splits are converted separately from the x <= t of the other two.
  • The base score is measured from the model’s own outputs instead of parsed from library metadata, which also checks the tree parsing against the library.
  • verify() compiles the generated header with a host compiler and checks every policy bit-exact against the importer’s integer reference. 31 tests, including g++ and clang at C++14 and C++17 and a freestanding Cortex-M0+ build.

Benchmarks on a Cortex-M0+ (#219, #220, #221, #225)

  • The framework comparison now also runs on a NUCLEO-L031K6: Cortex-M0+ at 32 MHz, 32 KB flash, 8 KB SRAM, no FPU, DSP extension or hardware divide. The M0+ has no DWT, so a SysTick-based 32-bit cycle counter stands in, checked on the board.
  • Only tinymind fits the networks: no TFLM image links into 32 KB. tinymind’s int8 MLP runs in 35,963 cycles (1.1 ms) and its int8 KWS CNN in 746,112 (23 ms), both bit-exact with the host and the F411. emlearn’s MLP, which is float only, takes 707k cycles in software float.
  • The integer random forest above is the int8-against-int8 comparison with emlearn.
  • The benchmark page now has a Cortex-M0+ section, and the harness pins each run to one ST-LINK by serial number, so a run cannot flash one board and read the other.

C++14, enforced (#222)

  • C++14 was the stated minimum, but every build ran at the compiler default (C++17), and FFT1D / QFFT1D failed to link at C++14. That is fixed, tinymind_platform.hpp now stops a pre-C++14 build with an #error, and a new required CI job, “C++14 language floor”, builds every header at -std=c++14 -pedantic-errors and builds and runs the test suites and examples at C++14.

Tooling

  • Builds that are meant to fail to compile (the prerequisite and qtree model checks) no longer appear as errors in the clang-tidy report (#224).
  • The benchmark Makefile rebuilds images when a library header changes; before, a run could re-measure a stale binary.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v16.0…v16.1

v16.0 — An exact QValue, an on-target benchmark vs TFLM, and 2.3x faster int8 CNNs

Released 2026-10-14 · v16.0 on GitHub

This release fixes every QValue defect found by a new differential oracle, which checks each QValue operation against an exact 128-bit reference. One of those fixes changes the API, so this is a breaking release: q += n, q -= n, q == n and q != n with an int no longer compile (see below). Three other fixes change behaviour at the edges of the range: the saturation maximum, division by zero, and 0 / 0.

tinymind also now has an on-target benchmark against TensorFlow Lite for Microcontrollers (TFLM) with CMSIS-NN and against emlearn, on a NUCLEO-F411RE (Cortex-M4F, 100 MHz). The int8 weights and requantizers come from the same TFLite model, so tinymind’s outputs are bit-exact with TFLM’s on the board. Over this release the keyword-spotting CNN went from 422,449 to 181,568 cycles at -O3: 3.2x the speed of TFLM with CMSIS-NN (576,368). Every performance change is bit-exact.

Breaking change: QValue integer operands (#196)

  • q += n, q -= n, q == n and q != n with an int, a raw word or any other non-QValue operand no longer compile. They read an int as raw LSBs while the free operators read it as a whole number, so q += 1 added one LSB but q + 1 added 1.0. Say which you mean:
    • whole number: q.addInteger(n), q.subtractInteger(n), q.compareInteger(n), or q += QValue(n, 0) / q == QValue(n, 0)
    • raw LSBs: q += QValue(raw), q.getValue() == raw
  • The free operators (q + n, q - n, q * n, q / n, q < n, …) and q *= n, q /= n now treat an int as an exact whole number. Previously an int outside the fixed part’s range wrapped first: for Q8.8, 1.0 < 200 was false and q / 256 divided by zero. Every in-range int gives the same result as before.

QValue fixes

A differential oracle (#190, #200) checks every public QValue operation against an exact 128-bit reference across 32 formats and all four rounding and saturation policies, with operation chains. A nightly seeded soak runs about 2 billion checks under ASan and UBSan (#203). Known defects are a ratchet that can only shrink, and none are left. What it found and what was fixed:

  • Narrow formats stay canonical (#188): formats narrower than their storage word (e.g. QValue<8, 16, true> in an int32_t) left stale bits above the format’s width, so negative values read back as large positives.
  • Undefined behaviour (#190): WrapPolicy add/sub overflowed signed words of int width or wider; RoundUpPolicy’s half-LSB mask was an int shift; fromParts overflowed for Q1.31 and Q1.63. All now well-defined and bit-identical for every format used in the tree.
  • True saturation maximum (#193), behaviour change: QFormatMaxValue() was the largest whole number (127.0 for Q8.8) instead of the true maximum (127.99609375). Under MinMaxSaturatePolicy, results above the largest whole number now keep their fraction, and a saturated Q8.8 result is 0x7FFF, not 0x7F00.
  • Saturating ++/-- on Q1.x and unsigned saturating add (#194): Q1.15 ++0.5 gave -0.5; an unsigned addend above the maximum wrapped instead of clamping.
  • Division by zero is defined (#205, #207), behaviour change: under WrapPolicy, q / 0 was an integer division by zero (SIGFPE on x86). Both policies now return the maximum for a positive numerator, the minimum for a negative one, and 0 for 0 / 0 (MinMaxSaturatePolicy used to return the minimum).

Benchmark: tinymind vs TFLM vs emlearn on Cortex-M4

  • benchmarks/framework_comparison_f411/ (#191) holds the board support, the DWT timing harness, one backend per framework and the model generator. Two models: an MLP (sklearn digits) and a KWS-style CNN (conv 3x3 → max-pool → depthwise → pointwise → global average pool → dense). make LEVEL=O3 run flashes and captures every image.
  • Results at -O3, cycles per inference: KWS CNN 181,568 (tinymind + SMLAD) vs 576,368 (TFLM CMSIS-NN); MLP 10,241 vs 14,030. tinymind’s code and weights are 7-22x smaller than TFLM with CMSIS-NN.
  • make host-bench (#214) times the same models on an x86 host, scalar against each x86 SIMD backend the CPU supports. It fails if any build’s outputs drift from the expected hashes.

Performance (all bit-exact)

  • Conv windows (#195, #202): the int8 conv gathers each kernel window of up to 64 bytes once and runs every filter over it, instead of one dot product per kernel tap. It now gathers a tile of windows (up to a row) and sweeps the tile filter by filter. The tile’s stack budget is TINYMIND_CONV_TILE_MAX_BYTES (default 256).
  • Weights and requantizer held in registers (#210, #211): an int8 output store may alias the int8 weights, so GCC reloaded the weights after every output. Conv, pointwise and depthwise now copy each filter’s weights (up to 64 bytes) into a local, and decode the requantizer once per filter into a form with the zero point folded into the rounding and a single SSAT/USAT clamp.
  • One rounding per requantize (#208): for the common case (multiplier >= 0, shift >= 2), gemmlowp’s two roundings compose into one 64-bit rounding: an SMLAL and an ASR on Cortex-M4.
  • Depthwise and pointwise loops (#198): pointwise runs filter-outer, and depthwise runs channel-outer with the zero point folded into the bias.
  • -O2 robustness (#192, #199, #204): the SMLAD dot product folds the zero point with SXTAB16 and unrolls its block loop; the scalar dot product and the pooling window loops unroll too. With identical kernels the -O2 MLP used to range from 14.5k to 24.6k cycles depending on surrounding code. Now the CNN at -O2 is about 6% slower than at -O3 (192,965 vs 181,568 cycles).
  • x86 short dot products (#213): every x86 vector backend (AVX2, AVX-VNNI, AVX-512F, AVX-512 VNNI) routes dot products shorter than 16 elements to the unrolled scalar code. Below one block the vector paths did no vector work but still paid for their reductions. On an i7-11850H, KWS at -O2 with AVX2 went from 19.0 to 14.3 µs.

Docs

  • New Pages pages: the on-target benchmark write-up (#189) and a Releases page generated from GitHub Releases (#186).
  • The project name is now written as tinymind throughout the repository, matching its name: the README, the docs and the Pages site, code comments, and example plots (#215, #216, #217, #218).

Benchmark write-up: https://danmcleran.github.io/tinymind/benchmarks.html

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v15.2…v16.0

v15.2 — int8 on Cortex-M4: SMLAD backend and a faster requantize path

Released 2026-10-12 · v15.2 on GitHub

On a NUCLEO-F411RE (Cortex-M4F, 100 MHz), the keyword-spotting int8 pipeline drops from 826,857 to 580,305 warm cycles, all bit-exact: the activation checksum is unchanged. Float on the same board is 490,262 cycles, so int8 goes from 1.69x the float cost to 1.18x. Most of that gain needs no flag at all.

Performance

  • Requantization is cheaper on every target, with no gate required. saturatingRoundingDoublingHighMul is now one add and one arithmetic shift. gemmlowp’s sign-dependent nudge followed by a truncating divide equals floor((a*b + 2^30) / 2^31) for both signs, so the negative-product branch and its second 64-bit add go away; on Cortex-M4 the body is a single SMLAL seeded with 2^30. A new unit test locks it to the gemmlowp form on exact ties, the int32 extremes and a 2M-case sweep.
  • Quantized layers stop reloading their own fields. QConv2D, QConv2DPerChannel, QDepthwiseConv2D, QPointwiseConv2D(PerChannel) and QDense copy their fields and requantizer into locals at the top of forward(). Every output is an int8_t store, which may alias *this, so the compiler was reloading weights, biases and zero point, and re-decoding the requantizer shift, once per output.
  • Together these take the pipeline from 826,857 to 596,988 cycles.

New SIMD backend: TINYMIND_ENABLE_SIMD_ARM_DSP

  • A Phase 14 backend for the AArch32 DSP extension (Cortex-M4 / M7 / M33 / M35P). Four int8 values load per word, widen with SXTB16, have the input zero point subtracted in int16 lanes with SSUB16, and accumulate two products per SMLAD. Bit-exact with the scalar reference.
  • The header #errors unless the target defines __ARM_FEATURE_DSP, so enabling it on a Cortex-M0+ or an AArch64 build fails at compile time rather than miscompiling. Dispatch precedence on Arm is now NEON_DOTPROD > NEON > SVE > HELIUM_MVE_I > ARM_DSP > scalar.
  • QPointwiseConv2D and QPointwiseConv2DPerChannel now reduce through simd::dotProductWithZeroPoint, so they pick up any enabled backend. Output is byte-identical with every gate off.
  • On the KWS pipeline it takes the pointwise layer from 89,449 to 67,784 cycles and the whole pipeline to 580,305. The end-to-end gain is modest because the first convolution, which carries most of the MACs, has a single input channel and never reaches a vector reduction.
  • With Clang on bare metal, pass -munaligned-access; Clang’s strict-alignment default is correct but falls back to byte loads.

Fixes

  • KLDivergenceObserver now picks a real clip threshold (user-facing). The sweep in both the C++ observer and the PyTorch importer built the int8 view from the reference histogram after the clipped tail had been folded in, so the first candidate always scored zero divergence and the sweep returned absmax / 16 — clipping 45% of 100k Laplace samples. Empty bins were also skipped instead of penalized, producing negative “divergences”. Both are fixed, and the C++ and Python sweeps return the same threshold on the same data. If you calibrated with the KL observer, re-run calibration: your scales will change.
  • examples/predictive_maintenance holds up on the real AI4I 2020 dataset. Its published F1 of 0.84 came from the synthetic fallback only; on the real CSV it scored F1 0.43. It now trains on the failure modes the sensor readings actually determine, with a realistic class balance, and scores precision 0.66, recall 0.80, F1 0.72 on the real data (10-seed mean). The synthetic generator is now fitted to the real CSV, and the README reports only measured figures, labelled by data source.

CI

  • New required gate: “SMLAD backend on emulated Cortex-M4”. No CI host can execute these instructions, so make -C unit_test/embedded arm_dsp_qemu builds bare-metal images with GCC, Clang -munaligned-access and Clang at its strict-alignment default, and runs a bit-exactness sweep on QEMU’s mps2-an386 Cortex-M4 under semihosting: every length 0..80, every byte misalignment, the int8 extremes, plus QPointwiseConv2D and QDense end to end. Each image must also contain an SMLAD, so a silent scalar fallback fails. The gate was proven able to fail: a wrong lane unpack, a dropped tail, a missing zero-point subtraction and a disabled dispatch branch were each planted and each reported.
  • arm_crosscompile and arm_crosscompile_clang gain Cortex-M4/M33 ARM_DSP corners and a Cortex-M0+ refusal check.
  • Branch protection went from 17 to 18 required contexts.

No existing API changed. Every new gate defaults to off, and every performance change is bit-exact.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v15.1…v15.2

v15.1 — Second toolchain: clang everywhere, and what it found

Released 2026-08-31 · v15.1 on GitHub

tinymind is header-only, so users compile these headers with their own toolchain. Until now CI built only with GCC, which meant clang conformance breakage reached users rather than being caught here. This release adds clang across the board and fixes everything that turning it on uncovered.

Fixes

  • include/compiler.h portability bug (user-facing). The header emitted #pragma GCC diagnostic ignored "-Wdangling-reference" unconditionally. That warning name is GCC 13+ only, so clang rejected it with -Wunknown-warning-option — fatal under -Werror for anyone building with clang. New TINYMIND_DISABLE_WARNING_GCC_ONLY / _CLANG_ONLY macros express single-compiler warning names correctly.
  • Unused-parameter diagnostics in library headers (user-facing). Five no-op policy stubs in cpp/neuralnet.hpp and loadStates in cpp/include/nnproperties.hpp were reachable by any user compiling with clang and -Werror.
  • Static-initialization-order UB in the Q-learning test. The weight generator and its distribution were static data members of a class template, whose dynamic initialization is unordered with respect to other non-local variables. A static learner called the generator from its own constructor, so under GCC the distribution was still zero-initialized and every network weight was 0.0 — the suite “passed” in 17 ms with a degenerate network. Fixed with function-local statics, plus bounded episode loops so a non-converging policy fails rather than hangs.
  • examples/maze and examples/dqn_maze did not build under clang at all — an unused parameter under -Werror, found only because a size comparison happened to build them.
  • Test RNG made independent of the C++ standard library. std::uniform_real_distribution does not specify its mapping from engine output to value, so libstdc++ and libc++ produce different draws from identical engine state and training tests diverge. unit_test/include/portable_test_random.hpp freezes the existing sequence in portable code — verified bit-identical over 20,000 draws — so no tolerance needed changing.

CI

  • Clang is now a required gate, covering the embedded matrix and Boost suites, the AVX2 SIMD backend, the golden-byte exemplars, all 43 examples, and Cortex-M cross-compilation.
  • The int8 pipelines are proven bit-exact across compilers: twelve exemplars produce byte-identical golden output under GCC and clang, and the Q-learning agent’s full 115,498-step decision trace is identical under both.
  • MemorySanitizer added, closing a gap ASan and UBSan structurally cannot cover: reads of uninitialized memory. It runs per-PR over the embedded gate corners, and nightly over the Boost suites against a purpose-built MSan-instrumented libc++.
  • Branch protection went from 11 to 17 required contexts.

Docs

  • The include/compiler.h warning-suppression macros are documented in the README, including why single-compiler warning names need the _GCC_ONLY / _CLANG_ONLY forms.
  • A GCC vs clang code-size comparison is in docs/size-comparison.md: across 59 binaries the two are within half a percent in aggregate, but the per-binary spread runs from -49% to +135%, so neither compiler is uniformly better on size.
  • .gitattributes pins per-file line endings, and CLAUDE.md now records that a new sanitizer or CI gate must be shown to fail before it is trusted — the rule behind the MSan job’s deliberate -O0.

No library API changed in this release. The core fixed-point, quantization and SIMD code needed no correctness fixes; every defect above sat at an edge.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v15.0…v15.1

v15.0 — Neuro-Fuzzy Inference (ANFIS) across every tier

Released 2026-08-20 · v15.0 on GitHub

tinymind gains a new model family. ANFIS — the Adaptive Neuro-Fuzzy Inference System of Jang (1993) — is a Takagi-Sugeno fuzzy system whose membership functions and rule consequents are learned from data. It sits between a rule base you hand-write and a dense net you cannot interrogate: the rules are readable back after every inference, and the whole model is a few hundred bytes.

This release ships it end to end — float, Q-format, and int8 — plus the host trainer that produces the parameters.

New architectures

  • cpp/anfis.hpp — Takagi-Sugeno ANFIS, inference only. Five feed-forward stages, no state between calls, no dynamic allocation, and a latency that does not depend on the input data. Zeroth- and first-order consequents, multiple outputs sharing one premise layer. Four membership-function policies: triangular, trapezoidal, generalized bell (compile-time exponent, so no pow()), and Gaussian (integer exp lookup table). The first three are arithmetic-only and hold at TINYMIND_ENABLE_FLOAT=0 / TINYMIND_ENABLE_STD=0.

    Normalization and defuzzification are fused into one divide per output rather than a reciprocal per rule — both faster and markedly more accurate in a narrow Q format. The rule base is an explicit uint8_t antecedent table rather than an implicit M^N grid, which is what makes offline rule pruning possible.

  • cpp/qanfis.hpp — the int8 tier, behind TINYMIND_ENABLE_QUANTIZATION=1. Membership grades are uint16 on a 2^-16 grid with the running product renormalized after each multiply; 8-bit grades were measured and rejected (21x worse on a bell model, 82x on a triangular one). The grade scale cancels in the fused divide, so no ANFIS-specific calibration machinery is needed for it. Consequents are quantized per rule, because a least-squares solve spans a 49,000x coefficient ratio and one shared scale annihilates the small-coefficient rules.

  • cpp/upsample1d.hpp — UpsampleNearest1D and UpsampleLinear1D, the decoder-side counterpart to pool1d.hpp. A cheap, checkerboard-free alternative to a transposed convolution. Nearest uses no arithmetic and holds at FLOAT=0 / STD=0.

New tooling

  • apps/anfis_train — host-side trainer (numpy only). Jang’s hybrid scheme: consequents solved exactly by least squares, premises descended on the gradient. Two rule-base layouts — the Cartesian grid, and a scatter partition built from Chiu subtractive clustering where the rule count follows the data rather than the input count. At three membership functions per input, eight inputs need 6561 grid rules against 14 clustered ones.

    Rule pruning by mean firing strength, bell and triangular membership policies with analytic gradients, multi-output training (all outputs share one pseudo-inverse), and a ridge parameter that matters specifically for int8.

New examples

  • examples/anfis_mackey_glass — Jang’s own 1993 benchmark: predict x(t+6) of the Mackey-Glass chaotic series from four delayed samples. 16 rules, 448 bytes in Q16.16, test RMSE 0.004066 in double against 0.004081 in Q16.16 over 500 held-out samples. Reads the rule base back: rule 0 carries 18% of the output while the eight odd-numbered rules together carry under 10%.

    Also carries the pruning study that justifies the explicit rule table — an oversized 81-rule grid overfits by orders of magnitude, and pruning to 21 rules recovers it to 0.004793.

  • examples/anfis_mackey_glass_int8 — the same model on the int8 tier, and a deliberate negative result: int8 is 9.9x larger than Q16.16 here (4428 bytes against 448), because membership functions become 256-entry lookup tables costing 512 bytes each regardless of the shape they replaced. Those tables are 92.5% of the int8 model, and int8 only overtakes Q16.16 at about 1024 rules. Accuracy holds — 0.008584 against a float reference of 0.003997 — so the int8 tier’s argument here is pipeline consistency, not footprint. Documented in those terms rather than implied otherwise.

Verification

  • Every cpp/**/*.hpp header is now compiled standalone by a hard CI gate (141 self-contained, 0 not).
  • New CI gates for ARM cross-compilation across Cortex-M0+/M4/M33, a heap-free guarantee that nm-asserts no malloc or operator new, and supply-chain safety.
  • The ANFIS exemplars are locked byte-for-byte by unit_test/integration, carrying raw Q16.16 integers and rule indices rather than formatted floating point so the streams hold across -O0, -g, -O3, and -ffast-math.
  • Adding all of this changes no existing binary. Every example whose source is unchanged since v14.0 — 38 of them — compiles to byte-identical object code, on both host x86-64 and a cross-compiled Cortex-M4, including translation units that now transitively include qanfis.hpp.

Docs and fixes

  • New architecture and example pages for ANFIS on the documentation site, plus gallery entries.
  • Corrected the PINN example’s description of how it computes weight gradients: it uses exact one-pass vector forward-mode (MultiDual), not finite differences, and the feasibility page’s status table no longer contradicts itself.
  • Corrected the KAN page to match the shipped example and its measured sizes.
  • Added an int8 RNN calibration walkthrough with a footprint table and the lookup-table rationale.
  • CI: apt installs are now bounded by timeouts as well as retries, so a hung package mirror degrades into a retry instead of blocking a job indefinitely.

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v14.0…v15.0

v14.0 — int8 State-Space (S4-lite) + Decision Trees/GBDT + seq2seq decoder

Released 2026-06-28 · v14.0 on GitHub

New architectures

  • int8 State-Space (S4-lite) (#144): cpp/qssm.hpp — QStateSpace1D (diagonal linear time-invariant SSM) and QSelectiveStateSpace1D (input-gated, Mamba-style “selective” recurrence with a hard-sigmoid gate, no exp/sigmoid LUT). Fixed NumChannels-wide int32 state that is constant in the sequence length; streaming step() matches the full-sequence pass byte-for-byte. New Architectures page.
  • int8 Decision Trees & GBDT (#145): cpp/qtree.hpp — QDecisionTree (single tree) and QGBDT (gradient-boosted additive ensemble). A non-neural family: inference is integer compares + a branch with no MACs, no matmul, no activation tables. Thresholds quantize onto the same int8 affine grid as the feature, and the monotone affine map preserves every split decision exactly. New Architectures page.
  • int8 Transformer decoder / seq2seq (#141, #143): completes the encoder-decoder path. Causal self-attention (linear ReLU-kernel #141, softmax #143), cross-attention to encoder memory, and an autoregressive KV cache — cpp/qcausalattention1d.hpp, cpp/qcausalattention_softmax.hpp, cpp/qcrossattention.hpp, cpp/qkvcache.hpp. The linear flavor collapses the KV cache to O(1) state; the softmax flavor uses a growing cache + the shared exp LUT. Autoregressive decode matches the full-sequence pass byte-for-byte.

New examples

  • int8 autoregressive generation (#142): decoder-only nano-LM demo.
  • softmax-decoder seq2seq (#143): growing KV cache + exp LUT, end-to-end.

Docs

  • Real-world use-case callouts on all 13 architecture pages (#146).

Documentation, architecture guides, and example gallery: https://danmcleran.github.io/tinymind/

Full changelog: https://github.com/danmcleran/tinymind/compare/v13.0…v14.0

v13.0 — Mixture of Experts + int8 Transformer encoder

Released 2026-06-18 · v13.0 on GitHub

New architectures

  • Mixture of Experts layer family (#139, #140): MixtureOfExperts / TopKMixtureOfExperts (float) and QMixtureOfExperts / QTopKMixtureOfExperts (int8). Top-1 argmax routing (no softmax) with top-k/dense blending, per-expert weight scale + shared output scale, pluggable template-template ExpertType. Compute cost stays at one expert while flash holds all N — the memory-vs-compute decoupling that makes MoE fit MCUs. Two runnable examples with regime-routing plot; new Architectures page.
  • int8 Transformer encoder stack (#137): embedding + positional encoding + encoder blocks on the affine-quantized path.

Docs & cleanup

  • Architectures index links MoE page (#140).
  • README drops stale Dyna-Q bullet (#138).

Full changelog: https://github.com/danmcleran/tinymind/compare/v12.2…v13.0

v12.2

Released 2026-06-17 · v12.2 on GitHub

Changes since v12.1:

New example

  • elman_vowels (#131): speaker recognition from UCI vowel data. Offline float training -> post-training Q8.8 conversion -> tinymind inference-only. Elman recurrent network.

Docs / Pages

  • elman_vowels surfaced on Pages gallery + UCI report (#132)
  • Regenerated elman_temporal_xor + lstm_sinusoid_float plots in dark theme (#135)

Tests

  • qfft1d fuzz replay corpus extended with 397 new seeds (#134)

CI

  • Skip heavy analysis steps on docs-only PRs without blocking merge (#133)

Style

  • Convert remaining K&R braces to Allman (#136)

Docs & gallery: https://danmcleran.github.io/tinymind/

v12.1 — Fuzzing, sanitizer, and SIMD-verification hardening

Released 2026-06-11 · v12.1 on GitHub

Fixes

  • qfft1d: signed-overflow UB in magnitudeSquared at the INT16_MIN both-rails bin ((-32768)² + (-32768)² == 2³¹, one past INT32_MAX). Found by the nightly fuzzer 53k execs after its first corpus restore; fixed with int64 summation + saturation, and the minimized reproducer is archived in the committed corpus so the PR replay gate guards it permanently (#127)
  • qaffine: multiplyByQuantizedMultiplier left-shift path hardened against signed overflow (#124)

Hardening

  • Fuzzing breadth: libFuzzer coverage widened from 1 to 10 int8 kernel harnesses — softmax, FFT, requantize (#124); LSTM (incl. the Phase 12 int16 wide-cell corner), GRU, CfC, softmax-attention, and multi-head linear attention with recurrent state carried across fuzz-driven steps (#125); scalar-vs-AVX2 differential (#129)
  • Fuzz CI architecture: deterministic corpus replay is the blocking PR gate; exploratory mutation moved to a nightly matrix that accumulates its corpus across nights via actions/cache, saving even on crash nights so the inputs that reached a crash are never lost (#124, #126)
  • TSan gate: the OpenMP-parallelized conv output-filter loop — the library’s only concurrent code — is now race-checked on every PR, with Archer (OMPT) integration so TSan sees the runtime’s barrier happens-before edges (#128)
  • SIMD verification: the hand-written AVX2 intrinsics now execute under ASan+UBSan in CI, and a differential fuzz harness asserts bit-exactness against the scalar reference across ragged tails, misaligned buffers, and full-rail operands (#129)
  • Both new gates (TSan (OpenMP conv path), ASan + UBSan (AVX2 backend)) added to branch-protection required checks; nightly-fuzz status badge added to README and Pages (#130)

Examples

  • float-vs-Q16.16 LSTM sinusoid comparison (#122)
  • Elman temporal-XOR memory demo (#123)

Full Changelog: https://github.com/danmcleran/tinymind/compare/v12.0…v12.1

v12.0 — Code Quality Bar

Released 2026-06-08 · v12.0 on GitHub

tinymind v12.0 sets a formal, enforced code-quality bar. Every push and pull request to master now runs a multi-gate static + dynamic analysis pipeline, and the bar is documented for contributors in the README and on the Pages site. Along the way the new gates caught and fixed several latent correctness bugs in the core library.

Code Quality Bar (headline)

A CI pipeline (.github/workflows/analysis.yml + codeql.yml) now gates every change. Blocking gates fail the merge; advisory gates surface findings as artifacts without blocking.

Gate Tool Status
Memory / UB sanitizers Clang ASan + UBSan over all runtime suites + int8 examples Blocking
Static analysis cppcheck (warning + portability), all headers Blocking
Coverage floor gcov + lcov, cpp/ line/function floors Blocking
Formal proofs CBMC over the fixed-point qformat saturation/rounding kernels Blocking
Fuzzing libFuzzer over int8 kernels, time-boxed, ASan+UBSan Blocking
Semantic code scan GitHub CodeQL (C/C++) Blocking
MISRA C:2012 cppcheck MISRA addon Advisory
Lint + Clang Static Analyzer clang-tidy (bugprone-*, cert-*, clang-analyzer-*, narrowing/init) Advisory
  • clang-tidy runs the Clang Static Analyzer in-process via its clang-analyzer-* checks — no separate scan-build pass needed.
  • The cppcheck hard gate was widened from lookupTables.cpp only to all headers.
  • Each gate ships with a make target that reproduces it locally (make sanitize, make cppcheck, make coverage && make coverage-check, make -C formal prove, make -C fuzz fuzz-ci, make misra, make tidy).
  • The bar is documented: a Quality Gates section in the README and a Code Quality section on the Pages landing page, both with live status badges.

Correctness fixes (surfaced by the new gates)

  • Eliminated undefined behavior across the core library flagged by ASan/UBSan (misalignment, out-of-bounds indexing, signed-shift UB).
  • int8 QLayerNorm: prevented int32 overflow in the gamma multiply.
  • WrapPolicy::saturate: value-initialize the result (was a uninitialized-read path).
  • CodeQL: fixed a wider-type comparison in the int8 QLayerNorm fuzz path.
  • KolmogorovArnoldNetwork: made non-copyable via = delete (owned-pointer copy hazard).
  • Fixed a no-return operator= and computed the perf_matrix checksum in unsigned arithmetic.
  • Added a libFuzzer harness for the int8 QLayerNorm kernel and CBMC proofs for the qformat fixed-point kernels.

Documentation & knowledge graph

  • Split the long-form architecture reference out of CLAUDE.md into docs/ARCHITECTURE.md.
  • Added a Knowledge Graph of the repository (graphify) with a Pages page and a maintenance guide; the graph is regenerated during the Pages build (community-aggregated view, not the full hairball) rather than tracked in git.
  • Recolored white-background diagrams to match the dark site theme.

Examples

  • Added decision-surface (predicted-vs-actual) plots to the XOR, KAN-XOR, and GRU-XOR examples, including a dense-trained KAN surface.

Full changelog: https://github.com/danmcleran/tinymind/compare/v11.0…v12.0

v11.0 — Liquid neural networks (LTC/CfC), full visualization + GitHub Pages, UCI dataset examples

Released 2026-06-07 · v11.0 on GitHub

Headline: continuous-time liquid neural networks land (LTC + CfC, float-autodiff-trained and int8-deployable), every example now ships a plot and a GitHub Pages write-up, and the example suite gains seven real-dataset programs built on UCI data.

New architectures — Liquid Time-Constant & Closed-form Continuous-time cells

  • cpp/ltc.hpp — LtcCell, a fused semi-implicit-Euler ODE cell, unconditionally stable, differentiated for free through the existing PINN autodiff (forward MultiDual + reverse RevVar). Float / fixed-point tier.
  • cpp/cfc.hpp — CfCCell, the solver-free closed-form sibling with a runtime time-gate, so it handles irregular sampling. Float autodiff + reaches the int8/freestanding corner LTC can’t.
  • cpp/qcfc.hpp — QCfCCell, pure-integer int8 deployable CfC (regular-sampling form, ts folded at calibration). No <cmath> on the inference path.
  • Calibration helpers (buildQCfCParams, biases) and unit suites (unit_test/ltc, unit_test/cfc, quantization parity) added.
  • Exemplars: examples/ltc_sequence, examples/cfc_sequence (irregular-sampling drive), examples/qcfc_liquid_int8 (int8 deployment).

Visualization + GitHub Pages

  • Shared style module examples/plotting/tinymind_plot.py (matplotlib-only, headless Agg fallback, theme-aware dark for docs / light default).
  • Every runnable example now emits a header-row CSV and ships a plot.py — CSV-first contract, numbers owned by the C++ side.
  • Full GitHub Pages site: example gallery, per-example how-it-works pages, architecture notes, and the as-built UCI dataset capability report.

Real-dataset examples (UCI)

  • Seven new dataset-driven examples: iris, energy_efficiency (regression, linear readout), optical_digits (8x8 CNN-scale MLP), har_activity (LSTM), air_quality (LSTM forecasting), gas_sensor_drift (drift curve), predictive_maintenance (AI4I 2020, physics product features).
  • Fixed LinearActivationPolicy fixed-point derivative (enables fixed-point regression).

Coverage + correctness

  • 100% line coverage of cpp/; closed PINN / LTC / CfC / QCfC unit-test gaps; make coverage dashboard + browser target.
  • Convergence/fit fixes across xor, gru_xor, lstm_sinusoid, kan_xor, ltc, cfc, qcfc, air_quality, predictive_maintenance, and the PINN heat equation.

Build

  • Recursive root make clean.

v10.2 — Enable Physics-Informed Neural Networks

Released 2026-06-02 · v10.2 on GitHub

v10.1 — Refresh README to cover Phase 9-17 additions

Released 2026-05-13 · v10.1 on GitHub

Refresh README to cover Phase 9-17 additions

Bring README in line with the current codebase: expand the quantization section with Phase 10-13 composition ops, norms, recurrent cells, and attention/FFT; add new sections for the mixed-precision bridges (qbridge

  • fp16/bf16), SIMD performance backend, and importer tooling; extend the platform feature gates table with FP16, INT16_ACCUM, the twelve SIMD_* gates, and OPENMP; bump the embedded matrix from five to eight corners; refresh build examples, project structure tree, and stale line counts.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

v10.0 — Add more support for quantization

Released 2026-05-12 · v10.0 on GitHub

v9.2 — Updated README for quantization

Released 2026-05-10 · v9.2 on GitHub

v9.0 — Implement Quantization

Released 2026-05-10 · v9.0 on GitHub

v8.3 — Gate off C++ std namespace and float support orthogonally

Released 2026-05-06 · v8.3 on GitHub

v8.2 — Create new build switches to manage floating point inclusion

Released 2026-05-01 · v8.2 on GitHub

v8.1 — Fix Xavier weight initialization for heterogeneous hidden layers

Released 2026-04-28 · v8.1 on GitHub

v8.0 — Address unit test gaps and various fixes

Released 2026-04-27 · v8.0 on GitHub

v7.0 — Add predictive maintenance capability

Released 2026-04-22 · v7.0 on GitHub

v6.0 — Implement linear self-attention networks

Released 2026-04-06 · v6.0 on GitHub

v5.2 — Fix LSTM Unit Test

Released 2026-04-03 · v5.2 on GitHub

v5.1 — Fix ChainHiddenLayerAccessor set* methods to be function templates

Released 2026-04-03 · v5.1 on GitHub

The four set* methods in ChainHiddenLayerAccessor<LayerChain<…» were non-template static functions, but recursive calls invoked them with ::template set*(...), requiring them to be function templates.

The get* methods in the same struct already used template. Apply the same pattern to setBiasNeuronWeightForConnection, setBiasNeuronDeltaWeightForConnection, setWeightForNeuronAndConnection, and setDeltaWeightForNeuronAndConnection.

Add unit tests to prevent regression.

v5.0 — Use NeuralNetwork As The Primary Model

Released 2026-04-02 · v5.0 on GitHub

Use NeuralNetwork as the primary model. Alias the other older code to maintain backwards compatibility.

v4.4 — Binary and Ternary Networks

Released 2026-04-01 · v4.4 on GitHub

Implement binary and ternary network models.

v4.3 — Adam Optimizer, RMS Prop, and Pool 1D

Released 2026-03-31 · v4.3 on GitHub

v4.2 — Fix hidden layer weight bug in nnproperties

Released 2026-03-27 · v4.2 on GitHub

Fix hidden layer weight bug in nnproperties and create documentation.

v4.1 — Unit test and doc updates for KAN

Released 2026-03-26 · v4.1 on GitHub

v4.0 — Hidden layer restriction removed. LSTM and KAN implemented.

Released 2026-03-23 · v4.0 on GitHub

Used Claude Code to do the following

  • Remove the restriction where the number of neurons within all hidden layers were forced to be identical.
  • Implement LSTM
  • Implement KAN

v3.1.2 — Add in float support for NN props

Released 2026-03-02 · v3.1.2 on GitHub

v3.1.1 — Remove PNGs

Released 2026-02-20 · v3.1.1 on GitHub

Remove the PNGs from the repository.

v3.1 — PyTorch model weights imported

Released 2026-02-19 · v3.1 on GitHub

Fix the NN weights store/restore. Includes and example of a PyTorch model weights exported and imported into tinymind.

v3.0 — Enable unlimited hidden layers

Released 2026-02-05 · v3.0 on GitHub

Enable unlimited hidden layers and add a unit test for 4 hidden layers.

v2.7.8 — Remove restriction on NN props.

Released 2026-02-05 · v2.7.8 on GitHub

Remove the 2 hidden layer restriction on nn properties.

v2.7.7 — clang warning accommodation

Released 2026-01-27 · v2.7.7 on GitHub

Always parse the largest signed int during NN weight restore and avoid clang warning about unsafe statics.

v2.7.6

Released 2026-01-26 · v2.7.6 on GitHub

Store all output and learned values for > 1 output neuron.

v2.7.5 — NN Props Account For > 1 Output

Released 2026-01-26 · v2.7.5 on GitHub

v2.7.4 — Use 1ULL within LUT to prevent overflow

Released 2026-01-26 · v2.7.4 on GitHub

v2.7.3 — Use 1ULL for bit shift operation

Released 2026-01-26 · v2.7.3 on GitHub

v2.7.2 — Various Makefile updates

Released 2026-01-20 · v2.7.2 on GitHub

v2.7.1 — Rename selector and policy classes for uniformity

Released 2026-01-19 · v2.7.1 on GitHub

v2.7 — Extract weight init into a policy class

Released 2026-01-19 · v2.7 on GitHub

v2.6.3 — Use ReLU and Sigmoid in the XOR Example

Released 2026-01-15 · v2.6.3 on GitHub

v2.6.2 — Test both uniform and normal Xavier weight init

Released 2026-01-15 · v2.6.2 on GitHub

v2.6.1 — No more input files

Released 2026-01-14 · v2.6.1 on GitHub

With static srand seed, we no longer need NN unit test input files.

v2.6.0 — Support Xavier weight init

Released 2026-01-14 · v2.6.0 on GitHub

v2.5.9 — Update DQN Maze example.

Released 2026-01-13 · v2.5.9 on GitHub

v2.5.8 — Use static rand seed and expand make check

Released 2026-01-12 · v2.5.8 on GitHub

v2.5.7 — Added a Makefile to build and run unit tests

Released 2026-01-08 · v2.5.7 on GitHub

v2.5.6 — Use fixed random seed in examples and unit tests

Released 2026-01-08 · v2.5.6 on GitHub

v2.5.5 — Makefile cleanup

Released 2026-01-08 · v2.5.5 on GitHub

Clean up Makefiles and make them look uniform.

v2.5.4 — Enable pedantic in unit tests and example programs

Released 2026-01-06 · v2.5.4 on GitHub

-W pedantic was enabled on all unit tests and example programs. Minor changes were required to meet this new bar. Makefiles were augmented to make running and plotting results of example programs easier.

v2.5.3 — Build and align warning fixes

Released 2025-12-17 · v2.5.3 on GitHub

v2.5.2 — Check for C++11

Released 2025-12-17 · v2.5.2 on GitHub

Check for C++11 support for nullptr and remove extra semi-colons.

v2.5.1 — Minor updates for build(s)

Released 2025-12-16 · v2.5.1 on GitHub

Enables the use of -Wextra and -Werror. Some minor fixes for embedded stl builds.

v2.5 — Provide a saturation policy to Q-format

Released 2025-11-14 · v2.5 on GitHub

v2.4.2 — Calculate min possible value at compile-time

Released 2025-11-04 · v2.4.2 on GitHub

Added a min value calculator and unit test.

v2.4.1 — Q format bug fixes

Released 2025-10-20 · v2.4.1 on GitHub

v2.4 — 128-bit support within neural networks and unit test fixes.

Released 2025-10-15 · v2.4 on GitHub

v2.3.3 — Unit test improvements

Released 2025-07-02 · v2.3.3 on GitHub

Use fixed, pre-calculated values for NN unit testing. Fix signed/unsigned compare in unit tests.

v2.3.2

Released 2024-12-30 · v2.3.2 on GitHub

Remove use of modern C++ syntax and keep it simple for older compilers.

v2.3.1 — Remove use of C++17 to support older compilers

Released 2024-12-29 · v2.3.1 on GitHub

Remove the use of the C++ 17 feature, constexpr. Some older compilers do not support C++17 on embedded systems.

v2.3.0 — Add debug symbols and C++17 to all makefiles

Released 2024-12-23 · v2.3.0 on GitHub

v2.2.9 — Fix Makefiles

Released 2024-11-22 · v2.2.9 on GitHub

Fix the Makefiles which got broken in the prior release.

v2.2.8 — Move C++ include folder to cpp

Released 2024-03-19 · v2.2.8 on GitHub

v2.2.6 — Update Q Learning PUML

Released 2024-02-12 · v2.2.6 on GitHub

Update the Q learning PUML to preview within VS Code

Released 2023-10-12 · v2.2.5 on GitHub

v2.2.4 — More neural net example code.

Released 2023-10-11 · v2.2.4 on GitHub

v2.2.3

Released 2023-10-06 · v2.2.3 on GitHub

Added the ability to parse and plot LUTs.

v2.2.2

Released 2023-05-12 · v2.2.2 on GitHub

Add support for placement new.

v2.2.1

Released 2023-05-05 · v2.2.1 on GitHub

Added LinearActivationFunction

v2.2.0

Released 2023-02-28 · v2.2.0 on GitHub

  • Use a gitignore file to store apps, unit test, and example outputs in their respective root directories.
  • Move nn properties to a global include folder and out of the apps directory.

v2.1.0

Released 2023-02-24 · v2.1.0 on GitHub

Use #if rather than #ifdef for build switches controlling LUT generation.

v2.0.0

Released 2023-02-22 · v2.0.0 on GitHub

Added 128 bit support.

v1.0.0

Released 2022-11-16 · v1.0.0 on GitHub

Tagging v1.0.0


Back to top

Dan McLeran — danmcleran@gmail.com — MIT License

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