Repository navigation
Releases
rooflab v0.6.1
Highlights
rooflab v0.6.1 is a patch release focused on making the existing v0.6.0 llama.cpp CUDA, speculative decoding, and 1-warp GPU stochastic sampler patchset (0 register spills across sm_80/86/89/90/120, 1.6713x geometric speedup and -40.80% J/tok across 13 suites on RTX 3090) reproducible and buildable in 4 copy-paste commands on upstream ggml-org/llama.cpp.
Zero new kernel or model features beyond v0.6.0 are introduced in this release.
4-Command llama.cpp CUDA Quickstart
# 1. Clone upstream llama.cpp at the exact tested base commit (tag b12631)
git clone https://github.com/ggml-org/llama.cpp && git -C llama.cpp checkout e300919cc704ddde3a8a8346a8714f57eeeee71b
# 2. Apply the verified v0.6.0 cumulative patchset (strict --whitespace=error check)
bash scripts/apply_patches.sh ./llama.cpp
# 3. Build llama-server, llama-cli, and llama-bench (auto-detects GPU arch via nvidia-smi, or set CUDA_ARCH=86)
bash scripts/build_cuda.sh ./llama.cpp
# 4. Launch llama-server (replace build-sm86 with your detected build-sm<arch> directory)
ORION_DISABLE_R2_SM86=1 ./llama.cpp/build-sm86/bin/llama-server \
-m /path/to/model.gguf -ngl 99 -fa on -c 16384 -b 1024 -ub 1024 \
--cache-type-k q8_0 --cache-type-v q8_0 --backend-sampling \
--host 127.0.0.1 --port 8080What Changed
- Verified Single-Pass Cumulative Patch (
patches/rooflab_v060_cumulative.patch): Exported against exact upstreamggml-org/llama.cppcommite300919cc704ddde3a8a8346a8714f57eeeee71b(b12631,149files, SHA-2560df716f93827b1630c14081fc2ba10cd24dcab96881552d10817e6eef71d5d1a), verified clean undergit apply --check --whitespace=errorandgit apply -R --checkwhile preserving all43archival slice patches inpatches/for per-slice review and surgicalgit apply -Rbisection. - Reproducible Patch Script (
scripts/apply_patches.sh): Supports idempotent forward apply,--checkdry-run verification, and--reverse(-R) clean rollback back to stockllama.cpp. - Multi-Arch CUDA Builder (
scripts/build_cuda.sh): Ninja CUDA builder supporting explicitCUDA_ARCHvia CLI/env or automaticnvidia-smicompute-capability detection (8.0->80,8.6->86,8.9->89,9.0->90,12.0->120),-DGGML_CUDA=ON -DGGML_CUDA_FA_ALL_QUANTS=ON -DGGML_CUDA_GRAPHS=ON -DLLAMA_BUILD_TOOLS=ON, and optionalsccache/ccacheandmoldviacommand -v(keepingconfigs/rtx-3090/build_rtx3090.shintact). - Documentation & CLI Fixes: Added the top-of-README 4-command Quickstart, pinned the exact 40-char upstream base SHA and archival stack order in
patches/MANIFEST.md, fixed--backend-sampling -bs 1->--backend-samplingacrossdocs/RTX3090_PRESETS.md, and bumped package metadata (pyproject.toml,rooflab/__init__.py,CITATION.cff,CHANGELOG.md) to0.6.1. - CI Reliability Fix (
tests/test_strix_halo_kit.py): Madetest_power_sampler_rapl_fallbackdeterministic via baseline-read polling and atomicos.replaceupdates, eliminating a timing race on loaded macOS CI runners.
Verification
- Fresh
/tmpclean-apply + idempotent +--reverseroundtrip one300919cc704ddde3a8a8346a8714f57eeeee71b: PASS - From-scratch Ninja CUDA build (
scripts/build_cuda.sh,sm_86):[413/413]PASS,0spill stores/loads across1,071/1,071audited custom/patched kernels, RTX 3090 smoke check (gemma-4-E2BQ8_0-bs 1:tg128 = 386.44 +/- 3.14 t/s,pp128 = 10,351.67 t/s,VmSwap = 0 kB) - All 4 repository gates PASS:
431/431unit tests OK,scripts/repo_integrity_check.py0findings,scripts/privacy_audit.py0findings,ledger verify92entriesok: true - GitHub Actions 3-OS CI (
ubuntu-latest,macos-latest,windows-latestx Python3.10/3.12+ Full Forensics):8/8green
rooflab v0.6.0
rooflab v0.6.0
Zero-dependency hardware roofline toolkit, GGUF weight-space inspector, paired AB/BA statistical certification gate, and 0-spill CUDA/speculative/GPU-sampler llama.cpp patchset (43 total landed patches, verified across 5 NVIDIA architectures sm_80/86/89/90/120 and 3-OS CI on Linux, macOS, and Windows).
Highlights
1. 8 New 0-Spill CUDA, Speculative Decoding & 1-Warp GPU Sampler Patches (patches/ 22..26)
All 8 kept v0.6.0 patches stack cleanly atop 00..20 with 0 register spills across sm_80/86/89/90/120, 0 NaNs, VmSwap = 0 kB, and 15/15 counterbalanced N=6 AB/BA RTX 3090 wins (p_perm <= 0.0312):
- Patch
22(22_qwen_gdn_sublayer_f16state.patch): Qwen3.x GDN sublayer fusion (F32lossless default,80/805-arch0spills) plus opt-in-cts f16state compression (-72 MiBVRAM onQwen/Qwen3.8-27B,-30 MiBon 35B). - Patch
22b(22b_soa32_qwen_triple_and_grouped_verify.patch):IQ4_XSregister-onlyPRMTLUT, carry-free half-IDP4AQ6_K, and CUDA-Graph-safe groupedMUL_MAT_IDverify (empero-ai/Qwen3.8-35B-A3B-DistillMTP K=6 +11.39%,MTP K=3warm400.05 t/s). - Patch
23(23_inkling_loop_megakernel.patch):Inkling-2-Mini 48LcoalescedSoAand loop super-fusion (905/9055-arch0spills,133.56 t/s,2.223xvs stock). - Patch
24(24_gemma4_e2b_e4b_persistent_mega.patch):Gemma-4-E2B/E4Bpersistent PLE megakernel and directQ8_1short FlashAttention (1,010/1,0105-arch0spills,18/18bit-exact:E2B 398.07 t/s,E4B 231.54 t/s,G4-26B 279.26 t/s). - Patch
25a(25a_spec_labd_lookup_fusion.patch): Lossless LABD lookup+draft fusion andDFlash2tree verification (Gemma-4-26B MTP K=6 395.08 t/s +7.85%,-9.61% J/tok,6/6exact). - Patch
25b(25b_mtp_draft_vocab_d2t.patch+patches/build_d2t_sidecar.py): 100% opt-in lossless runtimed2tdraft-vocabularylm_headsidecar (6.06xsmaller draft head;Qwen/Qwen3.8-27B MTP K=6 +14.72%cold /+21.27%code edit,empero-ai/Qwen3.8-35B-A3B-Distill MTP K=3 +7.48%cold,6/6exact). - Patch
25c(25c_direct_q8_mq_fattn_verify.patch): DirectQ8_0KV multi-query FlashAttention verify forB=4..16(40/405-arch0spills,6/6bit-exact). - Patch
26(26_gpu_stochastic_sampler_1warp.patch): 1-warp GPU-resident stochastic sampler (temp,top_k,top_p,min_p) eliminating full-vocab logit PCIe D2H on stochastic chat (40/405-arch0spills; OpenAI-bsT=0.7 top_p=0.9:Gemma-4-26B +59.01%vs stock,empero-ai/Qwen3.8-35B-A3B-Distill +65.65%vs stock,6/6greedy exact). - Honest Negative Proof (Reverted Patch
21):21_lfm25_400plus_megakernelpassed 5-arch0-spill and6/6exact parity checks yet regressed-1.23%end-to-end onLFM2.5-24B Q8_0KV inside the 38-layer CUDA Graph; cleanly reverted viagit apply -Rand not shipped.
2. Full 15-Suite RTX 3090 Cumulative Matrix & 4-GPU Cross-Arch Calibration
- RTX 3090
v0.6.0Cumulative (15/15p_perm <= 0.0312,VmSwap = 0 kB,0NaNs):9PlainB=1models:1.5974xgeometric mean speedup,-38.24%meanJ/tok.4Speculative suites:1.8504xgeometric mean speedup,-46.54%meanJ/tok.- All
13schema benchmarks:1.6713xgeometric mean speedup,-40.80%meanJ/tok, plus+59.01%/+65.65%OpenAIT=0.7stochastic chat wins.
- 4-GPU Cross-Arch
rooflab fitCalibration (RTX 5090 sm_120,RTX 4090 sm_89,RTX 3090 sm_86,NVIDIA L4 sm_89):22/22live counterbalancedAB/BAwins (1.536xgeo,-36.38%meanJ/tok), reducingrooflab fitMAPE from21.10%raw to7.47%per-arch calibrated MAPE (8.4%pooled,10.5%LOGO-CV).
3. Cross-OS CI, Packaging & Release Hygiene
- Full 8/8 green GitHub Actions matrix across
ubuntu-latest,macos-latest, andwindows-latest(Python3.10and3.12), verifying zero-numpystdlib execution and native CPU probe compilation on all three operating systems. - Aligned package metadata (
pyproject.toml,rooflab/__init__.py,CITATION.cff,SECURITY.md,rooflab --version) to0.6.0. - Restored standard GitHub-recognized
MITtext inLICENSE, updateddocs/ROLLBACK_AND_RELEASE_RUNBOOK.mdto cover all patches00..26and allv0.6.0runtime kill-switches, and verified38/38patches/MANIFEST.mdSHA-256 digests and the 92-entry SHA-256 hash-chained experiment ledger. - Note on NVML Energy Measurements: Reported
J/tokvalues measure NVIDIA board power via NVML only (excluding+40-80 Whost CPU/RAM/PSU draw; RTX 3090 runs at300 Wcap). SeeREADME.mdfor full methodology caveats and upstream vs. community-distill model provenance disclosures.
rooflab v0.4.1
rooflab v0.4.1
All 8/8 cross-OS CI jobs (ubuntu-latest, macos-latest, windows-latest x Python 3.10/3.12 + Full Forensics Gate) are green on main (d7c4391).
Highlights in v0.4.1
- Universal Lossless Multimodal / OCR Pipeline Benchmark (
rooflab ocr-bench&docs/OCR_PIPELINE.md):- Zero-dependency stdlib core (
generate_synthetic_ocr_png, Myers bit-parallel Levenshtein CER/WER, HTML/Markdown table structure & LaTeX formula parity gate -> hardPARITY_FAIL/VOIDveto). - Async producer-consumer PDF/image prefetch queue (
render_ms,preprocess_ms,gpu_idle_gap_msexposingCPU_PREFETCH_STARVED), conservative margin trim +28pxvision patch alignment, speculative-burst-awarestep_cycle_msITL, and live repeat-loop abort guard acrossChandra-OCR-2,Qwen-VL,olmOCR,Gemma-4 Vision, andDeepSeek-OCR.
- Zero-dependency stdlib core (
- Nov-2026 Frontier Chandra-OCR-2 Drafter Training Kits (
kits/training/):train_chandra2_mmflash_v2.py(warm-start fromScientist42/chandra-ocr-2-mmflash-dpace,KL(p_vis || p_blind)visual-dependence token weighting, dualB in {8, 16}block-size curriculum, frozen v1 KL-anchor, O(1)-VRAM_TiledWeightedKLAnchorFn, 4-dataset public OCR streaming mix with strictOmniDocBencheval-only guard).train_chandra2_mtp_dpace_v2.py(Zero-Init Residual LoRAr=16,lr=3e-5, EAGLE-3K=2..5focus, hidden-state feature alignment, andKL(p_vis || p_blind)visual-dependence weighting for 100% drop-inllama.cppGGUF /vLLM/SGLangStock-MTP compatibility).
- 3-OS CI Hardening (All 8/8 Jobs Green):
- Windows
cp1252auto-ASCII TUI fallback inlive_monitor.py. - macOS sysfs test isolation, headless GPU-less
--allow-no-vramgate fix, deterministic mock timing onapi_benchandocr_pipeline.
- Windows
- Open-Source Repository Polish:
- Live CI & Release badges, refreshed
Stage 1..6hero inREADME.md, PyPI metadata &[project.urls]inpyproject.toml, plusCHANGELOG.md,CONTRIBUTING.md,SECURITY.md, and.github/ISSUE_TEMPLATE/forms.
- Live CI & Release badges, refreshed
- Published Lossless Drafters on Hugging Face:
Scientist42/chandra-ocr-2-mmflash-dpace(BF16,E[tau] 1.61 -> 5.00,5/5unseen OCR domains)Scientist42/gemma-4-26B-A4B-it-mtp-dpace-Q4_0-GGUF(Q4_0GGUF,E[tau] 2.52 -> 2.85,5/5unseen domains)
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