Skip to content

Releases

Kevala v0.2.2

Choose a tag to compare

@bvolpato bvolpato released this 15 Nov 04:07
v0.2.2
9806798

Kevala 0.2.2

Kevala 0.2.2 packages the WebGPU, CPU kernel, memory, and profiling changes that landed after 0.2.1.

Changes

  • Clef-flash stages seven F32 head projections across two WebGPU waves by default (clefHead: "auto", with "cpu" retained as a control). Normal load warmup validates every GPU output bit against the CPU reference before enabling the staged path. CPU head execution also skips unused routing projections and computes shared self-attention Q/K/V projections once.
  • Kev and SemIf skip duplicate token-embedding work on cached state prefixes and omit retained carry cache slots when stateCache: false is set. Qwen3.5 prunes final-block MLP work to selected scorer rows, and Gemma 4 adds a calibrated 32-lane attention path for unbatched 257 to 640 token requests.
  • WebGPU submission policy (submit: "await" | "split" | "none") stays isolated on each engine instead of sharing a page-global setting.
  • Native CPU builds vectorize Q8 embedding and row decoding, add runtime AVX2 2x4 and 4x4 linear projection packing, and add a CPUID-gated four-row AVX-512 path for the measured Zen 5 processor revision.
  • Resident model and kernel profilers record wall and GPU lanes, Clef head routes, module-load failures, and per-request stage timing summaries. The speed page links the stage and host-control breakdowns.

Validation and limits

Staged Clef GPU head projections reduced median paired warm request latency by 27% to 37% across three Q8 text lengths on Chromium 156 and an RTX 5070 Ti, with exact finite-bit projection parity (Clef GPU head report). Earlier catalog sweeps recorded 6.1% to 9.1% lower Clef whole-request wall time and 24.4% to 26.3% lower CPU-finish replay time, while sequential wall medians across other catalog models were mixed (model optimization report).

Setting stateCache: false reduced Kev-0.8B Q8 explicit carry allocation on the first stateful request from 367,132,672 bytes to 25,968,640 bytes, a 325.36 MiB reduction, without changing whole-run peak explicit buffer capacity after later cache growth (GPU cache memory report). Native CLI CPU timings on a Ryzen 9 9950X3D recorded 2.79% to 9.03% implied paired time reductions for the Zen 5 AVX-512 path across four Laya and Kev-0.8B Q8 requests, although every experimental quartet range crossed 1.0 and the independent short Kev-0.8B median was 1.13% slower (native AVX-512 report).

Rejected GPU epilogue fusions, resident FP32 weight caching, K64 tiling, and cold Gemma calibration-budget changes remain disabled by default (host follow-up report, FP32 reference report). Kev-9B BF16 profiling covers short and medium shapes only (Kev-9B BF16 profile). Larger packs remain unpublished on Hugging Face, other GPUs and browsers need separate measurements, and the 60 FPS camera target remains unmet.

Package scope

The npm package contains the browser and Node runtime and three WebAssembly flavors. Model weights remain separate packs. This release does not include a native macOS CLI binary.

kevala 0.1.3

Choose a tag to compare

@bvolpato bvolpato released this 22 Sep 03:28
v0.1.3
e44bbbf

Models load from pinned int8 packs, and the original weights stay one option away.

  • Kevala.load({ model: "laya" }) downloads the model's int8 pack from bvolpato/kevala-packs, pinned to one commit: 479 MB for Laya instead of an 843 MB checkpoint plus conversion, 857 MB for Kev-0.8B instead of 1.6 GB. If the pack is unreachable, it converts the original weights as before.
  • from: "checkpoint" always downloads the original weights and converts them in the browser. The site takes ?from=checkpoint.
  • docs/packs.md covers the three ways to load a model, direct pack downloads, conversion with the CLI, the parity checks and publishing new packs.
  • The site shows answers as cards per question type, has a cleaner Tetris page with random pieces and a Reset button, and its snippets import kevala@latest.

npm install kevala@0.1.3 · https://bvolpato.github.io/kevala/

kevala 0.1.2

Choose a tag to compare

@bvolpato bvolpato released this 22 Sep 02:30
v0.1.2
cd16517

Pack storage that survives a full disk and interrupted writes.

  • A pack that cannot be stored (a full disk, the storage quota) is reported instead of silently dropped, its partial file is deleted, and the site's model menu says it was not stored.
  • Before writing, the store deletes pack files its index does not list, the leftovers of interrupted writes, which otherwise hold quota.
  • Pages ask for persistent storage when they load a model.

npm install kevala@0.1.2 · https://bvolpato.github.io/kevala/

kevala 0.1.1

Choose a tag to compare

@bvolpato bvolpato released this 22 Sep 02:17
v0.1.1
fe56e37

kevala runs the Laya and Kev-0.8B decision models inside a web page, on WebGPU or WebAssembly: typed questions about text in, a probability for every option out, no server.

npm install kevala
import { Kevala } from "kevala"; // or https://cdn.jsdelivr.net/npm/kevala@0.1/js/src/index.js
const kevala = await Kevala.load({ model: "laya" });
const r = await kevala.decide("Refund the duplicate charge today or we cancel.", {
  churn: { type: "noul", instructions: "Does the customer threaten to leave?" },
});

Changes since 0.1.0

  • GPU kernels live in the Rust crate. Every WebGPU kernel is a .wgsl source in crates/kevala/src/wgsl, specialized by gpu.rs and served by the WebAssembly binary; kevala wgsl <kernel> prints one.
  • Faster. The int8 matmul keeps its tiles in f16 and sizes them to the input (1.6x to 1.8x). Kev's Gated DeltaNet recurrence splits each column over four subgroup lanes (5x). Laya's attention uses subgroup reductions. On an Apple M4 Max with WebGPU, a short request takes 11 ms on Laya and on Kev-0.8B, and Kev answers a 533-token state in 116 ms.
  • Faster first load. Checkpoints download as parallel byte ranges (24 to 38 MB/s from Hugging Face in a test). Switching backend reads the stored pack instead of downloading again.
  • Profiling. kevala.profile(true) adds per-kernel GPU time to every response.

Assets

  • kevala-0.1.1-web.zip: the browser runtime (js/src), to serve from your own host.
  • kevala-0.1.1-aarch64-apple-darwin.tar.gz: the kevala command line for Apple Silicon (convert checkpoints, answer questions, check parity, benchmark, print GPU kernels).

Site and demos: https://bvolpato.github.io/kevala/

kevala 0.1.0

Choose a tag to compare

@bvolpato bvolpato released this 22 Sep 01:30
v0.1.0
8c799b4

First release of kevala: decision models in any web page, with one import and no server.

kevala runs System 1 decision models inside the browser. You give it a piece of text or JSON and typed questions (noul for yes/no, choice, score), and it returns a probability for every option in one forward pass. It uses WebGPU when the browser has it and WebAssembly everywhere else. Nothing leaves the tab.

Install

npm install kevala
import { Kevala } from "kevala";
// or, in a plain page:
// import { Kevala } from "https://cdn.jsdelivr.net/npm/kevala@0.1/js/src/index.js";

const kevala = await Kevala.load({ model: "laya" });
const r = await kevala.decide("Refund the duplicate charge today or we cancel.", {
  churn: { type: "noul", instructions: "Does the customer threaten to leave?" },
});
console.log(r.answers.churn.noul);

Models

  • Laya (laya): ModernBERT-large encoder with a decision head. It is about 850 MB to download the first time, converted in the browser to a 479 MB int8 pack and cached.
  • Kev-0.8B (kev-0.8b): a Qwen3.5-0.8B hybrid decoder with a pointer head. It is about 1.6 GB the first time and an 857 MB pack afterwards. It keeps a KV cache across requests.

Both match their PyTorch references on the fixtures: 41/41 and 13/13 argmax agreement.

Speed

On an Apple M4 Max with WebGPU in Chrome, a short request takes 11 ms on Laya and 13 ms on Kev-0.8B. A cached Kev state takes 10 ms.

Assets

  • kevala-0.1.0-web.zip: the browser runtime (js/src), for serving from your own host instead of npm or a CDN.
  • kevala-0.1.0-aarch64-apple-darwin.tar.gz: the kevala command line for Apple Silicon. It converts checkpoints to packs, answers questions, checks parity and runs benchmarks.

Site and demos: https://bvolpato.github.io/kevala/