argus-cache 0.6.0__tar.gz → 0.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. {argus_cache-0.6.0 → argus_cache-0.8.0}/CHANGELOG.md +160 -0
  2. {argus_cache-0.6.0 → argus_cache-0.8.0}/MANIFEST.in +6 -0
  3. argus_cache-0.8.0/PKG-INFO +495 -0
  4. argus_cache-0.8.0/README.md +445 -0
  5. argus_cache-0.8.0/README_TR.md +477 -0
  6. argus_cache-0.8.0/argus_cache/adapters/anthropic_translate.py +404 -0
  7. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/adapters/base.py +1 -1
  8. argus_cache-0.8.0/argus_cache/adapters/claude_gateway.py +321 -0
  9. argus_cache-0.8.0/argus_cache/adapters/claude_session.py +282 -0
  10. argus_cache-0.8.0/argus_cache/adapters/llama_server.py +322 -0
  11. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/adapters/ollama.py +14 -108
  12. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/backend_pool.py +1 -1
  13. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/direct_attention.py +1 -1
  14. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/memory_manager.py +19 -30
  15. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/page_table.py +2 -2
  16. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/telemetry.py +2 -2
  17. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/tier_registry.py +1 -1
  18. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/zero_copy_pool.py +0 -1
  19. argus_cache-0.8.0/argus_cache/csrc/argus_config.h +275 -0
  20. argus_cache-0.8.0/argus_cache/csrc/argus_hetero.h +214 -0
  21. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/bindings.cpp +37 -38
  22. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/ggml_cuda_attention.cu +361 -81
  23. argus_cache-0.8.0/argus_cache/csrc/ggml_cuda_attention.h +115 -0
  24. argus_cache-0.8.0/argus_cache/csrc/ggml_cuda_external.cu +88 -0
  25. argus_cache-0.8.0/argus_cache/csrc/ggml_cuda_external.h +35 -0
  26. argus_cache-0.8.0/argus_cache/csrc/ggml_decode_attention.cpp +968 -0
  27. argus_cache-0.8.0/argus_cache/csrc/ggml_decode_attention.h +86 -0
  28. argus_cache-0.8.0/argus_cache/csrc/ggml_decode_e1.h +251 -0
  29. argus_cache-0.8.0/argus_cache/csrc/ggml_decode_simd.h +223 -0
  30. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/ggml_disk_buffer.cpp +138 -276
  31. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/ggml_disk_buffer.h +3 -0
  32. argus_cache-0.8.0/argus_cache/csrc/ggml_disk_gpu.cpp +707 -0
  33. argus_cache-0.8.0/argus_cache/csrc/ggml_disk_store.h +107 -0
  34. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/ggml_kv_policy.cpp +11 -1
  35. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/ggml_kv_policy.h +3 -1
  36. argus_cache-0.8.0/argus_cache/csrc/ggml_kv_tiers.cpp +373 -0
  37. argus_cache-0.8.0/argus_cache/csrc/ggml_kv_tiers.h +77 -0
  38. argus_cache-0.8.0/argus_cache/csrc/ggml_layer_prefill.cpp +998 -0
  39. argus_cache-0.8.0/argus_cache/csrc/ggml_layer_prefill.h +109 -0
  40. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/ggml_profile.h +3 -3
  41. argus_cache-0.8.0/argus_cache/csrc/ggml_split_attention.cu +919 -0
  42. argus_cache-0.8.0/argus_cache/csrc/ggml_split_attention.h +29 -0
  43. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/models/hybrid_cache.py +4 -4
  44. argus_cache-0.8.0/argus_cache/webui/__init__.py +4 -0
  45. argus_cache-0.8.0/argus_cache/webui/agent_loop.py +604 -0
  46. argus_cache-0.8.0/argus_cache/webui/anthropic_routes.py +111 -0
  47. argus_cache-0.8.0/argus_cache/webui/compaction.py +213 -0
  48. argus_cache-0.8.0/argus_cache/webui/doc_markdown.py +622 -0
  49. argus_cache-0.8.0/argus_cache/webui/hermes_pc.py +568 -0
  50. argus_cache-0.8.0/argus_cache/webui/hermes_vision.py +558 -0
  51. argus_cache-0.8.0/argus_cache/webui/permissions.py +192 -0
  52. argus_cache-0.8.0/argus_cache/webui/research_tools.py +342 -0
  53. argus_cache-0.8.0/argus_cache/webui/server.py +594 -0
  54. argus_cache-0.8.0/argus_cache/webui/static/app.js +798 -0
  55. argus_cache-0.8.0/argus_cache/webui/static/chat.css +360 -0
  56. argus_cache-0.8.0/argus_cache/webui/static/index.html +208 -0
  57. argus_cache-0.8.0/argus_cache/webui/static/markdown.js +116 -0
  58. argus_cache-0.8.0/argus_cache/webui/static/studio_panels.js +565 -0
  59. argus_cache-0.8.0/argus_cache/webui/static/study_deck.js +571 -0
  60. argus_cache-0.8.0/argus_cache/webui/static/study_research.css +330 -0
  61. argus_cache-0.8.0/argus_cache/webui/static/styles.css +183 -0
  62. argus_cache-0.8.0/argus_cache/webui/store.py +406 -0
  63. argus_cache-0.8.0/argus_cache/webui/study_tools.py +132 -0
  64. argus_cache-0.8.0/argus_cache/webui/tools.py +561 -0
  65. argus_cache-0.8.0/argus_cache/webui/web_search.py +226 -0
  66. argus_cache-0.8.0/argus_cache.egg-info/PKG-INFO +495 -0
  67. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache.egg-info/SOURCES.txt +50 -0
  68. argus_cache-0.8.0/argus_cache.egg-info/entry_points.txt +3 -0
  69. argus_cache-0.8.0/argus_cache.egg-info/requires.txt +23 -0
  70. argus_cache-0.8.0/integrations/llama.cpp/README.md +477 -0
  71. argus_cache-0.8.0/integrations/llama.cpp/argus.patch +1694 -0
  72. argus_cache-0.8.0/integrations/llama.cpp/cuda-kv.patch +144 -0
  73. argus_cache-0.8.0/integrations/llama.cpp/host-kv.patch +259 -0
  74. argus_cache-0.8.0/integrations/llama.cpp/v08-kv.patch +1412 -0
  75. {argus_cache-0.6.0 → argus_cache-0.8.0}/pyproject.toml +15 -7
  76. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_adapters.py +94 -7
  77. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_argus_service.py +100 -0
  78. argus_cache-0.8.0/tests/test_claude_gateway.py +460 -0
  79. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_import_hygiene.py +38 -2
  80. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_memory_intelligence.py +24 -8
  81. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_native_llama_paged.py +72 -8
  82. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_paper_grade_benchmarks.py +7 -6
  83. argus_cache-0.8.0/tests/test_webui.py +753 -0
  84. argus_cache-0.8.0/tests/test_webui_agent_and_hermes.py +514 -0
  85. argus_cache-0.6.0/PKG-INFO +0 -461
  86. argus_cache-0.6.0/README.md +0 -421
  87. argus_cache-0.6.0/argus_cache/adapters/claude_gateway.py +0 -902
  88. argus_cache-0.6.0/argus_cache/csrc/ggml_cuda_attention.h +0 -62
  89. argus_cache-0.6.0/argus_cache.egg-info/PKG-INFO +0 -461
  90. argus_cache-0.6.0/argus_cache.egg-info/requires.txt +0 -11
  91. argus_cache-0.6.0/tests/test_claude_gateway.py +0 -358
  92. {argus_cache-0.6.0 → argus_cache-0.8.0}/LICENSE +0 -0
  93. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/__init__.py +0 -0
  94. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/adapters/__init__.py +0 -0
  95. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/adapters/vllm.py +0 -0
  96. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/backends/__init__.py +0 -0
  97. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/backends/eviction.py +0 -0
  98. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/backends/quantization.py +0 -0
  99. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/__init__.py +0 -0
  100. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/activation.py +0 -0
  101. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/balloon_driver.py +0 -0
  102. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/dashboard.py +0 -0
  103. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/disk_pool.py +0 -0
  104. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/granularity.py +0 -0
  105. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/host_spill.py +0 -0
  106. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/jl_operators.py +0 -0
  107. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/logger.py +0 -0
  108. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/outliers.py +0 -0
  109. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/page_store.py +0 -0
  110. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/pool_allocator.py +0 -0
  111. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/quantization.py +0 -0
  112. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/core/triton_kernels.py +0 -0
  113. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/ggml_host_buffer.cpp +0 -0
  114. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/ggml_host_buffer.h +0 -0
  115. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/ggml_paged_attention.cpp +0 -0
  116. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/manager.cpp +0 -0
  117. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/manager.h +0 -0
  118. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/quantization_kernels.cu +0 -0
  119. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/tier_codec.cpp +0 -0
  120. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/tier_codec.h +0 -0
  121. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/zero_copy_pool.cpp +0 -0
  122. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/csrc/zero_copy_pool.h +0 -0
  123. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/models/__init__.py +0 -0
  124. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/models/attention_wrapper.py +0 -0
  125. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/models/hf_attention.py +0 -0
  126. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/plugins/__init__.py +0 -0
  127. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/plugins/capabilities.py +0 -0
  128. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache/plugins/registry.py +0 -0
  129. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache.egg-info/dependency_links.txt +0 -0
  130. {argus_cache-0.6.0 → argus_cache-0.8.0}/argus_cache.egg-info/top_level.txt +0 -0
  131. {argus_cache-0.6.0 → argus_cache-0.8.0}/setup.cfg +0 -0
  132. {argus_cache-0.6.0 → argus_cache-0.8.0}/setup.py +0 -0
  133. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_adaptive_activation.py +0 -0
  134. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_attention_parity_matrix.py +0 -0
  135. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_balloon_driver.py +0 -0
  136. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_baseline_harness.py +0 -0
  137. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_clock_sweep.py +0 -0
  138. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_compression_loss.py +0 -0
  139. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_context_ladder.py +0 -0
  140. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_direct_paged_attention.py +0 -0
  141. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_disk_pages.py +0 -0
  142. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_flash_attention_sink_pinning.py +0 -0
  143. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_granularity_invariants.py +0 -0
  144. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_hf_attention_bridge.py +0 -0
  145. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_host_spill.py +0 -0
  146. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_hybrid_qwen_cache.py +0 -0
  147. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_jl_operators.py +0 -0
  148. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_kv_cache.py +0 -0
  149. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_llama_integration.py +0 -0
  150. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_logger.py +0 -0
  151. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_pluggable_backends.py +0 -0
  152. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_plugin_system.py +0 -0
  153. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_pool_allocator.py +0 -0
  154. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_prefetch.py +0 -0
  155. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_quantization.py +0 -0
  156. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_stability.py +0 -0
  157. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_streaming_attention.py +0 -0
  158. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_telemetry_extraction.py +0 -0
  159. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_ui_mate_workload.py +0 -0
  160. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_variable_granularity.py +0 -0
  161. {argus_cache-0.6.0 → argus_cache-0.8.0}/tests/test_zero_copy_pcie.py +0 -0
@@ -1,5 +1,165 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.8.0 — Long context on a 4 GB card, and a local stack that stays out of the way
4
+
5
+ v0.8 moves `libargus` from paging KV to managing it across GPU and CPU at once, and
6
+ makes the local stack it runs in usable day to day. Numbers below are on an RTX 3050 Ti
7
+ Laptop (4 GB VRAM, PCIe Gen3 x4), 4-core i5-11300H, 32 GB RAM; every figure links to a
8
+ recorded run in the README.
9
+
10
+ ### Added (llama.cpp integration, `argus_cache/csrc/ggml_*`)
11
+ - **K1** CPU decode attention that reads each KV head once (`f32`/`f16`/`q8_0`/`q4_0`),
12
+ within `2e-6` of a `float64` reference and bit-identical across thread counts.
13
+ - **S1** KV tiers with split decode attention: an `f16` GPU mirror sized from free
14
+ VRAM plus K1 over the host KV. On `Qwen3.6-35B-A3B` (`--cpu-moe`) decode is **6.6x**
15
+ stock `-nkvo` at 64K (`12.31` vs `1.86 tok/s`) and **6.0x** at 128K, where stock GPU
16
+ KV does not load.
17
+ - **P2/P3** GPU prefill; P3 streams each layer's MoE experts across PCIe once per prompt
18
+ instead of once per microbatch, sharing VRAM with the KV mirrors: **1.93x** faster
19
+ prefill at 32K, **1.86x** at 64K.
20
+ - **C1** mixed-precision tiers (`q8_0`/`q4_0`, or `K=q8_0, V=q4_0`, in host RAM with an
21
+ `f16` GPU mirror) and opt-in **E1** bounded-mass block skipping.
22
+ - **`ARGUS_AUTO=1`** turns the proven levers on together; the heterogeneous scheduler
23
+ reclaims dead compute-buffer and GGUF host-page reservations.
24
+ - Layer-major prefill for Gemma 4 without per-layer inputs (**not yet measured**).
25
+
26
+ ### Added (local stack)
27
+ - **ARGUS Studio speaks the Anthropic Messages API** on `:8090` (`/v1/messages`,
28
+ `/v1/models`, `/v1/messages/count_tokens`), so Claude Code points at one port. Before
29
+ this, `argus_ctl.sh claude` aimed Claude Code at Studio, which answered 404.
30
+ - `argus-studio` and `argus-gateway` console scripts; a `studio` extra
31
+ (`fastapi`, `uvicorn`, `httpx`, `pydantic`, `python-multipart`); Studio's page now
32
+ ships as package data.
33
+ - `scripts/systemd/`: user services under `argus.target`, started by the compositor after
34
+ login rather than at boot, and an `ARGUS Studio` launcher that opens Studio as an app
35
+ window.
36
+ - **Cold-start warm-up.** With `--load-mode mmap` the first request after boot read the
37
+ experts from the SSD (14-token prefill **9.7 s**). The launcher now reads the GGUF into
38
+ page cache at idle I/O and CPU priority; the same cold start answered in **0.65 s**.
39
+ - Hermes desktop shortcuts are read live from `hyprctl binds -j` and pressed as key
40
+ combinations, so a changed `hyprland.lua` can no longer leave them stale.
41
+
42
+ ### Changed
43
+ - **Ollama is out of the local path.** The gateway and service manager no longer probe,
44
+ start or forward to Ollama; `llama-server` is the only backend. `OllamaAdapter` stays
45
+ as a library adapter.
46
+ - llama-server launch planning moved to `argus_cache.adapters.llama_server`;
47
+ `argus_cache.adapters.ollama` re-exports the old names, so v0.7 imports still work.
48
+ - llama-server's bundled web page is off by default (Studio replaces it). `--jinja` is
49
+ now always passed; it used to be tied to the web page flag.
50
+ - `argus_ctl.sh start` and the systemd launcher share one launch planner (the RAM
51
+ reserve setting had only reached one of them).
52
+ - The OpenAI-to-Anthropic stream translation is one transport-free state machine shared
53
+ by the gateway and Studio; a `length` finish is now reported as `max_tokens`.
54
+ - `requires-python` is `>=3.10` (3.8 and 3.9 are end of life); classifiers 3.10–3.14.
55
+
56
+ ### Removed
57
+ - `create_gateway_server(backend=...)`, `--backend`, `resolve_backend`,
58
+ `build_ollama_options`, `parse_ollama_residency`, `SseUsageTracker`, and the Ollama
59
+ residency rows of the telemetry UI: all served only the Ollama route.
60
+
61
+ ### Fixed
62
+ - **Import on Python 3.10–3.13 (shipped broken in v0.7.0).** `PagedDynamicKVCache`
63
+ annotated with `Dict`/`Any` without importing them; Python 3.14 defers annotations, so
64
+ it only failed on older interpreters, at import. `CacheTelemetry.sync_pending_cuda_events`
65
+ used `torch` without importing it.
66
+ - **Studio read chat screens out of order.** OCR words were grouped in (top, left) order,
67
+ so a right-hand word one pixel higher opened its own line and bubbles came back split
68
+ and reversed. Lines are now built by row; the sidebar split follows the layout's
69
+ gutter instead of a fixed 33%, which had pushed the chat list's timestamps into the
70
+ conversation.
71
+ - Screen readings replayed from earlier turns are labelled as old, so the model re-reads
72
+ the screen instead of answering from another chat's capture.
73
+ - Context compaction counted message text but not the tool output replayed with it, so
74
+ tool-heavy turns grew the context unchecked.
75
+ - Desktop shortcuts that open windows (launcher, terminal, zapret…) ran without asking;
76
+ everything but volume/media/brightness now needs approval.
77
+ - The gateway listened on `0.0.0.0`; it forwards cloud credentials, so it now binds
78
+ loopback by default.
79
+ - ARGUS no longer starts at boot and holds the login screen.
80
+
81
+ ## v0.7.0 — Closing the measured gap, exactly
82
+
83
+ v0.7 was an optimization campaign on one workload: Qwen2.5-0.5B-Instruct Q4_K_M,
84
+ F16 KV, 4K context, RTX 3050 Ti Laptop. Every step kept every ARGUS attention path
85
+ bit-exact with the staged reference; the output hash is `a152ed56` throughout.
86
+
87
+ Final baseline (profiler off, 5 repeats, MCP indexers paused, commit `95c74fa`):
88
+
89
+ | mode | prefill | vs stock | decode |
90
+ |---|---:|---:|---:|
91
+ | stock llama.cpp, host KV | 1.336 s | 1.00x | 37.5 tok/s |
92
+ | ARGUS GPU control | 1.719 s | 1.29x | 55.6 tok/s |
93
+ | ARGUS policy on | 1.821 s | 1.36x | 48.2 tok/s |
94
+
95
+ At v0.6.0 the same workload measured 2.09x (GPU control) and 7.4x (policy on), and
96
+ decode ran at 8 tok/s.
97
+
98
+ Stock uses tensor-core FlashAttention, a different arithmetic contract. ARGUS and
99
+ stock outputs differ at the bit level, so the ratios compare two different
100
+ computations.
101
+
102
+ ### Added (llama.cpp integration, `argus_cache/csrc/ggml_*`)
103
+ - **Decode on the resident path** (E5). Single-token attention reads GPU pages in
104
+ place instead of staging 4 KiB copies through 128 tile launches: decode 7.5 →
105
+ 39 tok/s.
106
+ - **KV appends written on the GPU** (E7a, E8). F32→F16 RNE encoding, byte-identical
107
+ to the CPU path. GPU-control stores resolve the rows on the device through a
108
+ store page table, with no host round trip.
109
+ - **Background disk write-back for policy stores** (E7b). Appended pages become
110
+ dirty and a per-store flusher publishes them with the existing double-slot
111
+ verification. Slot I/O runs under a separate lock so attention is not blocked.
112
+ After a crash the disk copy can trail the GPU by the dirty pages; the backing file
113
+ is unlinked and never outlives the process.
114
+ - **Wait-free attention** (E9 for GPU control, E10 for policy stores). Attention
115
+ reads a device page table and returns without waiting on the kernel. In policy
116
+ stores the table exists only while the whole store, the table and the scratch
117
+ headroom fit the GPU budget, so placement decisions are unchanged. Entries change
118
+ through stream-ordered publication; freeing a GPU page relies on `cudaFree`
119
+ waiting for queued device work, as it does on the tested driver.
120
+ - **Load-time fallback.** Models with MLA, attention sinks, KQ bias, soft-capping,
121
+ ALiBi or Grok attention, and contexts with several KV streams, keep llama.cpp's
122
+ own KV cache instead of failing at graph build.
123
+ - Kernel steps: coalesced K-row loads (E1) and `half2` V loads (E4), selectable
124
+ against references through `ARGUS_KV_ATTENTION_PATH`. The new default is
125
+ `cells-v2`.
126
+ - Write path: hardware CRC32C digests and whole-page commits (E2). The previous
127
+ behaviour is kept selectable through `ARGUS_KV_CHECKSUM=fnv` and
128
+ `ARGUS_KV_PAGE_COMMIT=page`.
129
+
130
+ ### Fixed
131
+ - **Placement policy:** a rewrite (every decode append) dropped a promoted page back
132
+ to disk; it now refreshes the copy in place. Promotion filled the attention
133
+ scratch headroom, so every call evicted what the previous one promoted (78,680 →
134
+ 36 promotions at a 2 MiB budget).
135
+ - The staged path let the policy observe while its scratch still held tier budget.
136
+ - **Python runtime:**
137
+ - `PagedDynamicKVCache.log_event` no longer grows without bound or writes into
138
+ the caller's working directory; the trace is opt-in through `ARGUS_TRACE_PATH`.
139
+ - `Page.get` no longer swallows conversion errors.
140
+
141
+ ### Changed
142
+ - `ggml_disk_buffer.cpp` split into `ggml_disk_store.h`, `ggml_disk_buffer.cpp` and
143
+ `ggml_disk_gpu.cpp`. The llama.cpp patches add the new source; rebuild after
144
+ updating.
145
+ - Live Ollama tests need `ARGUS_TEST_LIVE=1`; a plain `pytest` no longer loads a
146
+ model into a running Ollama service.
147
+ - The native lifecycle test keeps its stock reference on the CPU
148
+ (`op_offload = false`). On a CUDA build llama.cpp offloaded host operations,
149
+ flash attention included, to the GPU even with zero GPU layers. The quantized-KV
150
+ parity checks then compared against a different computation and failed; they
151
+ pass on CPU builds either way.
152
+
153
+ ### Not changed or not measured
154
+ - Policy off is still the reference host path.
155
+ - Q8/Q4 KV still use CPU attention.
156
+ - Nothing beyond 4K, another model or another GPU was measured.
157
+ - The HuggingFace path is unchanged apart from the fixes above.
158
+
159
+ Local suites: Python 382 passed, 6 skipped; native llama.cpp on the CUDA build 18
160
+ passed (quantized KV included); native on the CPU build 11 passed, 7 skipped
161
+ (CUDA-only). Record: `plans/argus-v0.7.0.md`.
162
+
3
163
  ## v0.6.0 — Placement policy and an exact GPU-resident attention path
4
164
 
5
165
  The pip-installed runtime (`argus_cache` and the `argus_cpp_backend` extension) is
@@ -7,6 +7,12 @@ include LICENSE
7
7
  include README.md
8
8
  include CHANGELOG.md
9
9
  recursive-include argus_cache/csrc *.h *.cuh *.cpp *.cu
10
+ # The llama.cpp integration: the patches and their contract travel with the sources
11
+ # they compile, so a PyPI install has everything the README's build steps need.
12
+ include README_TR.md
13
+ recursive-include integrations/llama.cpp *.patch *.md
14
+ # Studio's page, scripts and styles are package data, not code.
15
+ recursive-include argus_cache/webui/static *
10
16
 
11
17
  # Never ship build artifacts or local measurement scratch.
12
18
  prune build