Repository navigation
rooflab v0.4.0
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 RoofsthroughStage 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 unionE_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.
- Strictly separates hardware caches (
- 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-Pythonctypesperf_event_open(2)(uncore_imcreal DDR4 GB/s + IntelRAPLCPU/DRAM Watts &Joule/Token) +libnvidia-ml.so.1(real PCIe TX/RX & thermal throttle) +/proc/<pid>/schedstat&VmSwapalarm.
- Zero-dependency 72-column ANSI TUI plus offline single-file HTML5/Canvas/SSE dashboard (
- Measurement Integrity & Security Hardening (
v0.3+v0.4):- Host Quiescence Gate (
VOID_NOISE), nativeperf_event_open(2)backend, and Observer-Overhead A/A budget check inperf_gate.py. - Cold/warm
--cache-modewith prefix-cache leak detection (PREFIX_CACHE_CONTAMINATED), HTTP Keep-Alive, and speculative-burst-awarestep_cycle_msITL inapi_bench.py. - Full SSRF, header/shell/config injection, GGUF binary bounds DoS, symlink-safe atomic writes,
VOIDexit-code2, pure-stdlib zero-numpystats_gate.py, and 3-OS GitHub Actions CI (ubuntu/macos/windows).
- Host Quiescence Gate (
- New Audited Bare-Metal
llama.cppSlices (patches/01..06, Ledger#0..#91):- Slice M6 (
KEPT):sm_61weight-reusingQ4_0multi-columnMMVQ(B=2..4,0 BSMEM,0barriers) ->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_upCPU-MoE fusion + Inkling-2 TopK norm-eps fusion (-192kernels/eval) ->gemma4-26b-mtp +4.18%(6/6 BIT_EXACT),inkling2 +0.98%(-8 MiBVRAM),0regressions. - Slice M6b (
KEPT):sm_61weight-reusingQ8_0multi-columnMMVQ(B=2..6) ->lfm3-dflash 55.49 -> 59.30 t/s(+6.87%,6/6 STAT_WIN,stem_science +10.43% BIT_EXACT,-2 MiBVRAM). - Slice M8 (
KEPT): Opt-inORION_LAYER_PROFILE=1dual-cadence async CUDA-Event, PCIe copy, and livellama_moe_cachetelemetry exported on/metrics(0%overhead OFF,100% BIT_EXACT,+0 MiBVRAM) feedingrooflab livedirectly.
- Slice M6 (
- 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).
- Privacy-sanitized Wave-5 Colab training scripts in
Verification
324/324unit tests PASS (109/109zero-numpy3-OS CI suite PASS)privacy_audit.py:0findings |repo_integrity_check.py:0findings- Cryptographic Ledger:
92entries (#0..#91,60 KEPT / 20 REVERTED / 12 DISPROVEN), verified headab38987970d9186f12e41f51c59663b6378078cdd893857d7fde4d4a3ee8fde9