COOLJAPAN
← All posts

TenfloweRS 0.1.2 Released — Implicit Autograd, Real ONNX Interop, and an Honesty-Hardening Sweep

TenfloweRS 0.1.2 adds PyTorch-style implicit autograd for Python, real ONNX protobuf import/export, a pure-Rust Blosc codec for Zarr, and a wide honesty-hardening sweep that replaces fabricated results with real computation or honest errors across the framework.

release tenflowers machine-learning deep-learning tensorflow rust onnx autograd

A classifier that reports 95% accuracy no matter what it predicts is not a metrics bug — it’s a lie the code was telling on every training run.

Today we released TenfloweRS 0.1.2 — a release that ships real new capability (PyTorch-style implicit autograd for Python, real ONNX protobuf import/export, a from-scratch pure-Rust Blosc codec) alongside something you don’t see in most changelogs: a deliberate sweep through the framework looking for exactly that kind of lie, and replacing every one it found with either a real computation or an honest error.

TenfloweRS is the pure-Rust answer to TensorFlow. The tensor engine, the autodiff tape, the neural layers, the dataset pipeline, and the GPU backend are all Rust — no C runtime, no CUDA-C kernels, and no Python interpreter required at inference time (Python is opt-in, through a PyO3 FFI crate that isn’t published to crates.io). It compiles to a single static binary and runs everywhere the SciRS2/NumRS2 stack beneath it already runs.

Why TenfloweRS 0.1.2 is a game changer

Every ML framework asks you to trust it. The usual reasons not to are familiar:

0.1.2 goes after a fourth, less-discussed failure mode: a research-scale codebase — 150+ domains, 11,596 tests in the neural crate alone — inevitably accumulates code paths nobody finished, and it’s far too easy for those paths to return a plausible-looking Ok(()) instead of failing loudly.

TenfloweRS 0.1.2 ends all of that.

That work sits on top of a large test suite: 14,289+ tests passing (39 skipped) across 6 crates, zero clippy warnings, zero rustdoc warnings.

Technical Deep Dive: what actually changed under the hood

  1. tenflowers-core — real ONNX protobuf interop, graph optimization wired into Session via a new protected_output_roots accumulator (so a previously-fetched node always survives later optimization passes), real wgpu::Adapter capability probing to replace vendor-guessing GPU detection, real LAPACK-backed f64 linear algebra (inverse_f64, determinant_f64, svd_f64, solve_f64) via scirs2-linalg, and N-D support for segment reductions.
  2. tenflowers-autograd and tenflowers-neural — the honesty sweep’s home base: a new GradientExecutor trait bridges the two crates (dependency-inversion, no circular dependency) so tenflowers-core’s gradient-validation framework can call into a real GradientTape-backed implementation instead of fabricating passed: true; Conv2D/Conv3D backward gradients went from zero-tensor placeholders to real transposed-cross-correlation implementations; and across tenflowers-neural, distributed backends, the pruning engine, mixture-of-experts routing, and weight serialization all moved from simulated or fabricated output to genuine computation or honest errors.
  3. tenflowers-dataset — HDF5 chunked/attribute/tree/slice readers, Parquet row-group readers with filter predicates and schema inspection, the new Blosc decoder, real masked-CRC TFRecord integrity checks (TensorFlow’s actual algorithm, not an approximation), GPU image transforms (affine, perspective, elastic distortion, histogram equalization, each backed by its own WGSL shader), and auto-vectorized SIMD preprocessing functions.
  4. tenflowers-ffi — the implicit_autograd module described above, a standalone pure-Rust GradientParityChecker (finite-difference gradient verification usable outside PyO3), a session-based PyProfiler recording op name/duration/memory/device, and 46 fixed #[pyo3(signature = ...)] annotations closing a class of silent breakage where calling e.g. tf.sum(x) without dim/keepdim raised TypeError: missing required argument despite the Rust side already having a default.

Getting Started

Add the meta-crate:

cargo add tenflowers

A small taste of 0.1.2’s new structured logging and platform introspection, wrapped around ordinary eager tensor math:

use tenflowers::prelude::*;
use tenflowers::logging::{init_from_env, set_log_level, LogLevel};
use tenflowers::platform::{current_platform, detect_simd_capabilities};
use tenflowers::{log_info, log_warn};

fn main() -> Result<()> {
    // New in 0.1.2: structured logging, configurable via TENFLOWERS_LOG
    init_from_env();
    set_log_level(LogLevel::Info);

    let simd = detect_simd_capabilities();
    log_info!("running on {} (AVX2: {})", current_platform(), simd.has_avx2);

    // Ordinary eager tensor math, unchanged
    let a = Tensor::<f32>::from_vec(vec![1.0, 2.0, 3.0, 4.0], &[2, 2])?;
    let b = Tensor::<f32>::from_vec(vec![10.0, 20.0, 30.0, 40.0], &[2, 2])?;
    let c = ops::matmul(&a, &b)?;
    log_info!("matmul result: {:?}", c.to_vec()?);

    if c.size() == 0 {
        log_warn!("empty result -- check your inputs");
    }
    Ok(())
}

What’s New in 0.1.2

Tips

This is the foundation

TenfloweRS leans directly on the rest of the COOLJAPAN ecosystem: NumRS2 (bumped to 0.4.0 this release) for n-dimensional arrays, the SciRS2 stack (now 0.6.0) for the scientific core and the new LAPACK-backed linear algebra, Oxicode for serialization, OxiARC (oxiarc-archive plus new direct oxiarc-lz4/oxiarc-deflate/oxiarc-snappy dependencies) for every compression codec the Blosc decoder needs, OxiBLAS (oxiblas-ndarray, wired in behind the blas-oxiblas feature per COOLJAPAN’s pure-Rust BLAS policy) for linear algebra, and OxiFFT for the FFT ops that landed real implementations this release. It stands alongside ToRSh, TrustformeRS, and sklears in the COOLJAPAN machine-learning stack.

Repository: https://github.com/cool-japan/tenflowers

Star the repo if a framework that fixes its own fabricated results instead of quietly shipping around them is something you want to see more of. The era of trusting a black box because it printed a confident number is over. Pure Rust ML is here — fast, safe, and sovereign.

KitaSan at COOLJAPAN OÜ July 8, 2026

↑ Back to all posts