Skip to content

rooflab v0.4.0

Choose a tag to compare

@scientist42-lab scientist42-lab released this 29 Nov 17:12
· 7 commits to main since this release

rooflab v0.4.0

rooflab (formerly orion-opt-lab) is a zero-dependency, physics-grounded local LLM optimization, hardware roofline calibration, and statistical benchmarking lab across llama.cpp, vLLM, SGLang, Ollama, MLX, and openai-http.

Highlights in v0.4.0

  • Collision-Free 6-Stage Physical System Stack (rooflab explain / rooflab xray & docs/LAYER_MODEL.md):
    • Strictly separates hardware caches (L1/L2/L3 Cache), neural blocks (Block 0..N-1), and physical bottleneck stages (Stage 1/6: Hardware Roofs through Stage 6/6: Measured Reality).
    • Models 2D-Roofline Prefill (TTFT + Compute Ridge + O(L^2) non-SSM Attention), L2/L3 cache hierarchy, critical-path DAG overlap vs. hard sync barriers, multi-slot concurrency (N > 1), MoE batch union E_unique(B), quantization ALU dequant tax (quant_alu_eta), context-length KV crossover sweep (512..64K), MB/tok & Ideal-vs-Real kernel tax, and Measured-vs-Modeled residual attribution with offline dark-mode HTML/SVG export.
  • Realtime Physical Limits Visualizer (rooflab live & rooflab live --web):
    • Zero-dependency 72-column ANSI TUI plus offline single-file HTML5/Canvas/SSE dashboard (127.0.0.1:8765, zero external CDNs).
    • Zero-sudo, zero-perf-binary Linux hardware telemetry via pure-Python ctypes perf_event_open(2) (uncore_imc real DDR4 GB/s + Intel RAPL CPU/DRAM Watts & Joule/Token) + libnvidia-ml.so.1 (real PCIe TX/RX & thermal throttle) + /proc/<pid>/schedstat & VmSwap alarm.
  • Measurement Integrity & Security Hardening (v0.3 + v0.4):
    • Host Quiescence Gate (VOID_NOISE), native perf_event_open(2) backend, and Observer-Overhead A/A budget check in perf_gate.py.
    • Cold/warm --cache-mode with prefix-cache leak detection (PREFIX_CACHE_CONTAMINATED), HTTP Keep-Alive, and speculative-burst-aware step_cycle_ms ITL in api_bench.py.
    • Full SSRF, header/shell/config injection, GGUF binary bounds DoS, symlink-safe atomic writes, VOID exit-code 2, pure-stdlib zero-numpy stats_gate.py, and 3-OS GitHub Actions CI (ubuntu / macos / windows).
  • New Audited Bare-Metal llama.cpp Slices (patches/01..06, Ledger #0..#91):
    • Slice M6 (KEPT): sm_61 weight-reusing Q4_0 multi-column MMVQ (B=2..4, 0 B SMEM, 0 barriers) -> gemma4-e2b-mtp +7.26% (70.12 t/s, code_refactor +13.34%, 6/6 BIT_EXACT), lfm24b +3.50%, gemma4-26b +2.63%.
    • Slice M7 v2 (KEPT): Redundant OpenMP barrier removal + merged-gate_up CPU-MoE fusion + Inkling-2 TopK norm-eps fusion (-192 kernels/eval) -> gemma4-26b-mtp +4.18% (6/6 BIT_EXACT), inkling2 +0.98% (-8 MiB VRAM), 0 regressions.
    • Slice M6b (KEPT): sm_61 weight-reusing Q8_0 multi-column MMVQ (B=2..6) -> lfm3-dflash 55.49 -> 59.30 t/s (+6.87%, 6/6 STAT_WIN, stem_science +10.43% BIT_EXACT, -2 MiB VRAM).
    • Slice M8 (KEPT): Opt-in ORION_LAYER_PROFILE=1 dual-cadence async CUDA-Event, PCIe copy, and live llama_moe_cache telemetry exported on /metrics (0% overhead OFF, 100% BIT_EXACT, +0 MiB VRAM) feeding rooflab live directly.
  • Reproducible Training Kits & Lossless Drafters:
    • Privacy-sanitized Wave-5 Colab training scripts in kits/training/, Figure 9 6-model gap analysis (assets/figures/fig9_orion_6model_gap_analysis.png), and lossless drafter catalog (docs/DRAFTERS.md).

Verification

  • 324/324 unit tests PASS (109/109 zero-numpy 3-OS CI suite PASS)
  • privacy_audit.py: 0 findings | repo_integrity_check.py: 0 findings
  • Cryptographic Ledger: 92 entries (#0..#91, 60 KEPT / 20 REVERTED / 12 DISPROVEN), verified head ab38987970d9186f12e41f51c59663b6378078cdd893857d7fde4d4a3ee8fde9