Skip to content

Releases

ARGUS v2.4.1 — NVML File Descriptor Leak Hotfix

Choose a tag to compare

@Zwannfrederick Zwannfrederick released this 05 Dec 04:42

Fixed

  • NVML dlopen/dlclose eventfd Leak (EMFILE / os error 24): Cached libnvidia-ml.so.1 in a process-wide lazy OnceLock<Option<libloading::Library>> with NVML_LOCK serialization (rust/crates/argus-core/src/hw_discovery/providers.rs) while preserving per-poll nvmlInit_v2() / nvmlShutdown() for D3cold sleep safety. Eliminates the 1 eventfd/poll leak on NVIDIA Linux drivers that exhausted RLIMIT_NOFILE=1024 after ~84 minutes of 5 s telemetry polling.
  • Verified 0 FD growth across 100 NVML poll cycles and 30+ minutes of live argusd uptime (total_fd=21, eventfd=3).

ARGUS v2.4.0 — Cross-Vendor UMM, Qwen4-35B-A3B on 4 GB VRAM & Release Hardening

Choose a tag to compare

@Zwannfrederick Zwannfrederick released this 04 Dec 22:01

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 GB on disk) Live on 4 GB RTX 3050 Ti:
    • 16,384 allocated context capacity (37–56 tok measured multi-turn prompts): 20.39–20.83 tok/s decode, 3,064 MiB peak VRAM (730 MiB free), 10.99 GiB PLE N-gram table kept lazy on SSD (20.0 GiB initial read, +40.8 MiB paged during 3-turn chat + cancellation), clean cancellation recovery, 0.465 s shutdown (0 coredumps).
    • 32,768 allocated context capacity (KV q4_0 GPU): live verified on RTX 3050 Ti (3,209 MiB VRAM, 585 MiB free, 19.6–20.4 tok/s).
    • Zero regression vs v2.3.0: 20/20 CUDA native tests PASS (81.15 s), Gemma 4 26B 22.75 / 36.25 / 50.81 tok/s (+8.3%..+11.4%), Qwen 3.6 35B 29.71 / 41.27 / 54.65 tok/s (+8.3%..+14.5%).
  • Upstream llama.cpp Rebase (1579b02545274244eb159d204218d8dfab37baf0, v1.1.1 / b12977): Day-0 qwen4exp, --lazy-mode, multi-shard GGUF, QSA sparse indexer KV accounting, and sidecar mtp-*.gguf discovery.
  • Cross-Vendor Backend HAL & 5-Regime UMM (R0..R4):
    • A100-SXM4-40GB (R3 CUDA): 32,768 allocated ctx (2,437/4,838 tok measured prompts) 98.07 tok/s (0.995× stock, bit-exact, 20,900 MiB vs 20,914.3 predicted +0.07%); opt-in MTP n=2 113.5–137.4 tok/s; 65,536 allocated ctx / 55,112 measured prompt tok (3,526.5 tok/s pp, needle_ok=True); -np 4 cancel/KV all_isolated=True.
    • NVIDIA L4-24GB (R3/R2 CUDA): 32,768 allocated ctx 54.68 tok/s (1.07× dec, 1.48× pp2k, bit-exact); opt-in MTP n=1..2 51.5–76.4 tok/s; 27,574 measured prompt tok (needle_ok=True); -np 4 cancel/KV all_isolated=True.
    • Tesla T4-16GB (R2 CUDA, 12 GiB RAM, Swap=0): 16,384 allocated ctx (4,838 tok measured prompt) ncmoe=16, kv=gpu (13.73 tok/s, 13,447 MiB VRAM) beats ncmoe=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/s CPU, 56.61/55.53 tok/s Vulkan UMA, bit-exact parity).
  • Phase III Hardening (P0–P4):
    • Separated --profile portable (AVX2-only, AVX-512 OFF, multi-arch CUDA 75;80;86;89) from --profile native in scripts/build_backend.sh and CI, emitting argus_build_fingerprint.json hashed into CalibrationKey with 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_mismatch fallback (projection_applied: false, zero ad-hoc projection).
    • Calibrated opt-in Adaptive MTP (OFF by default, ARGUS_ADAPTIVE_MTP=0): n=1..2 bounds for single-layer MTP, verification-duration + effective tok/s net-benefit downshift, and default low-K + MTP block (ARGUS_MTP_ALLOW_LOW_K=1 experimental override only).
  • GGUF Parser & WebUI Fixes:
    • Replaced BufReader::seek + stream_position in gguf_reader.rs with userspace pos + seek_relative, eliminated uncached match_mmproj_for_model re-parses and /api/models write-lock contention (~17 s -> ~2.9 ms), and summed multi-shard GGUF disk sizes (30.64 GiB for 3-shard Qwen4).
    • Fixed WebUI streaming UI freeze via requestAnimationFrame-coalesced Markdown rendering, removed aria-live="polite" from the message stream container, added reasoning_effort (low/off/high) and opt-in zero-dependency Web Search (web_search: false default OFF).

Known Limitations & Honest Hardware Status

  • AMD ROCm / HIP (gfx942 / gfx1100): COMPILE_VERIFIED / HW_PENDING — ROCm 6.3.3 hipcc compilation 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: UNTESTED on 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, PLE ubatch.token==nullptr, missing llama_memory_hybrid_idx_context::argus_seek()).
  • Qwen4 Native VoC Gate: Explicit unsupported_dim_mismatch fallback (projection_applied: false) until an 8192-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

Choose a tag to compare

@Zwannfrederick Zwannfrederick released this 03 Dec 18:33

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 --fit fallback for unrecognized future GGUF architectures. Linux hw_discovery reads 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 & mmproj Protection: Unified FullGpu, PartialGpu (-ngl k), CpuOnly, HeteroMoe, and UnknownUpstreamFit (--fit) policies; VRAM-aware --no-mmproj-offload CPU fallback fixing the mmproj -> p3buf=1 -> mmap cascade; --no-vision, --device, --ngl; auto --embeddings --pooling strictly for embedding models.
  • Quality-Preserving Auto-Tuner (argus tune) & CalibrationStore: 10-field composite-key calibration_store.json with .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 reject moe_top_k > 0, moe_top_k_layers, and MoE-only argus_routing with HTTP 400 (unsupported_for_model_architecture). WebUI hotfix fixes activeId TDZ startup crash, hardens localStorage, 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.cpp shutdown crash/hang via explicit argus_kv_shutdown() / argus_expert_cache_shutdown(), single-SIGTERM process-group stop, and KillMode=mixed (>25.4 s / 13.45 s + coredump → 0.79–1.93 s, 0 coredumps). Added OS flock singleton guard and pure-Rust argus status --waybar (zero Python/jq, D3cold-safe).
  • C++/CUDA Hot-Path Generalization: Generalized argus_dynamic_ram.cpp for Dense/Hybrid host weights and added opt-in Level-2 Dense GGML_OP_MUL_MAT profiling (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-GO for Safe Default: Without MoE P3 DMA streaming, disabling host mmap regressed Dense/Hybrid prefill by -19.1% to -60.2% for <= +4.5% decode change. Dense/Hybrid/Pure-SSM Safe default remains mmap.
  • Physical P-cores (-t 4) vs SMT (-t 8) — Confirmed GO: Outperformed SMT by +11.2% to 7.1× across all non-MoE architectures.
  • Untested Hardware Platforms (NO performance claims): GPUs with >=8 GiB VRAM, 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_5PCT under 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++ libargus tests, zero-Python PATH smoke test, twine check --strict.
  • SHA256 Verification: Download SHA256SUMS.txt alongside release assets and verify with sha256sum -c SHA256SUMS.txt.

ARGUS v2.2.1

Choose a tag to compare

@Zwannfrederick Zwannfrederick released this 03 Dec 14:13

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 GiB GPUs (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_COALESCE is now default ON (1; explicitly toggleable OFF via ARGUS_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_EXT stays default OFF (0) after Phase 4 measured -5.29% K=2 regression on 4 GiB single-stream heterogeneous decode.
  • Gemma 4 P3 Parity: 0.000000 max logprob diff across 136/136 tokens (p3_repack vs p3_mmap) and 100% factual + SWA multi-turn recall across coal1 / 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, normalized usage, 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-server receives an ephemeral 0600 <runtime_dir>/backend.key via --api-key-file; direct calls to llama-server bypassing argusd are rejected with 401 Unauthorized.

3. Rust Control Plane Hardening (d9307dd)

  • (canonical_path, len, mtime) GGUF metadata cache and model_sig/TTL LoRA registry cache in argusd with strict invalidation on file update, POST /api/loras, and POST /api/models/switch.
  • Typed runtime knobs (ubatch_size, voc_dir, cuda_graph_ext, decode_profile, p3_unrepack_threads, dynamic_k_policy) with CLI > Env > config.json > Default precedence and strict validation.
  • argus start --wait [--wait-timeout] with zombie-reaping early-exit detection, supervisor ERROR reporting, timeout cleanup, log tails, and byte-exact config.json rollback.
  • Model-agnostic mmproj family-token subset matcher rejecting cross-size mismatches (e.g. 12B never loads 26B mmproj).
  • Non-intrusive benchmarks/quiet.sh (0 desktop/IDE processes touched by default; opt-in --allow-desktop-pause guards ancestors, PGID, SID, shells, and language_server*).

4. Native Rust bench/profile/replay & Legacy Python Purge (e7e1d84)

  • Added GET /api/profile, native argus profile, argus bench (TTFT, prefill/decode tok/s, median/p95/IQR, peak VRAM/RAM, P3 sweep, profile writer), and argus replay (ARGETRC v1 binary trace parser + Markov prefetch + 5-policy cache replay, 2.66×–2.76× faster than Python with verified parity max_diff <= 0.02).
  • Retired legacy Python benchmark/audit scripts (benchmarks/*.py) and legacy runtime modules (argus_cache/adapters/, argus_cache/voc.py) — net -3,707 lines removed.
  • Python package argus-cache (2.2.1) is now strictly the zero-dependency stdlib ArgusClient SDK (dependencies = []) plus canonical argus_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/6 measured Gemma 4 points are 1.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 the 512 fallback) improves to 4,430 ms once locally calibrated.
  • P3 Prefill — With Local Fingerprint Calibration (~/.argus_runtime/p3_profiles.json):
    • 24 / 24 measured points (430–3,661 tokens, K=8/4/2) beat or match v2.2.0: 1.01×–2.10× on Gemma 4 26B Q4_0 and 1.06×–3.44× on Qwen 3.6 35B Q4_K_S.
  • Decode A/B/A (128 prompt / 64 gen via argusd OpenAI SSE):
    • Qwen 3.6 35B Q4_K_S: 25.34 / 38.03 / 47.36 tok/s (K=8/4/2, 2,494 MiB peak VRAM; -1.12% / -0.26% / -2.00% vs A_avg).
    • Gemma 4 26B Q4_0: 20.92 / 32.91 / 44.85 tok/s (K=8/4/2, 2,756 MiB peak VRAM; -4.30% / -2.11% / -2.58% vs A_avg with 45.5°C → 60.5°C cold-start thermal asymmetry).
  • 64K Long-Context Check: Both models hold 65,536 / 65,536 (100%) S1 GPU KV mirror (s1_split_calls=0, 0 OOM, ~203–206 MiB OS load-time swap delta).
  • Test Matrix: 26/26 Rust tests (fmt + strict clippy), 19/19 native C++/CUDA tests, argus.patch --reverse, Node WebUI XSS, 8/8 Python thin SDK/hygiene tests, live argus start --wait & rollback, live OpenAI + 401 bypass check, and sanitized zero-Python PATH live smoke test (env -i PATH=<clean_bin>; note this tests a sanitized PATH, not a fresh OS image lacking a system Python installation).

Remaining Risks & Known Limitations

  • Closed-mode <1.5% perturbation gate: Remains NOISE_LIMITED_CANNOT_PROVE_1_5PCT on this live-desktop laptop due to 80–81.4°C sustained thermal drift (A1→A2: -8.51% K8 / -11.73% K2, IQR 7.1–11.3%).
  • -tb 8 vs -tb 6 calibration coupling: Hyper-thread contention at -tb 8 shifted Gemma 4's K=8 P3 crossover (640 → 288); joint thread + P3 calibration is planned for v2.3.0.
  • Auto mmproj on 4 GiB VRAM: argus start --model auto-attaches matching BF16 mmproj; --no-vision and VRAM-aware mmproj gating are planned for v2.3.0.
  • Untested hardware: >=8 GiB GPUs and unified-memory hosts remain untested.

ARGUS v2.2.0 — Rust Control Plane & Adaptive MoE Performance

Choose a tag to compare

@Zwannfrederick Zwannfrederick released this 02 Dec 22:17

ARGUS v2.2.0 — Native Rust Control Plane + Phase 3 MoE Performance

Highlights

  • Native Rust Control Plane (argusd + argus CLI, zero Python required at runtime):
    • argusd (~7.5 MB, 12.2 MiB idle 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-safe localStorage).
    • argus (~4.8 MB) with 13 native subcommands (start, stop, restart, status, plan, chat, web, list, ps, inspect, logs, doctor, version) and --json support.
    • D3cold-safe multi-GPU hardware telemetry (sysfs 0x10de → dynamic libnvidia-ml.so.1 NVML → nvidia-smi fallback → CPU-only).
  • Thin Zero-Dependency Python SDK (argus_cache.ArgusClient): stdlib-only client (dependencies = [] on PyPI argus-cache).
  • Phase 3 C++/CUDA Data-Plane Performance (RTX 3050 Ti 4 GB verified):
    • Q4_K_8x8 / Q4_K_8x4 CPU_REPACK + Bit-Exact P3 Un-Repack (Perf-2): +31.8% K=8 decode on Qwen 3.6 35B Q4_K_S (20.30 → 26.75 tok/s, cos=1.0000000000 P3 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 4 Q4_0, +2.2% on Qwen 3.6 Q4_K_S at 0 MiB extra VRAM (default ON on 4+ core hosts).
    • Native C++ VoC (Perf-4): zero-dependency argus_voc.h inside llama-server (--argus-voc-dir / ARGUS_VOC_DIR), 99.5% KV reuse (424/426) on easy K=2 turns, clean cache_n=0 escalation to K=8 + thinking.
    • Opt-In CUDA Graph Capture (Perf-1, ARGUS_CUDA_GRAPH_EXT=1, default 0) & 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

Choose a tag to compare

@Zwannfrederick Zwannfrederick released this 02 Dec 16:33

Highlights (RTX 3050 Ti 4 GB + i5-11300H + Gemma 4 26B Q4_0, clean tree 8c5fd11)

  • P0.5 GPU-Resident Hadamard Q4_0 KV-Rotation (llama-kv-cache.cpp): keeps k_rot/v_rot (5.08 MiB) on CUDA0 under -nkvo, cutting decode graph splits 87 → 62 (31 CPU / 31 GPU) while preserving 30/30 heterogeneous overlap launches.
  • P0.6 CPU_REPACK (Q4_0_8x8 AVX-512 VNNI / AVX2) + Overlap + P3 Compatibility: bit-exact streaming argus_unrepack_q4_0x8_strips() verified against live libggml-cpu CPU_REPACK. Reaches 22.52 / 35.50 / 48.10 tok/s (K=8/4/2, balanced -ncmoe 30) and 23.28 / 37.18 / 49.17 tok/s (decode -ncmoe 29, 2,995 MiB VRAM).
  • P2 Double-Buffered Async P3 DMA (ARGUS_P3_BUFFERS=auto|1|2): dedicated low-priority dma_stream + 2×2 MiB pinned bounce ring + cooperative Copy-Engine yield + strictly on-demand slot[1] freed immediately post-prefill (0 MiB idle VRAM penalty). Reaches 450.19 tok/s (mmap, 1.33×) and 439.31 tok/s (CPU_REPACK, 1.76× vs p3buf=1, +30.0% vs v2.0.1 mmap p3buf=1) at 4,766 tokens with 12/12 greedy parity.
  • P1 Adaptive VRAM & RAM Budget Planner (argus_cache/adapters/vram_planner.py): 4 profiles (balanced, decode, prefill, coexist), fixes 577.5 MiB tied-embedding underestimate, fixes -nkvo shared-arena double-counting, accounts for the measured +240 MiB GPU-MoE compute-buffer jump, and RAM-gates auto CPU_REPACK.
  • Verification: GitHub Actions CI run 46925713790 ✓ green (packaging + Ubuntu CPU llama-server & strict -Wall -Wextra -Werror K1 + Q4_0_8x8 un-repack), 43/43 Python tests, 17/17 native CUDA tests, ruff, node --check, and argus.patch parity.
  • 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

Choose a tag to compare

@Zwannfrederick Zwannfrederick released this 02 Dec 14:17

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, theoretical overlap_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"] with GET /props?reset_profile=1 reset hook and controlled VRAM-guarded harness (benchmarks/profile_decode.py).
  • 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.0 and standby adapters 0.0 via --lora-scaled, config.json precedence over auto-discovery, zero hardcoded external repo paths — configure via extra_dirs / ARGUS_LORA_DIRS).
    • Bare Ollama-style WebUI cassette selector, slot_lock concurrency isolation, per-request lora_id, and active cassette provenance in SSE meta.
  • 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.cpp calls slot.prompt_clear() on LoRA switch to clear KV memory and prompt_moe_top_k atomically.
    • Evidence audit across README.md, README_TR.md, and docs/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): At K=8, CPU routed MoE dominates (41.08 / 56.60 ms, 72.6%; 92.4% MUL_MAT_ID, only 2.1% across 512 barriers). At K=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=1 realizes 95.4% (3.48 ms, K=4) and 91.2% (3.31 ms, K=2) of overlap_upper_bound_ms (3.63–3.65 ms). gemma4_kat_v1 adds +2.90 ms/tok pure GPU HW (+1.12 ms hidden in overlap pre-launch; +1.65–1.81 ms/tok wall time).
  • v2.1.0 discovery: 30-layer Gemma 4 runs 87 scheduler splits/tok (41 CPU + 46 GPU) vs 61 nominal — 11 extra CPU splits (0.78–1.63 ms/tok) identified for v2.1.0 consolidation.
  • Multi-LoRA live gates (3 cassettes): 2,525 MiB total VRAM (+80 MiB for 2 standby cassettes), 7.08 ms 12-cycle hot-swap median, cache_n=0 cross-LoRA invalidation (A→B, B→C), 100% cold A→B→A & concurrent isolation parity, +9.4 MiB RSS / +6 MiB VRAM over 12 cycles.
  • CI & Tests: packaging.yml green (packaging + Ubuntu CPU llama-server + K1 float64 reference), 40/40 Python tests + 16/16 native CUDA tests passing.
  • PyPI: https://pypi.org/project/argus-cache/2.0.1/

ARGUS v2.0.0 — Adaptive MoE Runtime & Bare Chat UI

Choose a tag to compare

@Zwannfrederick Zwannfrederick released this 02 Dec 12:51

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): /embeddings saves an end-1 SWA-safe checkpoint and reuses 664/666 (99.7%) KV on matching K (2.00x faster end-to-end on 666-tok prompts), while cleanly invalidating KV on K escalation (cache_n = 0).
  • Per-Layer moe_top_k_layers: Up to 128-layer expert schedule (4/8/4 hourglass: 23.20 tok/s, +19.4% vs uniform K=8).
  • Core libargus Fixes: P3 works under --embeddings --pooling last (bit-exact cos=1.000000), Dynamic RAM Watchdog activates under standalone ARGUS_AUTO=1 (30/30 layers pinned, 2,445 MiB VRAM), and argus_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 legacy experiments/, old plans/, and bloated Studio/Hermes/Study stack (-170K LOC).

Full RTX 3050 Ti measurements: docs/measurements/v200-2026-12-02/README.md.

ARGUS v0.7.0 — GPU-resident paged attention

Choose a tag to compare

@Zwannfrederick Zwannfrederick released this 26 Sep 11:16

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.get no longer swallows errors.

Install

pip install torch
pip install --no-build-isolation argus-cache==0.7.0

The 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

Choose a tag to compare

@Zwannfrederick Zwannfrederick released this 16 Sep 18:47

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