Back to directory

tensai

A small, dependency-free neural-network framework written in pure Go, with hand-written AVX2 and NEON SIMD kernels for training and inference on ordinary CPUs.

tensai

tensai is a small machine-learning framework for learning and experimentation, implementing forward passes, backpropagation, and optimization in pure Go with no external dependencies in its default build. It provides a Matrix type with basic linear-algebra operations and a more general N-dimensional Tensor type supporting broadcasting, batched matrix multiplication, transposing views, and reshaping without copying data where possible.

Its SIMD acceleration uses Go's experimental archsimd package to hand-vectorize matrix multiplication, common activation functions, layer normalization, and the Adam optimizer update on AVX2, with a smaller set of kernels on ARM64 NEON, while remaining pure Go with no cgo or assembly files; unsupported platforms fall back automatically to portable code with identical results. Layers reuse their forward and backward scratch buffers across training steps to keep garbage collection out of the training loop, and an experimental WebGPU backend runs batched matrix multiplication on any GPU that wgpu-native reaches, again without cgo.

Its documentation site covers every package in both English and Japanese, and it is released under the MIT license.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.