The bugs that made Kizzasi’s training loop a no-op, and its “SafeTensors” checkpoints an unreadable lie, are gone — and the neuro-symbolic constraint layer the project always meant to ship is finally real.
Today we released Kizzasi 0.2.2 — the largest correctness pass the project has had, shipped alongside a genuinely new WebGPU acceleration backend, real tensorlogic-ir neuro-symbolic constraints, and perceptual audio quality evaluation.
No C. No C++. No Fortran. No Python interpreter required to run a model, no CUDA toolkit pinned to a driver version. Kizzasi is still Rust end to end — it compiles to a single static binary (or WASM), runs no_std on microcontrollers, and now optionally offloads SSM kernels to the GPU through wgpu, Pure Rust the whole way down.
The webgpu feature is off by default — no GPU, no problem, the CPU backend is always there.
Why Kizzasi 0.2.2 is a game changer
0.2.1 turned Kizzasi from an inference engine into a train-and-deploy stack. What that release didn’t surface: several of the load-bearing pieces of that stack were quietly broken.
Trainer::fit()built its training and validation batches as a hardcoded emptyVec::new()every epoch. No training ever actually ran — not slowly, not incorrectly, not at all.WeightLoader::save_safetensorswrote an empty, invalid buffer.save_weightson five model types (Mamba, Mamba2, RWKV, S4D, Transformer) silently wrote the JSON format while documented and named as SafeTensors — any file written this way was unreadable by a real SafeTensors reader.- Mixture-of-Experts routing was zero-initialized: every expert produced identically zero output, and routing decisions were input-independent.
- Mamba2’s discretized state matrix used
.abs(), forcing it permanently positive instead of negative — the recurrent state could only diverge over long sequences. - The Adam optimizer applied weight decay unscaled by the learning rate — up to ~1000× stronger than intended.
SelectiveSSM’s timestepΔwas hardcoded to0.1— the input-dependent selectivity that gives Mamba its name never actually engaged.
Kizzasi 0.2.2 ends all of that. Every one of these — and dozens more across kizzasi-core, kizzasi-model, kizzasi-tokenizer, kizzasi-logic, and kizzasi-inference — is fixed and covered by a regression test. On top of the correctness sweep, this release ships the neuro-symbolic constraint layer for real: tensorlogic-ir now compiles and evaluates TLExpr constraints directly, replacing a placeholder that had been commented out since the beginning. And a new WebGPU backend gives the SSM scan somewhere to run besides the CPU.
Technical Deep Dive: what changed
kizzasi-webgpu— a new workspace crate. Awgpu-based acceleration backend for the SSM/signal kernels: WGSL implementations of SiLU, RMS Norm, matrix-vector multiplication, and a Blelloch work-efficient parallel prefix scan for the SSM recurrence.WebGpuSsmBackendruns short sequences on the GPU and falls back to the CPU backend for longer ones — pure Rust and GPU-free by default, unlocked with--features webgpu.kizzasi-core— a pluggable backend, and real quantization. A newSsmBackendtrait (withCpuSsmBackendas the default) is whatkizzasi-webgpuplugs into. INT8 quantization lands as a first-class API — per-tensor and per-channel affine quantize/dequantize onWeightLoader— alongside head-wise and block-wise structured pruning granularities.kizzasi-model— the correctness sweep’s biggest crate, plus new bridges. Beyond the fixes above: atensorlogic_bridgemodule compiles symbolicTLExprconstraints for use inside model code, GGUF loading now respects thegeneral.alignmentmetadata key instead of hardcoding 32 bytes, and RWKV7 was split intomod/channel_mixing/time_mixingwith JSON weight round-tripping for both blocks.kizzasi-logic—tensorlogic-irfor real.TlExprCompilerlowersTLExprto a stack-VMCompiledConstraint(with algebraic simplification and constant folding), andTLExprEvaluatorevaluates it directly using Gödel soft-logic semantics (And=min,Or=max,Not=1−a,Imply=max(1−a,b)). The old commented-outSymbolicExprplaceholder is gone.kizzasi-tokenizer— perceptual audio and multi-speaker support. A PEAQ (ITU-R BS.1387-1 Basic Model) evaluator computes all 11 Basic Model Output Variables through a Bark-band ear model and maps them to an Objective Difference Grade; a new Bark-scale perceptual quantizer allocates bits per critical band via Hann-windowed STFT/ISTFT on the newoxifftdependency; andMultiSpeakerTokenizeradds a k-means++-initialized, EMA-updated speaker codebook with blind or explicit speaker assignment.kizzasi-python— five new classes.BeamSearch,ConstrainedBeamSearch, andRejectionSamplerfor autoregressive decoding;EnsemblePredictorwith six voting strategies;OptimizedPredictorwith workspace pooling, SIMD kernels, and a TTL-based LRU cache;LoRAAdapterfor in-place weight correction from NumPy arrays; andSamplingConfig/Samplerfor greedy/temperature/top-k/top-p sampling.
Getting Started
Nothing changed in the basic Rust API — add the crate and predict:
cargo add kizzasi
use kizzasi::prelude::*;
fn main() -> KizzasiResult<()> {
let config = KizzasiConfig::new()
.model_type(ModelType::Mamba2)
.input_dim(3)
.output_dim(3)
.hidden_dim(256)
.state_dim(16)
.num_layers(4)
.context_window(8192);
let mut predictor = Kizzasi::new(config)?;
let input = array![0.1, 0.2, 0.3];
let output = predictor.step(&input)?;
println!("Predicted: {:?}", output);
Ok(())
}
New in 0.2.2 for the Python side — sampling strategies over raw logits:
pip install kizzasi
import numpy as np
import kizzasi
config = kizzasi.SamplingConfig() # default: strategy="greedy", temperature=1.0
config.strategy("top_k")
config.top_k(3)
config.seed(42)
sampler = kizzasi.Sampler(config)
logits = np.array([1.0, 3.0, 0.5, 2.5, 1.8], dtype=np.float32)
sampler.sample(logits) # -> float, single sampled value
batch_logits = np.random.randn(8, 5).astype(np.float32)
sampler.sample_batch(batch_logits) # -> np.ndarray shape (8,)
What’s New in 0.2.2
- New crate:
kizzasi-webgpu— WGSL kernels (SiLU, RMS Norm, matvec, Blelloch parallel scan) with automatic CPU fallback, behind an opt-inwebgpufeature. - Real constraints:
tensorlogic-irbacking forkizzasi-logic’s symbolic constraints —TlExprCompiler+TLExprEvaluator, replacing a long-commented-out placeholder. - Quantization & pruning: INT8 per-tensor/per-channel quantization on
WeightLoader; head-wise and block-wise structured pruning granularities. - Perceptual audio: PEAQ (ITU-R BS.1387-1) quality evaluation, Bark-scale psychoacoustic quantization, and multi-speaker tokenization with a k-means++ codebook.
- Python bindings grew:
BeamSearch/ConstrainedBeamSearch/RejectionSampler,EnsemblePredictor,OptimizedPredictor,LoRAAdapter,SamplingConfig/Sampler. - Macros now do what they say:
#[config(default/validate/skip)]on#[derive(KizzasiConfig)], multiple named<name>_preset()methods on#[derive(Preset)], and#[metrics]/generic-struct support on#[derive(Instrumented)]— all previously accepted but silently ignored. - The correctness sweep: training actually trains (
Trainer::fit()no longer builds empty batches), SafeTensors saves are real and round-trippable on five model types, MoE routing is no longer zero-initialized, Mamba2/S5/RWKV/Mamba’s SSM recurrences had sign and discretization bugs fixed, Adam’s weight decay is correctly scaled, and dozens more — seeCHANGELOG.mdfor the full breakdown, crate by crate. - Dependencies moved up: SciRS2 to the 0.6 line,
oxifft0.4.2 (now also a direct dependency ofkizzasi-tokenizer),oxicode0.2.6,candle0.11,pyo30.29,safetensors0.8.
Tips
- If you trained or saved checkpoints on 0.2.1, redo it on 0.2.2.
Trainer::fit()wasn’t actually training, andsave_weights/save_safetensorson five model types wasn’t writing usable files — anything produced before this release should be regenerated, not migrated. - Reach for
tensorlogic-irconstraints directly.TLExprandTlExprCompiler/TLExprEvaluatorare re-exported fromkizzasi_logic— you can now compile a symbolic constraint once withcompile_optimized()and evaluate it as fast soft logic on every prediction, instead of hand-rolling bound checks. - Turn on
webgpufor long-context batches, not single steps.WebGpuSsmBackendonly pays off once sequence length amortizes the dispatch cost — short sequences still route to the CPU backend automatically. - Treat PEAQ’s ODG as a trend indicator, not a certified score. The 11→3→1 neural network’s weights are LCG-seeded placeholders pending the paid ITU-R BS.1387-1 Annex 2 tables (
peaq::nn::WEIGHTS_VERIFIED == false) — useful for relative A/B comparisons, not for citing an official Objective Difference Grade. - INT8-quantize for memory-constrained deployment.
WeightLoader::quantize_tensor/quantize_per_channelgive you aQuantizedTensor/PerChannelQuantizedTensoryou can dequantize back tof32at inference time — useful ahead ofkizzasi-embeddedtargets. - Try the new Python decoding utilities together.
SamplingConfigfeeds bothSamplerfor plain stochastic decoding andRejectionSamplerfor constrained stochastic decoding;BeamSearch/ConstrainedBeamSearchcover the deterministic side.
This is the foundation
Kizzasi 0.2.2 sits in a Pure-Rust ecosystem that keeps filling out. Its math and signal layers now ride SciRS2 0.6 with OxiFFT for transforms (used directly by both kizzasi-core and the new perceptual quantizer in kizzasi-tokenizer) and Oxicode for serialization, while the WebGPU backend runs on wgpu. The neuro-symbolic constraints build on tensorlogic-ir, now wired in for real instead of stubbed out. It shares the deep-learning neighborhood with ToRSh, TensFloweRS, TrustformeRS, and SkleaRS, and slots into the broader stack alongside OxiLLaMa, OxiONNX, and VoiRS — a coherent, sovereign alternative to the PyTorch/CUDA/GGML world for signals that aren’t text.
Repository: https://github.com/cool-japan/kizzasi
Star the repo if a signal predictor that trains, constrains, and now GPU-accelerates — all in Pure Rust — is something you want in your stack. The era of trusting a checkpoint format you can’t verify is over. Pure Rust signal prediction is here — fast, safe, and sovereign.
— KitaSan at COOLJAPAN OÜ August 10, 2026