Repository navigation
Releases
ARGUS v2.4.1 — NVML File Descriptor Leak Hotfix
Fixed
- NVML
dlopen/dlcloseeventfdLeak (EMFILE/os error 24): Cachedlibnvidia-ml.so.1in a process-wide lazyOnceLock<Option<libloading::Library>>withNVML_LOCKserialization (rust/crates/argus-core/src/hw_discovery/providers.rs) while preserving per-pollnvmlInit_v2()/nvmlShutdown()for D3cold sleep safety. Eliminates the 1eventfd/poll leak on NVIDIA Linux drivers that exhaustedRLIMIT_NOFILE=1024after ~84 minutes of 5 s telemetry polling. - Verified
0FD growth across 100 NVML poll cycles and 30+ minutes of liveargusduptime (total_fd=21, eventfd=3).
ARGUS v2.4.0 — Cross-Vendor UMM, Qwen4-35B-A3B on 4 GB VRAM & Release Hardening
ARGUS v2.4.0 — Cross-Vendor UMM, Qwen4-35B-A3B Live on 4 GB VRAM & Release Hardening
Highlights
- Real 3-Shard
Qwen4-35B-A3B(32.90 GBon disk) Live on 4 GB RTX 3050 Ti:16,384allocated context capacity (37–56tok measured multi-turn prompts):20.39–20.83 tok/sdecode,3,064 MiBpeak VRAM (730 MiBfree),10.99 GiBPLE N-gram table kept lazy on SSD (20.0 GiBinitial read,+40.8 MiBpaged during 3-turn chat + cancellation), clean cancellation recovery,0.465 sshutdown (0coredumps).32,768allocated context capacity (KV q4_0GPU): live verified on RTX 3050 Ti (3,209 MiBVRAM,585 MiBfree,19.6–20.4 tok/s).- Zero regression vs
v2.3.0:20/20CUDA native tests PASS (81.15 s), Gemma 4 26B22.75 / 36.25 / 50.81 tok/s(+8.3%..+11.4%), Qwen 3.6 35B29.71 / 41.27 / 54.65 tok/s(+8.3%..+14.5%).
- Upstream
llama.cppRebase (1579b02545274244eb159d204218d8dfab37baf0,v1.1.1/b12977): Day-0qwen4exp,--lazy-mode, multi-shard GGUF, QSA sparse indexer KV accounting, and sidecarmtp-*.ggufdiscovery. - Cross-Vendor Backend HAL & 5-Regime UMM (
R0..R4):- A100-SXM4-40GB (
R3 CUDA):32,768allocated ctx (2,437/4,838tok measured prompts)98.07 tok/s(0.995×stock, bit-exact,20,900 MiBvs20,914.3predicted+0.07%); opt-in MTPn=2113.5–137.4 tok/s;65,536allocated ctx /55,112measured prompt tok (3,526.5 tok/spp,needle_ok=True);-np 4cancel/KVall_isolated=True. - NVIDIA L4-24GB (
R3/R2 CUDA):32,768allocated ctx54.68 tok/s(1.07×dec,1.48×pp2k, bit-exact); opt-in MTPn=1..251.5–76.4 tok/s;27,574measured prompt tok (needle_ok=True);-np 4cancel/KVall_isolated=True. - Tesla T4-16GB (
R2 CUDA,12 GiBRAM,Swap=0):16,384allocated ctx (4,838tok measured prompt)ncmoe=16, kv=gpu(13.73 tok/s,13,447 MiBVRAM) beatsncmoe=14, -nkvo(12.31 tok/s,14,271 MiB) by+11.5%and-824 MiB. - CPU-Only (
R0) & Intel Iris Xe Vulkan (R4 UMA, Mesa ANV 25.2.8/dev/dri): Verified (56.21 tok/sCPU,56.61/55.53 tok/sVulkan UMA, bit-exact parity).
- A100-SXM4-40GB (
- Phase III Hardening (P0–P4):
- Separated
--profile portable(AVX2-only, AVX-512 OFF, multi-arch CUDA75;80;86;89) from--profile nativeinscripts/build_backend.shand CI, emittingargus_build_fingerprint.jsonhashed intoCalibrationKeywith a pre-launch CPU ISA host guard. - Joint Host RAM + VRAM Hard Admission Guard calibrated to T4
12 GiB / Swap=0. - Explicit Qwen4 native VoC
unsupported_dim_mismatchfallback (projection_applied: false, zero ad-hoc projection). - Calibrated opt-in Adaptive MTP (OFF by default,
ARGUS_ADAPTIVE_MTP=0):n=1..2bounds for single-layer MTP, verification-duration + effectivetok/snet-benefit downshift, and default low-K + MTP block (ARGUS_MTP_ALLOW_LOW_K=1experimental override only).
- Separated
- GGUF Parser & WebUI Fixes:
- Replaced
BufReader::seek+stream_positioningguf_reader.rswith userspacepos+seek_relative, eliminated uncachedmatch_mmproj_for_modelre-parses and/api/modelswrite-lock contention (~17 s -> ~2.9 ms), and summed multi-shard GGUF disk sizes (30.64 GiBfor 3-shard Qwen4). - Fixed WebUI streaming UI freeze via
requestAnimationFrame-coalesced Markdown rendering, removedaria-live="polite"from the message stream container, addedreasoning_effort(low/off/high) and opt-in zero-dependency Web Search (web_search: falsedefault OFF).
- Replaced
Known Limitations & Honest Hardware Status
- AMD ROCm / HIP (
gfx942/gfx1100):COMPILE_VERIFIED / HW_PENDING— ROCm 6.3.3hipcccompilation verified; NOT production-ready until physical MI300X gates pass (scripts/rocm_headless_bench.sh,docs/plans/rocm-mi300x-validation-plan.md). - NVIDIA Blackwell (
B200/RTX 50xx) & Apple Metal:UNTESTEDon physical silicon. - Qwen4 P3 Layer-Major Prefill: Intentionally disabled in C++ (
llama-context.cpp) and Rust (planner/moe.rs) due to 4 proven structural incompatibilities (argus_pass,4×HC residual width, PLEubatch.token==nullptr, missingllama_memory_hybrid_idx_context::argus_seek()). - Qwen4 Native VoC Gate: Explicit
unsupported_dim_mismatchfallback (projection_applied: false) until an8192-dim gate is trained. - Adaptive MTP: Default OFF (
ARGUS_ADAPTIVE_MTP=0);N=32-seed stochastic probe is a non-collapse check, not high-power distribution equivalence proof.
Checksums & Verification
Attached assets include argus_cache-2.4.0.tar.gz (sdist), argus.patch, argus_build_fingerprint.json (portable AVX2 CPU reference), and SHA256SUMS.txt.
ARGUS v2.3.0
ARGUS v2.3.0 — General-Purpose Hardware-Adaptive Inference Runtime
ARGUS transitions from a MoE-only runtime to a general-purpose, hardware-adaptive inference runtime for Dense, Sparse MoE, Hybrid Attention+SSM/DeltaNet, Pure SSM/Recurrent, Multimodal Vision, and Embedding models on heterogeneous and memory-constrained systems, while keeping MoE optimizations (P3 async DMA, CPU_REPACK, K1/S1 tiered KV, dynamic moe_top_k, Native VoC) as first-class architecture-specific modules.
Highlights
- Composable Model Capabilities & Universal Hardware Discovery: Metadata + tensor-topology inspection (
ModelCapabilities) with exact O(1) recurrent state sizing (RWKV,Mamba,DeltaNet), zero hardcoded family lists, and automatic--fitfallback for unrecognized future GGUF architectures. Linuxhw_discoveryreads physical vs logical cores, hybrid P/E topology, L1/L2/L3 caches, NUMA, SIMD ISA, parent PCIe root-port-clamped link bandwidth (e.g. RTX 3050 Ti laptop Gen3 ×4~3.2 GB/s), NVML, RAM/swap, and Linux PSI with D3cold safety. - Universal Placement Planner &
mmprojProtection: UnifiedFullGpu,PartialGpu(-ngl k),CpuOnly,HeteroMoe, andUnknownUpstreamFit(--fit) policies; VRAM-aware--no-mmproj-offloadCPU fallback fixing themmproj -> p3buf=1 -> mmapcascade;--no-vision,--device,--ngl; auto--embeddings --poolingstrictly for embedding models. - Quality-Preserving Auto-Tuner (
argus tune) &CalibrationStore: 10-field composite-keycalibration_store.jsonwith.corrupt.<ts>quarantine recovery, 64 MiB DDR bandwidth probe, RAII ephemeral server teardown, and swap-thrash (>64 MiB), thermal (>=83°C/+12°C), noise-limited, and>=0.85×prefill-regression safety gates. - Capability-Gated OpenAI
/v1/*Gateway & WebUI: Non-MoE models explicitly rejectmoe_top_k > 0,moe_top_k_layers, and MoE-onlyargus_routingwith HTTP400(unsupported_for_model_architecture). WebUI hotfix fixesactiveIdTDZ startup crash, hardenslocalStorage, adds content-hashed?v=static cache busting, and hides MoE routing controls on non-MoE models. - Native Shutdown Fix & Systemd/Waybar Integration: Resolved the
ggml_kv_tiers.cppshutdown crash/hang via explicitargus_kv_shutdown()/argus_expert_cache_shutdown(), single-SIGTERMprocess-group stop, andKillMode=mixed(>25.4 s/13.45 s + coredump→0.79–1.93 s,0coredumps). Added OSflocksingleton guard and pure-Rustargus status --waybar(zero Python/jq, D3cold-safe). - C++/CUDA Hot-Path Generalization: Generalized
argus_dynamic_ram.cppfor Dense/Hybrid host weights and added opt-in Level-2 DenseGGML_OP_MUL_MATprofiling (cpu_mm_compute_ms,cpu_mm_calls_per_tok).
Controlled Multi-Architecture Benchmarks (docs/measurements/v230-2026-12-03/SUMMARY.md)
Verified hardware scope: Measured only on NVIDIA RTX 3050 Ti Laptop GPU (4 GiB GDDR6, PCIe Gen3 ×4 ~3.2 GB/s) + Intel Core i5-11300H (4P/8T, AVX-512 VNNI) + 32 GiB DDR4 (nice -n 5, equal quality temperature=0, seed=42).
| Architecture Class | Model | Placement | Decode / Throughput | Prefill | Peak VRAM | Parity |
|---|---|---|---|---|---|---|
| Embedding | nomic-embed-text-v1.5.Q8_0 |
Full-GPU ngl=13/12 |
133.0 req/s (7.52 ms, CPU 41.12) |
— (dim=768) |
600 MiB | N/A |
| Pure-Recurrent | rwkv7-1.5B-world-f16-q4_k |
Full-GPU ngl=25/24, 0 KV |
103.05 tok/s (IQR 0.34) |
302.4 tok/s | 1,606 MiB | PASS (+cancel iso) |
| Small Dense | qwen2.5-0.5b-instruct-q4_k_m |
Full-GPU / CPU mmap |
239.66 / 56.82 tok/s | 1,288.4 tok/s (CPU) | 526 MiB (CPU) | PASS |
| Attn+SWA-Dense + Vision | gemma-4-E4B-it-Q4_K_M (+946 MiB mmproj CPU) |
Tuned ngl=42/42, mmap |
39.95 tok/s (--fit: 39.91) |
1,042.6 tok/s | 3,498 MiB | PASS |
| Hybrid-Recurrent-Dense + Vision | tencent_UI-Mate-9B-Q4_K_M (+876 MiB mmproj CPU) |
Safe ngl=13/32 (50.3 MiB state) / --fit (15/32) |
8.23–8.70 tok/s | 115.4–117.6 tok/s | 3,236–3,522 MiB | PASS |
| Attn+SWA-MoE + Vision | gemma-4-26B_q4_0-it (+1.2 GiB mmproj CPU) |
HeteroMoe, CPU_REPACK, p3buf=2, p3=cal, 32K |
20.79 / 33.46 / 45.62 tok/s (K=8/4/2) |
57.4 / 113.0 / 201.1 tok/s | 2,754 MiB | PASS (0 regression) |
| Hybrid-Recurrent-MoE + Vision | Qwen3.6-35B-A3B-Q4_K_S (+614 MiB mmproj CPU) |
HeteroMoe, CPU_REPACK, p3buf=2, p3=cal, 32K |
25.94 / 38.11 / 48.85 tok/s (K=8/4/2) |
73.4 / 121.1 / 195.7 tok/s | 2,492 MiB | PASS (+0.2%..+3.1%) |
Negative Findings & Untested Scope
- Dense/Hybrid
CPU_REPACK(--load-mode none --no-host) —NO-GOforSafeDefault: Without MoEP3DMA streaming, disabling hostmmapregressed Dense/Hybrid prefill by-19.1%to-60.2%for<= +4.5%decode change. Dense/Hybrid/Pure-SSMSafedefault remainsmmap. - Physical P-cores (
-t 4) vs SMT (-t 8) — ConfirmedGO: Outperformed SMT by+11.2%to7.1×across all non-MoE architectures. - Untested Hardware Platforms (NO performance claims): GPUs with
>=8 GiBVRAM, AMD ROCm, Intel/AMD Vulkan, Apple Metal, unified-memory (UMA) hosts, and Multi-GPU setups have architectural abstractions only and remain untested. - Closed-Mode Instrumentation Gate: Remains
NOISE_LIMITED_CANNOT_PROVE_1_5PCTunder live-desktop laptop thermal drift (80–81.4°C).
Verification & Artifacts
- CI:
rust-control-plane(rust-ci+cargo-audit+cargo-deny) GREEN ·packaging(sdist+llama-cpp-patch-build+ K1 float64 reference) GREEN. - Local Verification: 39/39 Rust workspace tests, strict
clippy, WebUI XSS suite, 8/8 Python SDK/hygiene tests, 19/19 native CUDA/C++libargustests, zero-PythonPATHsmoke test,twine check --strict. - SHA256 Verification: Download
SHA256SUMS.txtalongside release assets and verify withsha256sum -c SHA256SUMS.txt.
ARGUS v2.2.1
ARGUS v2.2.1 — Adaptive P3 Prefill, Scoped OpenAI /v1/* Rust Gateway & Native Rust Benchmarking
Base commit: 05b68ae · Previous release: v2.2.0 (92af153) · CI: rust-control-plane (47123365254) & packaging (47123365281) GREEN.
Hardware Scope: All hardware performance numbers below were measured exclusively on NVIDIA GeForce RTX 3050 Ti Laptop GPU (4 GiB VRAM) + Intel Core i5-11300H (4P/8T, AVX-512 VNNI) + 32 GiB DDR4 on Linux. Architectural abstractions for
>=8 GiBGPUs (e.g. L40S, GB10) and unified-memory systems are present, but those platforms are untested ([TEST EDİLMEDİ]) — no performance or compatibility claims are made for them.
Highlights & Atomic Changes
1. P3 Adaptive Prefill (7ed0825)
ARGUS_P3_COALESCEis now default ON (1; explicitly toggleable OFF viaARGUS_P3_COALESCE=0/--p3-coalesce false), collapsing multi-ubatch DMA passes while preserving checkpoints, prefix reuse, SWA, multimodal, and KV state restore.- Separate hardware-agnostic out-of-box fallback policies with zero hardcoded laptop constants in source code:
fallback_repack:512 * sqrt(k_default / k_active)(rounded to 32, clamped[256, 1536]→K=8: 512,K=4: 736,K=2: 1024)fallback_mmap:256 * min(2.0, k_default / k_active)(clamped[256, 512]→K=8: 256,K<=4: 512)
- Optional fingerprint-keyed calibration store (
~/.argus_runtime/p3_profiles.json) keyed by(model, quant, hardware, load_mode). ARGUS_CUDA_GRAPH_EXTstays default OFF (0) after Phase 4 measured-5.29%K=2regression on 4 GiB single-stream heterogeneous decode.- Gemma 4 P3 Parity:
0.000000max logprob diff across136/136tokens (p3_repackvsp3_mmap) and100%factual + SWA multi-turn recall acrosscoal1/coal0/p3_off.
2. Scoped OpenAI-Compatible Rust Gateway (/v1/*, 714fa59)
- Native Rust endpoints in
argusd(zero Python runtime deps):/v1/models,/v1/models/{model_id},/v1/chat/completions,/v1/completions,/v1/embeddings. - Scope is strictly defined by
docs/openai-compatibility.md(not the full OpenAI cloud API): supports SSE streaming +stream_options.include_usage, cancellation,tools/tool_choice,response_format,stop,seed, normalizedusage, and per-request LoRA/K/VoC isolation. - Zero silent parameter drops: unsupported/unknown fields return HTTP
400(invalid_request_error/unsupported_parameter). - Admission-control isolation: managed
llama-serverreceives an ephemeral0600<runtime_dir>/backend.keyvia--api-key-file; direct calls tollama-serverbypassingargusdare rejected with401 Unauthorized.
3. Rust Control Plane Hardening (d9307dd)
(canonical_path, len, mtime)GGUF metadata cache andmodel_sig/TTL LoRA registry cache inargusdwith strict invalidation on file update,POST /api/loras, andPOST /api/models/switch.- Typed runtime knobs (
ubatch_size,voc_dir,cuda_graph_ext,decode_profile,p3_unrepack_threads,dynamic_k_policy) withCLI > Env > config.json > Defaultprecedence and strict validation. argus start --wait [--wait-timeout]with zombie-reaping early-exit detection, supervisorERRORreporting, timeout cleanup, log tails, and byte-exactconfig.jsonrollback.- Model-agnostic
mmprojfamily-token subset matcher rejecting cross-size mismatches (e.g.12Bnever loads26Bmmproj). - Non-intrusive
benchmarks/quiet.sh(0desktop/IDE processes touched by default; opt-in--allow-desktop-pauseguards ancestors, PGID, SID, shells, andlanguage_server*).
4. Native Rust bench/profile/replay & Legacy Python Purge (e7e1d84)
- Added
GET /api/profile, nativeargus profile,argus bench(TTFT, prefill/decode tok/s, median/p95/IQR, peak VRAM/RAM, P3 sweep, profile writer), andargus replay(ARGETRCv1 binary trace parser + Markov prefetch + 5-policy cache replay,2.66×–2.76×faster than Python with verified paritymax_diff <= 0.02). - Retired legacy Python benchmark/audit scripts (
benchmarks/*.py) and legacy runtime modules (argus_cache/adapters/,argus_cache/voc.py) — net-3,707lines removed. - Python package
argus-cache(2.2.1) is now strictly the zero-dependency stdlibArgusClientSDK (dependencies = []) plus canonicalargus_cache/csrc/C++/CUDA sources.
Measured Verification Summary (v2.2.0 vs v2.2.1 on RTX 3050 Ti 4 GiB)
Full ledger: docs/measurements/v221-2026-12-03/README.md
- P3 Prefill — Out-of-Box Clean Install (no
p3_profiles.json,out_of_box_fallback.json):5/6measured Gemma 4 points are1.69×–1.86×faster out of the box (K=8 874t: 4,746 ms,1818t: 5,526 ms;K=2 445t: 2,589 ms,874t: 4,999 ms,1818t: 5,296 ms);K=8 445t(8,384 ms, below the512fallback) improves to4,430 msonce locally calibrated.
- P3 Prefill — With Local Fingerprint Calibration (
~/.argus_runtime/p3_profiles.json):- 24 / 24 measured points (
430–3,661tokens,K=8/4/2) beat or matchv2.2.0:1.01×–2.10×on Gemma 4 26BQ4_0and1.06×–3.44×on Qwen 3.6 35BQ4_K_S.
- 24 / 24 measured points (
- Decode A/B/A (
128prompt /64gen viaargusdOpenAI SSE):- Qwen 3.6 35B
Q4_K_S:25.34 / 38.03 / 47.36 tok/s(K=8/4/2,2,494 MiBpeak VRAM;-1.12% / -0.26% / -2.00%vsA_avg). - Gemma 4 26B
Q4_0:20.92 / 32.91 / 44.85 tok/s(K=8/4/2,2,756 MiBpeak VRAM;-4.30% / -2.11% / -2.58%vsA_avgwith45.5°C → 60.5°Ccold-start thermal asymmetry).
- Qwen 3.6 35B
- 64K Long-Context Check: Both models hold
65,536 / 65,536(100%)S1GPU KV mirror (s1_split_calls=0,0OOM,~203–206 MiBOS load-time swap delta). - Test Matrix:
26/26Rust tests (fmt+ strictclippy),19/19native C++/CUDA tests,argus.patch --reverse, Node WebUI XSS,8/8Python thin SDK/hygiene tests, liveargus start --wait& rollback, live OpenAI +401bypass check, and sanitized zero-PythonPATHlive smoke test (env -i PATH=<clean_bin>; note this tests a sanitizedPATH, not a fresh OS image lacking a system Python installation).
Remaining Risks & Known Limitations
- Closed-mode
<1.5%perturbation gate: RemainsNOISE_LIMITED_CANNOT_PROVE_1_5PCTon this live-desktop laptop due to80–81.4°Csustained thermal drift (A1→A2: -8.51% K8 / -11.73% K2, IQR7.1–11.3%). -tb 8vs-tb 6calibration coupling: Hyper-thread contention at-tb 8shifted Gemma 4'sK=8P3 crossover (640 → 288); joint thread + P3 calibration is planned forv2.3.0.- Auto
mmprojon 4 GiB VRAM:argus start --modelauto-attaches matching BF16mmproj;--no-visionand VRAM-awaremmprojgating are planned forv2.3.0. - Untested hardware:
>=8 GiBGPUs and unified-memory hosts remain untested.
ARGUS v2.2.0 — Rust Control Plane & Adaptive MoE Performance
ARGUS v2.2.0 — Native Rust Control Plane + Phase 3 MoE Performance
Highlights
- Native Rust Control Plane (
argusd+argusCLI, zero Python required at runtime):argusd(~7.5 MB,12.2 MiBidle RSS,0.30%idle CPU) with Axum HTTP/SSE API, bounded queue/backpressure, mid-stream cancellation, per-request LoRA isolation, automatic KV invalidation, crash recovery backoff, failed model-switch rollback, and embedded bare Ollama-style WebUI (XSS-hardened Markdown, code copy, Markdown export, quota-safelocalStorage).argus(~4.8 MB) with 13 native subcommands (start,stop,restart,status,plan,chat,web,list,ps,inspect,logs,doctor,version) and--jsonsupport.- D3cold-safe multi-GPU hardware telemetry (
sysfs0x10de→ dynamiclibnvidia-ml.so.1NVML →nvidia-smifallback → CPU-only).
- Thin Zero-Dependency Python SDK (
argus_cache.ArgusClient): stdlib-only client (dependencies = []on PyPIargus-cache). - Phase 3 C++/CUDA Data-Plane Performance (RTX 3050 Ti 4 GB verified):
Q4_K_8x8/Q4_K_8x4CPU_REPACK+ Bit-Exact P3 Un-Repack (Perf-2):+31.8%K=8decode on Qwen 3.6 35BQ4_K_S(20.30 → 26.75 tok/s,cos=1.0000000000P3 parity), ratio-gated (>=80%repackable MoE bytes + host ISA check).- 2-Thread Parallel P3 Strip Un-Repack (
Perf-3):+5.2%long prefill on Gemma 4Q4_0,+2.2%on Qwen 3.6Q4_K_Sat0 MiBextra VRAM (default ON on 4+ core hosts). - Native C++ VoC (
Perf-4): zero-dependencyargus_voc.hinsidellama-server(--argus-voc-dir/ARGUS_VOC_DIR),99.5%KV reuse (424/426) on easyK=2turns, cleancache_n=0escalation toK=8 + thinking. - Opt-In CUDA Graph Capture (
Perf-1,ARGUS_CUDA_GRAPH_EXT=1, default0) & Experimental Opt-In Dynamic K (Perf-5,dynamic_k_policy, default OFF) with hybrid-K KV isolation.
Clean-Tree Verified Performance (RTX 3050 Ti 4 GB + i5-11300H + 32 GiB RAM, ctx=32K, KV=q4_0)
| Model | K=8 / K=4 / K=2 Decode |
Long Prefill (P3 DMA) | Idle / Peak VRAM | argusd RSS |
|---|---|---|---|---|
Gemma 4 26B (Q4_0) |
23.4 / 36.9 / 50.0 tok/s |
882.4 tok/s (7,769 tok) |
2,393 / 2,479 MiB |
13.3 MiB |
Qwen 3.6 35B (Q4_K_S) |
29.5 / 41.9 / 52.2 tok/s |
917.9 tok/s (7,019 tok) |
2,073 / 2,133 MiB |
12.6 MiB |
Full measurement ledger: docs/measurements/v220-2026-12-02/README.md · Migration guide: docs/MIGRATION_v2.2.md
ARGUS v2.1.0 — Hardware Efficiency
Highlights (RTX 3050 Ti 4 GB + i5-11300H + Gemma 4 26B Q4_0, clean tree 8c5fd11)
P0.5GPU-Resident HadamardQ4_0KV-Rotation (llama-kv-cache.cpp): keepsk_rot/v_rot(5.08 MiB) onCUDA0under-nkvo, cutting decode graph splits87 → 62(31CPU /31GPU) while preserving30/30heterogeneous overlap launches.P0.6CPU_REPACK(Q4_0_8x8AVX-512 VNNI / AVX2) + Overlap + P3 Compatibility: bit-exact streamingargus_unrepack_q4_0x8_strips()verified against livelibggml-cpuCPU_REPACK. Reaches22.52 / 35.50 / 48.10 tok/s(K=8/4/2,balanced -ncmoe 30) and23.28 / 37.18 / 49.17 tok/s(decode -ncmoe 29,2,995 MiBVRAM).P2Double-Buffered Async P3 DMA (ARGUS_P3_BUFFERS=auto|1|2): dedicated low-prioritydma_stream+2×2 MiBpinned bounce ring + cooperative Copy-Engine yield + strictly on-demandslot[1]freed immediately post-prefill (0 MiBidle VRAM penalty). Reaches450.19 tok/s(mmap,1.33×) and439.31 tok/s(CPU_REPACK,1.76×vsp3buf=1,+30.0%vsv2.0.1mmap p3buf=1) at 4,766 tokens with12/12greedy parity.P1Adaptive VRAM & RAM Budget Planner (argus_cache/adapters/vram_planner.py): 4 profiles (balanced,decode,prefill,coexist), fixes577.5 MiBtied-embedding underestimate, fixes-nkvoshared-arena double-counting, accounts for the measured+240 MiBGPU-MoE compute-buffer jump, and RAM-gates autoCPU_REPACK.- Verification: GitHub Actions CI run
46925713790✓ green (packaging+ Ubuntu CPUllama-server& strict-Wall -Wextra -WerrorK1 +Q4_0_8x8un-repack),43/43Python tests,17/17native CUDA tests,ruff,node --check, andargus.patchparity. - Full clean-tree measurements:
docs/measurements/v210-2026-12-02/README.md - PyPI:
pip install argus-cache==2.1.0
ARGUS v2.0.1 — P0 Decode Roofline Profiler & P3 Multi-LoRA Cassettes
ARGUS v2.0.1
Incremental release adding P0 decode roofline profiling and P3 GGUF-verified Multi-LoRA specialist cassette management, plus two C++ KV/LoRA root-cause fixes caught during live verification.
Highlights
- P0 Zero-Perturbation Decode Roofline Profiler (
ARGUS_DECODE_PROFILE=1|2):- Non-overlapping host wall-clock decomposition (
graph_build_ms,event_sync_ms,h2d_copy_ms,d2h_copy_ms,d2h_sync_ms,gpu_pre_submit_ms,cpu_split_ms,gpu_split_submit_ms,final_sync_ms,other_host_ms) + H2D/D2H byte counters. - Separate 256-slot async CUDA hardware event ring resolved post-sync (
gpu_pre_hw_ms,gpu_post_hw_ms, theoreticaloverlap_upper_bound_ms,event_ring_overflows). - Level-2 (
ARGUS_DECODE_PROFILE=2) opt-in CPU inner breakdown (cpu_mmid_prep_ms,cpu_mmid_compute_ms,cpu_barrier_ms,cpu_other_ops_ms). - Exported under
GET /props["argus"]["profile"]withGET /props?reset_profile=1reset hook and controlled VRAM-guarded harness (benchmarks/profile_decode.py).
- Non-overlapping host wall-clock decomposition (
- P3 Multi-LoRA Specialist Cassette Management (
argus_cache/adapters/lora.py):- Full GGUF compatibility verification (
is_lora,general.architecture, base tensor existence, and exact input/output/rank matrix dimensions). - VRAM-gated planner (max 4 adapters, KAT default active
1.0and standby adapters0.0via--lora-scaled,config.jsonprecedence over auto-discovery, zero hardcoded external repo paths — configure viaextra_dirs/ARGUS_LORA_DIRS). - Bare Ollama-style WebUI cassette selector,
slot_lockconcurrency isolation, per-requestlora_id, and active cassette provenance in SSEmeta.
- Full GGUF compatibility verification (
- Root-Cause Fixes:
llama_kv_cache::state_read_data()now refreshes ARGUS host KV GPU mirrors (argus_kv_mirror_refresh()) across prompt-cache and checkpoint restores.server-context.cppcallsslot.prompt_clear()on LoRA switch to clear KV memory andprompt_moe_top_katomically.- Evidence audit across
README.md,README_TR.md, anddocs/architecture.md.
Verified Hardware Measurements (RTX 3050 Ti 4 GB + i5-11300H + 32 GiB DDR4)
Full dataset & methodology: docs/measurements/v201-2026-12-02/README.md (git_rev=fe27820, git_dirty=false, event_ring_overflows=0):
- Roofline flip (
gemma-4-26B_q4_0-it): AtK=8, CPU routed MoE dominates (41.08 / 56.60 ms,72.6%;92.4%MUL_MAT_ID, only2.1%across512barriers). AtK=2, GPU sync (d2h_sync_ms + final_sync_ms = 11.33 / 24.45 ms,46.4%) overtakes CPU MoE (10.71 ms,43.8%). - Overlap & LoRA cost:
overlap=1realizes95.4%(3.48 ms,K=4) and91.2%(3.31 ms,K=2) ofoverlap_upper_bound_ms(3.63–3.65 ms).gemma4_kat_v1adds+2.90 ms/tokpure GPU HW (+1.12 mshidden in overlap pre-launch;+1.65–1.81 ms/tokwall time). - v2.1.0 discovery: 30-layer Gemma 4 runs
87scheduler splits/tok (41CPU +46GPU) vs61nominal —11extra CPU splits (0.78–1.63 ms/tok) identified forv2.1.0consolidation. - Multi-LoRA live gates (3 cassettes):
2,525 MiBtotal VRAM (+80 MiBfor 2 standby cassettes),7.08 ms12-cycle hot-swap median,cache_n=0cross-LoRA invalidation (A→B,B→C),100%coldA→B→A& concurrent isolation parity,+9.4 MiBRSS /+6 MiBVRAM over 12 cycles. - CI & Tests:
packaging.ymlgreen (packaging+ Ubuntu CPUllama-server+ K1 float64 reference),40/40Python tests +16/16native CUDA tests passing. - PyPI: https://pypi.org/project/argus-cache/2.0.1/
ARGUS v2.0.0 — Adaptive MoE Runtime & Bare Chat UI
ARGUS v2.0.0
Single-branch (main), focused adaptive MoE & memory optimization runtime for llama.cpp on consumer GPUs (4 GB VRAM + 32 GB DDR4), paired with a bare Ollama-style local chat UI.
Highlights
- Gemma 4
ARGUS_HETERO_OVERLAP: Overlaps GPU shared dense MLP (cur_mlp) with CPU routed MoE (cur_moe) — +14.6% at K=8 (16.95 -> 19.43 tok/s), +10.8% at K=4 (26.23 -> 29.05), +11.4% at K=2 (34.82 -> 38.78) with 100% greedy token exact parity. - Single-Pass KV-Preserving VoC (
preserve_kv):/embeddingssaves anend-1SWA-safe checkpoint and reuses 664/666 (99.7%) KV on matchingK(2.00x faster end-to-end on 666-tok prompts), while cleanly invalidating KV onKescalation (cache_n = 0). - Per-Layer
moe_top_k_layers: Up to 128-layer expert schedule (4/8/4hourglass:23.20 tok/s, +19.4% vs uniformK=8). - Core
libargusFixes: P3 works under--embeddings --pooling last(bit-exactcos=1.000000), Dynamic RAM Watchdog activates under standaloneARGUS_AUTO=1(30/30layers pinned,2,445 MiBVRAM), andargus_kv_mirrors_attach()copies only populated[0, active_cells)rows. - Bare Ollama-Style WebUI (
:8090) & Pure-NumPy VoC Router (argus_cache/voc.py). - Repository Cleanup: Consolidated onto
main, removed legacyexperiments/, oldplans/, and bloated Studio/Hermes/Study stack (-170KLOC).
Full RTX 3050 Ti measurements: docs/measurements/v200-2026-12-02/README.md.
ARGUS v0.7.0 — GPU-resident paged attention
ARGUS v0.7.0 — closing the measured gap, exactly
On the one workload measured end to end (Qwen2.5-0.5B-Instruct Q4_K_M, F16 KV, 4K
context, RTX 3050 Ti Laptop), ARGUS prefill went from 2.09x stock llama.cpp's
time to 1.29x with all KV on the GPU, and from 7.4x to 1.36x with the
placement policy managing GPU/pinned/RAM/disk tiers. Decode is now faster than
stock in both modes.
| mode | prefill (median, 5 repeats) | vs stock | decode |
|---|---|---|---|
| stock llama.cpp, host KV | 1.336 s | 1.00x | 37.5 tok/s |
| ARGUS GPU control (diagnostic) | 1.719 s | 1.29x | 55.6 tok/s |
| ARGUS policy on | 1.821 s | 1.36x | 48.2 tok/s |
Exactness. Every ARGUS attention path stays bit-exact with its staged
reference; the output hash is a152ed56 in every mode. Stock llama.cpp uses
tensor-core FlashAttention, which is a different arithmetic contract, so its
output bits differ (007ddc77). The ratios above compare two different
computations. They are one model, one GPU and one context length, not a general
speed claim.
What changed (llama.cpp integration)
- Decode reads GPU pages in place; decode went from 7.5 to 39 tok/s.
- KV appends are written on the GPU, byte-identical to the CPU encoding. In GPU
control they are resolved on the device. - Policy stores write dirty pages back to disk in the background, with verified
double slots. - Attention reads a device page table and returns without waiting, in GPU control
and, when the whole store fits the GPU budget, in policy stores. Page-table
entries change only through stream-ordered publication. - Placement-policy fixes: rewrites keep a page's promotion, and promotion leaves
the attention scratch headroom free. - Models ARGUS cannot serve (MLA, attention sinks, KQ bias, soft-capping, ALiBi,
Grok attention, several KV streams) fall back to llama.cpp's own KV cache at load. - Python runtime fixes: bounded event log with an opt-in trace
(ARGUS_TRACE_PATH);Page.getno longer swallows errors.
Install
pip install torch
pip install --no-build-isolation argus-cache==0.7.0The llama.cpp patches and sources ship in the sdist and the repository; see
README.md → Using ARGUS with llama.cpp.
Full changelog: CHANGELOG.md. Record of every experiment: plans/argus-v0.7.0.md.
ARGUS v0.5.2 — one copy of every module
Repository hygiene and packaging. No runtime behaviour changed, and no module under argus_cache/ was touched.
Removed the root core/ and models/ re-export shims. They existed so tests and benchmarks importing core.memory_manager and models.attention_wrapper would reach the canonical modules rather than a second copy — the root attention wrapper had once drifted 121 lines and silently dropped pipeline= and balloon_driver=, handing callers a cache that ignored its own tier configuration. All 17 importers now use argus_cache.core.* and argus_cache.models.* directly, so the shims have no callers and are gone. A package that does not exist cannot drift, and v0.5.2 no longer ships models/ at all.
The guard survives in the form the new layout needs. tests/test_import_hygiene.py fails if core/ or models/ reappears at the repository root, and if anything under tests/ or benchmarks/ imports them again. Both checks were verified to fail when violated, not only to pass when clean.
Added a packaging workflow. It builds the sdist, runs twine check, asserts the sdist would install only argus_cache and argus_cpp_backend, and runs the offline hygiene tests. It deliberately does not run the test suite: hosted runners have no CUDA device, so a green badge here means the package ships the right files, not that ARGUS works. The full suite runs locally.
Full local suite after the change: 383 passed, 13 skipped — unchanged from before it.
pip install torch
pip install --no-build-isolation argus-cache