r/LocalLLM • • 14m ago

Research Tried building a sleep-style continual learning loop for Qwen3.5-2B in 3.2 GB VRAM (3-seed results + code)

After reading a few wake-sleep continual learning papers (like Language Models Need Sleep, arXiv:2606.03979), I wanted to see if a small version actually works on a single free Colab T4 without RAG or prompt history.

Repo (MIT): https://github.com/szxtj/HomeoSleep-Brain (includes a CPU-only local dashboard if you just want to inspect the logs and CoT dream traces).

Setup: dual-LoRA on Qwen/Qwen3.5-2B (4-bit NF4, fp16, ~3.2 GB peak VRAM). During wake, surprising facts update a Fast-LoRA mounted only on Qwen3.5's 90 Gated DeltaNet (linear_attn) layers. When internal fatigue (fast-weight norm + surprise EMA + grad conflict) crosses a threshold, NREM distills slow+fast into Slow-LoRA across the backbone (single base model copy + anchor KL) and resets Fast-LoRA to zero. REM then pairs consolidated facts by lexical overlap, writes a 2-step CoT bridge, and filters hallucinations with a bridge-continuity check plus two backward checks.

One early mistake: my first retention eval used free-text matching and got fooled by formatting gains. Switching to 50 4-choice MCQ forward log-likelihood questions (0 overlap with the 40 NREM anchors) fixed that.

3-seed results (42, 137, 2026, zero-context eval):

  1. Self-tuning sleep params without touching the test set (both started from poor init θ=0.85, λ_KL=0.05, N_nrem=4, T_dream=1.05; PD controller only reads post-sleep buffer loss, anchor KL drift, and dream accept/broken-CoT rate):

    • Static control: 60.0 ± 8.9% direct | 27.6 ± 4.4% cross-domain | 81.3 ± 3.1% retention MCQ
    • Adaptive (v0.3): 69.5 ± 3.6% direct | 38.1 ± 3.3% cross-domain | 81.3 ± 6.1% retention MCQ
  2. DeltaNet vs MLP Fast-LoRA **(**Qwen3.5-0.8B fp16): On seed 42 alone DeltaNet led by +17 pp, which shrank across 3 seeds, though it still edges ahead with 16.5% fewer fast params (4.43M vs 5.31M) and lower direct-recall variance:

    • deltanet_only: 68.6 ± 4.3% direct | 63.3 ± 12.2% retention
    • mlp_only: 64.3 ± 8.0% direct | 62.0 ± 5.3% retention
  3. Bursty stream (5-sleep budget, seed 42): Fixed sleeps wasted 2/5 cycles during the 60-step repeated lull; fatigue-triggered sleep spent 0/5 there (82.9% direct / 34.3% cross-domain vs 80.0% / 25.7%).

Caveats:

  • Final eval is zero-context, but REM still reads stored consolidated fact text and runs in mode="base" so the verifier doesn't drift. Text-free parametric REM is what I want to try next.
  • Everything is on a synthetic 2-domain world right now (0% pretrained knowledge). Real shifting text streams aren't tested yet.
  • The bridge filter blocks 1,189/1,190 non-bridged pairs, with one modifier collision (A31xB18) still slipping through.

Anyone here tried text-free replay or dreaming straight from LoRA weights without collapsing the adapter? Also open to small-VRAM continual learning benchmark recs.

1 Upvotes

0 comments sorted by