Skip to content

🌱 Bonsai v0.1.0: Zero-Knowledge Local AI Distillation on Consumer Silicon

Latest

Choose a tag to compare

@shenald-dev shenald-dev released this 02 Nov 17:20
· 1 commit to main since this release

🌱 Bonsai v0.1.0 β€” Initial Public Release

The art of cultivating massive foundation models into pocket-sized intelligences on consumer silicon.

uvx bonsai prune ./data

✨ Key Capabilities

  • Hardware Auto-Probe: Probes GPU VRAM, Apple Unified Memory, or CPU RAM and auto-downshifts base models to guarantee Zero-OOM.
  • Zero-Leakage Scenario Partitioner: De-duplicates input scenarios before augmentation so the 15% blind holdout exam is strictly unseen (Jaccard similarity = 0.0).
  • Masked-Loss Pocket LoRA: Computes loss strictly on assistant completions (labels[:prompt_len] = -100), reducing loss by -51.5% in 34 seconds on a consumer laptop RTX 2050 (4GB VRAM).
  • The Proof Machine: Automatically evaluates the untrained base model side-by-side against the cultivated model on unseen test cases.
  • Instant Export: Emits ready-to-run Ollama Modelfiles, standalone Python runners, and local Web UI (bonsai ui).

πŸ§ͺ Verified Benchmarks (RTX 2050 - 4GB VRAM)

  • Base Model: Qwen2.5-Coder-0.5B-Instruct (495M parameters)
  • Peak VRAM Allocated: 2,045 MB (Zero-OOM Protected)
  • Distillation Duration: 34.05 seconds (3 epochs)
  • Initial Loss: 1.5905 βž” Final Loss: 0.7713 (-51.5% Drop)
  • Automated Test Suite: 11/11 Passing via pytest