RuvLLM WASM

Chat templates, MicroLoRA adaptation, SONA learning — all in-browser via WebAssembly (~150 KB gzipped)

Initializing WASM module...

What is this?

@ruvector/ruvllm-wasm is an LLM orchestration toolkit that runs entirely in the browser via WebAssembly (~150 KB gzipped). Despite the name, it does not load or run language models — there is no generate/predict API in the WASM build. Instead it provides supporting infrastructure for LLM-based applications:

  • Chat template formatting — correctly format prompts for Llama 3, Mistral, ChatML, Phi, and Gemma model families before sending them to an API.
  • MicroLoRA — sub-millisecond low-rank vector adaptation with quality-based feedback. Building block for client-side agent routing.
  • SONA Instant Learning — EMA quality tracking, pattern recording, and adaptive rank adjustment for continuous improvement loops.
  • KV Cache & memory management — two-tier cache (FP32 tail + u8 quantized store), arena allocator, and buffer pool for building inference pipelines with WebGPU or ONNX Runtime.

Known issue: the HNSW semantic router (HnswRouterWasm.addPattern) panics in v2.0.0 — this appears to be a bug in the published WASM binary.

For actual in-browser model inference, see WebLLM (WebGPU) or Transformers.js (ONNX). Package source: ruvnet/RuVector.

Health Check

MicroLoRA Adaptation

Sub-millisecond low-rank model adaptation (rank 2, 64-dim)

Chat Templates


    

SONA Instant Learning

EMA quality tracking + adaptive rank adjustment for continuous model improvement

Source on GitHub