Skip to content

Releases: HyperFoldUK/sparse-ternary-fma

Sparse Ternary FMA Kernel v1.0.0

27 Dec 10:58

Choose a tag to compare

Sparse Ternary FMA Kernel v1.0.0

Release Date: December 27, 2025
License: Apache 2.0
Author: Maurice Wilson, HyperFold Technologies UK


🎉 First Stable Release

We are excited to announce the first stable release of the Sparse Ternary FMA Kernel, a high-performance, dependency-free C library that achieves 50-100× sparse speedup over standard FFT-based FHE polynomial multiplication through direct ternary arithmetic.

This kernel represents a fundamental architectural shift in how ternary operations are performed at the silicon level, exploiting sparsity through O(w) complexity where standard FFT-based approaches are constrained by O(N log N) complexity.

NEW: Now applicable to both FHE schemes and LLM inference (BitNet, 1.58-bit models)!


🚀 Key Features

Performance

  • 50-100× sparse speedup (w=128, N=2048) over FFT-based polynomial multiplication
  • 6-11× dense speedup for non-sparse operations
  • 1,165 Mtrits/s throughput with AVX-512 SIMD acceleration
  • 188 ns latency for sparse FMA operations

Architecture

  • 2-bit ternary encoding with 75% memory reduction
  • AVX-512 SIMD acceleration with automatic scalar fallback
  • Sparse exploitation - processes only non-zero elements (O(w) complexity)
  • Zero dependencies - pure C with standard library only

Applications

  • FHE: Client-side encryption, secure MPC, privacy-preserving cloud services
  • LLM Inference: On-device deployment, transformer acceleration, ternary quantization
  • Low-Precision AI: Ternary neural networks, edge AI, energy-efficient inference

📊 Performance Comparison

Operation Standard FHE (FFT) t-Enc FMA Kernel Speedup
Dense polynomial mult ~10-20 μs 1.76 μs ~6-11×
Sparse polynomial mult ~10-20 μs 0.188 μs ~53-106×
Throughput ~50-100 Mtrits/s 1,165 Mtrits/s ~12-23×

🔐 License

This project is licensed under the Apache License 2.0.

The Apache 2.0 license provides:

  • Permissive usage for commercial and open-source projects
  • Explicit patent protection from contributors
  • Simple attribution requirements
  • No copyleft restrictions

For more information: https://www.apache.org/licenses/LICENSE-2.0


📦 Quick Start

git clone https://github.com/HyperFoldUK/sparse-ternary-fma.git
cd sparse-ternary-fma
make
./bin/benchmark

🔗 Links


Status: ✓ Production Ready
Quality: ✓ Verified
Performance: ✓ Benchmarked
Documentation: ✓ Complete