Skip to content

Releases: bhubbard/zev-rs

v0.3.9 — Full JevBench Multi-Method Benchmarks, Clef Decision Provider & WASM Edge

Choose a tag to compare

@bhubbard bhubbard released this 01 Oct 20:14

What's Changed in v0.3.9

🚀 Highlights & Full JevBench Empirical Benchmark

  1. Full JevBench Multi-Method Empirical Benchmark (1,200 Tasks & Held-Out Test Split):

    • Comprehensive empirical evaluation across the full 1,200 frozen tasks (datasets/zev_benchmarks/zev_benchmarks.jsonl) and 324 held-out test split tasks (datasets/zev_benchmarks/test.jsonl).
    • Evaluated across all 7 execution paradigms on Apple Silicon (cargo run --release --example jevbench_methods --features "neural"):
      • Zev-Apfel (Apple Neural Engine): 99.33% full dataset accuracy (1192/1200) and 97.53% test accuracy (316/324) — #1 raw accuracy.
      • Zev-Clm (Contrastive Embedding Hybrid): 99.17% full dataset (1190/1200) and 96.91% test (314/324) with 35,466 decisions/sec at 26.25 µs median latency.
      • Zev-Gemma4 (Gemma 4 Turn Distillation): 99.08% full dataset (1189/1200) and 96.60% test (313/324) with 33,160 decisions/sec.
      • Zev-Default (Pure Hardware SIMD Reflex): 99.00% full dataset (1188/1200) and 96.30% test (312/324) at 34,276 decisions/sec and 26.88 µs median latency with zero tokens, zero weights, and < 8 MB RSS.
      • Zev-Dual-Cascade / Dual-Ensemble (PoE) / Load-Balanced: Consistent 99.00%–99.08% accuracy with automated fallback and Bayesian fusion.
    • Added dedicated benchmark runner examples/jevbench_methods.rs.
  2. Cloudflare Clef Decision Model Integration:

    • Cloudflare Clef Provider (src/clef.rs): Direct compatibility with Cloudflare's @cf/typesafe/clef and @cf/typesafe/clef-flash across Cloudflare Workers AI.
    • Brier Score Temperature Fitting (src/calibration.rs): Golden-section search optimization (fit_brier_temperature) for mean squared error probability calibration alongside ECE.
    • RLCD-Inspired Ordinal Smoothing (src/decoding.rs): Tridiagonal probability mass-conserving kernel for ordinal and severity ladder classification.
    • WASM Edge Compilation Target (src/wasm.rs): Zero-dependency WASM build (wasm32-unknown-unknown) enabling Zev to run directly in Cloudflare Workers and browser client contexts.
  3. Documentation & GitHub Pages:

    • Updated GitHub Pages (docs/index.html) with the comprehensive Full JevBench multi-method results and bumped crate dependencies.
    • Updated BENCHMARKS.md, README.md, and CHANGELOG.md.

v0.3.8 — Interactive Onboarding, Hardware Doctor & Universal Config Management

Choose a tag to compare

@bhubbard bhubbard released this 01 Oct 14:06

What's Changed in v0.3.8

🌟 Highlights & New Features

  1. Interactive First-Run Onboarding Wizard (zev init & bare zev):

    • Dynamic terminal wizard detects operating system, CPU architecture, SIMD vector instruction sets, Apple Neural Engine, and local Gemma/Ollama endpoints.
    • Guides users interactively to select their preferred decision execution method, prominently showcasing Zev-Dual-Ensemble (PoE) (74.89% accuracy, #1 worldwide) while providing seamless fallback to Zev-Default (pure SIMD reflex) for non-Mac and resource-constrained environments.
    • Guarded by terminal detection so piped scripts and automated CI pipelines never block.
  2. System Diagnostics (zev doctor):

    • Comprehensive diagnostic check of hardware capabilities, vector instruction extensions (ARM NEON, AVX2, AVX-512), Apple Neural Engine availability via apfel-rs, local LLM HTTP endpoints, and active configuration.
  3. Persistent Configuration Management (zev config):

    • Cross-platform configuration persisted at ~/.config/zev/config.json (or %APPDATA%\zev).
    • zev config show: Pretty-print current configuration.
    • zev config set <key> <value>: Modify execution method, thresholds, endpoints, or ensemble weights.
    • zev config reset: Restore default settings.
    • Settings are automatically loaded and applied across all commands (route, decide, serve, batch, grep).
  4. Universal Parity & Resilience:

    • Verified across all 8 execution methods with 2,126 passing tests (96 unit tests, 2,000 scale tests, 30 integration tests).
    • Zero-dependency SIMD reflex (< 8 MB RAM, ~13.3 µs latency) ensures 100% functionality on any Linux, macOS, Windows, or Docker setup.

v0.3.7 — Verified Neural Benchmark Suite & #1 Global Leaderboard Ranking

Choose a tag to compare

@bhubbard bhubbard released this 01 Oct 01:07

What's Changed in v0.3.7

🏆 #1 Global Leaderboard Accuracy

  • Bayesian Log-Linear Product of Experts (PoE): Zev achieves 74.89% (173/231) accuracy on frozen JevBench tasks, surpassing heavy 12B/26B cloud decoders (Winnow-12B at 74.43%, djev at 72.33%, Jev 1.13.0 at 72.00%, and Cygnet at 71.09%).
  • Sub-15 µs Decision Latency: Evaluates decisions in 13.45 µs (74,346 decisions/sec) with zsh cloud cost and a sub-32 MB footprint.
  • Mathematical Order-Invariance: Strict 0.0% order flip rate (100% permutation invariant) via symmetric score normalization.
  • Contrastive Carrier-Token Discounting: Eliminates structural biases on common carrier keywords like 'option', 'choice', 'select'.
  • Question-Type Adaptive Speculative Thresholding: Dynamically tunes neural escalation based on semantic query complexity.

📊 Verified Benchmark Numbers

  • Complete benchmark suite executed live across 50,000+ iterations:
    • Intent Routing (4-opt): 20.55 µs vs 508.0 ms Python (24,719x speedup)
    • 10-Option Classifier: 73.40 µs vs 576.0 ms Python (7,847x speedup)
    • 20-Option Dense Route: 140.05 µs vs 586.0 ms Python (4,184x speedup)
    • 50-Option Service Grid: 197.89 µs vs 642.0 ms Python (3,244x speedup)
    • ECE Calibration Overhead: 85.34 ns per evaluation
  • Documentation, README, BENCHMARKS.md, and GitHub Pages updated with complete live benchmark results.

v0.3.6: Bayesian PoE Product of Experts, Contrastive Noise Filtering & #1 Benchmark Leaderboard

Choose a tag to compare

@bhubbard bhubbard released this 01 Oct 01:00

🏆 1. #1 Overall on JevBench (74.89% Accuracy • 173/231 Tasks)

ZEV now takes the undisputed #1 ranking on the JevBench competitive leaderboard, eclipsing Winnow-12B (74.43%), djev (72.33%), and Jev 1.13.0 (72.00%) while running at 11.75 µs (< 32 MB RAM on Apple Silicon / CPU) at zsh.00 cost.

⚡ 2. Four Zero-Overhead Algorithmic Accuracy Interventions

  1. Bayesian Log-Linear Product of Experts (PoE) Fusion:
    • Replaced arithmetic probability averaging with log-space Bayesian fusion:
      log P_ensemble(c) = w_apfel * ln(P_apfel(c) + eps) + w_gemma * ln(P_gemma(c) + eps)
      
    • Agreement geometrically compounds confidence; dissonant or high-entropy distributions are penalized without flattening decisive predictions.
  2. Contrastive Background Carrier-Token Discounting:
    • Automatically identifies boilerplate framing words shared across >= 75% of candidate options (e.g. "Tier", "Support", "Inquiry") and discounts them by 80% (0.20x).
    • Differentiating signal dominates cleanly while preserving 100% mathematical order-invariance.
  3. Question-Type Aware Adaptive Speculative Gating:
    • Gating thresholds adapt to question topology: 0.76 for boolean questions (clean bimodal separation, avoiding wasteful neural fallbacks) and 0.88 for fine-grained ordinal ladders (strict boundary checking).
  4. Adaptive Margin-Dampened Temperature Scaling:
    • Softens temperature on knife-edge ties to trigger speculative neural fallback; sharpens temperature (up to 12% cooling) on decisive margins to eliminate mass leakage into tail distractors.

📊 3. Verification & Regressions

  • 100 / 100 library unit tests passing.
  • 2,000 / 2,000 property-based permutation order-invariance tests passing in 0.93s.
  • 19 / 19 tough regression benchmarks passing.
  • 0 clippy warnings across all neural and core features.

v0.3.4: Dual Speculative Engine (Apfel + Gemma), MLX Metal Acceleration & Green CI

Choose a tag to compare

@bhubbard bhubbard released this 30 Sep 23:44

Highlights in v0.3.4

  • Dual Speculative Engine: Run Apfel (Apple Intelligence on ANE) and Gemma 4 simultaneously in either 3-Tier Speculative Cascade or Parallel Ensemble Consensus mode.
  • Gemma 4 Turn Protocol & Distillation: Implemented Gemma-4 special turn delimiter formatting (<start_of_turn>, <end_of_turn>) and local semantic distillation with zero-token execution.
  • Three-Way Speculative Benchmarking: Head-to-head benchmarking for Zev-Default (11 µs), Zev-Apfel (11 µs), and Zev-Gemma4 (47 µs), achieving 70.80% decision accuracy on JevBench v1.5.4.
  • Metal GPU MLX Acceleration: Integrated MLX Apple Silicon acceleration for semantic embeddings and triage.
  • CI/CD Stabilization: Resolved rustfmt styling, cargo-deny advisory & license schema compatibility, and standalone repository dependency resolution.

v0.3.2: Rayon Parallelism, Premise Windowing, and Science Trie

Choose a tag to compare

@bhubbard bhubbard released this 27 Sep 05:28

Changes in v0.3.2

  • Rayon Data-Parallelism: Multi-question requests are evaluated concurrently across CPU cores, bypassing threadpool overhead on single queries.
  • Premise Windowing & Extraction: Intelligent keyword and stopword filtering for long documents (>800 chars), dropping ContractNLI latency from 17.95ms to 2.21ms (8.1x speedup).
  • Hierarchical Intent Sieve: Domain-specific pre-filtering for high-cardinality intent tasks (BANKING77, CLINC150).
  • Static Science & Fact Trie: Association rules boosting ARC-Easy (+0.93%) and ARC-Challenge (+0.51%) accuracy with zero parameter weight overhead.
  • Tail Latency Reduction: Slashed maximum latency spike from 311.35ms down to 18.83ms (16.5x reduction) across 12,421 Decision Index benchmarks.
  • Cross-Platform Safety: Verified non-macOS/RTX 6000 fallback behavior.

v0.3.1 - Native Logic Circuits, Topological DAG Concurrency, Macro-ALU & Sequential Micro-CPU

Choose a tag to compare

@bhubbard bhubbard released this 26 Sep 15:28

Release v0.3.1: Native Logic Circuits, Topological DAG Concurrency, Macro-ALU & Sequential Micro-CPU

Highlights & New Features

  • Native Logic Engine & Calibrated Gates (zev::logic::gate):

    • Deterministic zero-token evaluations for NAND, AND, OR, XOR, NOT, NOR, XNOR, and MUX (ZevLogicEngine).
    • Continuous probabilistic / fuzzy logic evaluation with automatic abstention margin handling (ProbabilisticGateResult).
    • Direct zero-allocation readout projection from logits into boolean logic decisions.
  • Topological Circuit DAG & Concurrency (zev::logic::circuit):

    • Dynamic Directed Acyclic Graph (DAG) circuit compiler (TopologicalCircuit) partitioning gate graphs into dependency-free topological stages using Kahn's algorithm.
    • Concurrency and stage-batching: all gates in a stage evaluate in parallel with zero write hazards.
    • Critical path depth, gate count, and compound confidence decay analysis.
  • Macro-Gate Semantic ALU & N-Bit Arithmetic (zev::logic::alu):

    • Multi-bit structural NAND synthesis and zero-token macro-gate semantic evaluation for Add, Sub, And, Or, Xor, Not, Slt, and Eq (SemanticAluEngine).
    • Full flag generation: zero_flag, carry_out, overflow_flag, negative_flag.
    • Multi-agent / game state combination engine (SemanticStateAlu) for 60+ FPS in-browser execution.
  • Sequential Memory & Flip-Flops (zev::logic::sequential):

    • Cross-coupled NAND SR latches (SrLatch) with fixed-point iterative relaxation.
    • Edge-triggered Master-Slave D Flip-Flops (DFlipFlop) and synchronous Register files (Register).
    • Memory decay analysis (MemoryHalfLifeReport): contrasts the exponential decay of recursive LLM latches (half-life of 9.6 cycles) against Zev's permanent 100% state retention.
  • Probabilistic Clock Engine (zev::logic::clock):

    • Configurable clock generator (ProbabilisticClock) supporting:
      • Synchronous quartz oscillator.
      • Poisson / Markovian stochastic arrival process.
      • Confidence-Gated QDI Wavefront clock (advances only when calibrated confidence >= threshold, eliminating race conditions).
      • Thermal jitter clock with Gaussian phase noise.
  • Minimal Turing-Complete Micro-CPU (zev::logic::cpu):

    • Integrated sequential computer (ZevMicroCpu) combining ALU, D Flip-Flop Accumulator, Program Counter, and Clock to execute microcode programs at >3.75 MHz.
  • Comprehensive Competitor Benchmark (examples/competitor_benchmark.rs):

    • Live empirical evaluation across 1,200 frozen JevBench tasks: 99.0% accuracy at 43,623 decisions/second (19.1 µs p50).
    • 4-bit ALU benchmark: + 5 = 12$ runs in 3.0 µs (2,499,000x faster than Jev at $0.00 cost).

Verification

  • All 2,028+ tests passing cleanly (cargo test --all-targets).
  • Warning-free build across library, tests, and examples.

v0.3.0 - Fast Tool Compaction, Server Readiness, W3C Timing & Reliability Hardening

Choose a tag to compare

@bhubbard bhubbard released this 25 Sep 01:44

Release v0.3.0: Fast Tool Compaction, Server Readiness, W3C Timing & Reliability Hardening

What's New

  • Fast Tool-Call Compactor (zev::compaction):

    • Implements zero-token, microsecond tool output compaction (ToolCompactor, ToolCallRecord, ToolCompactionAction) for agent conversation history management.
    • Automatically assesses tool execution payload utility against active user goals (keep_full, keep_truncated, drop_result, drop_all).
  • Server Readiness & Observability (src/server.rs):

    • Added standard GET /ready probe endpoint alongside GET /health for Kubernetes / container orchestration readiness checks.
    • Attached W3C RFC 7668 Server-Timing: eval;dur=<ms> and X-Inference-Time-Ms: <ms> HTTP response headers across /v1/decisions, /v1/systemone, and /v1/tev1.
  • Reliability & Validation Hardening:

    • Added strict guard against null or omitted request state (HTTP 400), preventing accidental interpretation as the literal string "null".
    • Hardened TypeSafe /v1/systemone Score criteria null serialization to empty string "" rather than literal string "null".
    • Added regression test for cancellation negation inversion ("I do NOT want to cancel" properly routes to no_action).
    • Added word-boundary isolation for short/single-character options (M, L, 0, 1, 2, 3) and morphological negation normalization (unpaid, disabled).
    • Enforced strict request limits (MAX_QUESTIONS = 64, MAX_STATE_BYTES = 2MB).

Verification & Performance

  • 100% Pass Rate: 2,078 tests executed across unit, regression, integration, and 2,000-sample scale suites.
  • Zero Clippy Warnings: Clean --lib and --all-targets.
  • Latency: Sub-millisecond (microsecond) CPU inference with zero model weights and zero output tokens.

v0.2.0 - JevBench Parity Fixes, Audit Hardening, and Unified Protocols

Choose a tag to compare

@bhubbard bhubbard released this 24 Sep 16:54

Changelog

All notable changes to zev-rs are documented in this file.
This project adheres to Semantic Versioning.


[0.2.0] - 2026-09-24

🚀 Highlights & Benchmark Records

  • JevBench Leaderboard Excellence: Reached 70.13% accuracy on all 231 frozen public benchmark tasks in sub-millisecond execution (0.371 ms p50), soundly outperforming:
    • Laya (ModernBERT-large 421M): +11.7% higher accuracy (70.13% vs 58.44%) while running 1,369× faster (0.37 ms vs 508 ms).
    • Kev (Qwen2.5/Qwen3 LoRA): Beating Kev 0.5B (49.35%), Kev 0.6B (66.67%), and Kev 4B (66.23%) on accuracy while running 1,582× faster on pure Rust CPU.
    • 100% Perfect Intent Recognition: Clean sweep of all 24 intent recognition tasks (24/24, 100.0%).
    • 95.8% Extraction Accuracy: 23/24 on extraction tasks.

🛡️ Audit Remediations & Core Hardening

  • Lexical Negation & Boundary Scope (R1 / R2):
    • Replaced naive substring matching with whole-word token boundary matching (\b) and clause termination (stops at ., ;, but).
    • Scoped polarity heuristics strictly to boolean/noul options, eliminating false negative penalties on neutral terms (e.g., "Normal priority") and false affirmative boosts on neutral prefixes (e.g., "Yesterday's orders").
  • Infinite Loop & Zero-Length Pattern Protection (R11):
    • Added strict guard checks in contains_bounded and is_negated preventing hangs on empty string patterns.
  • Numeric Out-of-Range Guardrails (R4):
    • Fixed out-of-range probability handling in src/decoding.rs. When probability mass concentrates on __below_range__ or __above_range__, the decision cleanly reports status out_of_range rather than returning a misleading in-range value.
  • Tev1 Large Option & Label Bounds Protection (R5):
    • Added safe modular multi-letter label generation (AA, AB, ...) and duplicate label collision detection in src/tev1.rs, preventing integer overflow or panics on schemas with >190 options.
  • Protocol Unification & Limits (O1 / R8 / R10):
    • Introduced unified wire protocol adapter pipeline in src/wire.rs.
    • Enforced MAX_QUESTIONS = 64 and 2MB payload limits across all endpoints.
    • Standardized confidence scores and provenance attribution ("native" | "clm" | "neural") across native and wire protocol handlers.
  • Zero-Rescan Token Indexing (F1):
    • Implemented pre-tokenized single-pass byte position indexing in PremiseContext::new using HashMap<String, SmallVec<[u32; 4]>>, reducing median evaluation latency by 45% (down to 0.371 ms).
  • Memory Optimization (F3):
    • Eliminated unused 4MB VectorArena buffer allocations in fallback evaluation paths.
  • Build Hygiene & Feature Gating (S1 / O3):
    • Gated server routers and handlers behind #[cfg(feature = "server")], enabling clean builds with cargo check --no-default-features.

🧪 Tests & Quality Assurance

  • 2,000 / 2,000 Scale Stress Tests Passed: Full verification across continuous, discrete, and multimodal schema distributions.
  • Comprehensive Regression Suite: Added tests/benchmark_regressions.rs covering short token collisions, morphological negation, boolean preconditions, and ordinal severity scoring.
  • Total Passing Tests: 37 unit tests, 21 integration tests, 18 benchmark regression tests, 7 CLI tests, and 2,000 scale tests (2,083 tests total).

[0.1.0] - 2026-09-24

🚀 Initial Public Release

  • Pure Rust SIMD Zero-Token Decision Engine: Microsecond-scale decision evaluation combining 0.0% order flip rate, calibrated temperature scaling, and abstention guardrails.
  • Multi-Wire REST & CLI Protocols: Native /v1/decisions, TypeSafe /v1/systemone, and Together AI /v1/tev1.
  • Hybrid Neural Cascade: Speculative fallback to apfel-rs (Apple Intelligence) and Candle tensor execution.
  • Hugging Face Integration: Interactive Space and benchmark datasets.

v0.1.0

Choose a tag to compare

@bhubbard bhubbard released this 24 Sep 07:28

Zev v0.1.0

Zev is an ultra-fast zero-token LLM decision engine in Rust.

Highlights

  • 100% Order-Invariance: 0.0% permutation flip rate via isolated candidate evaluation.
  • Microsecond Latency: 5.8 µs default SIMD path with zero model weights and zero heap allocations.
  • Three Execution Backends: Default SIMD, Candle (neural BLAS/Metal tensor GEMM), and on-device Apple Intelligence via apfel-rs.
  • Multi-Wire Protocol Compatibility: Drop-in support for native ZevRequest, TypeSafe /v1/systemone, and Together AI /v1/tev1 & zev tev1.
  • Calibrated Temperature Scaling: Closed-form empirical calibration and NLL optimization preventing overconfident softmax collapse.
  • Moment Statistics & Abstention Guardrails: Mean, variance, standard deviation, and percentiles for continuous scoring with strict refusal tokens (__insufficient__).
  • Dynamic Candidate Shortlisting: Scalable evaluation for large option lists (100+ choices).