@miller-tech/uap 1.172.9 → 1.172.10

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.
@@ -142,4 +142,11 @@ LLAMA_CHAT_TEMPLATE_FILE=embedded
142
142
  # on this binary and makes the server exit 1 at startup. Do not copy EXTRA_ARGS
143
143
  # across from the Qwen profile (which runs on mainline) without re-checking
144
144
  # each flag against `llama-server --help` for THIS binary.
145
- LLAMA_EXTRA_ARGS=--metrics --jinja --mlock --prio 2 --temp 1.0 --top-k 64 --top-p 0.95 --min-p 0.0 --ctx-checkpoints 32 --checkpoint-min-step 2048 --cache-ram 8192
145
+ # --cache-ram: 8192 was the llama.cpp DEFAULT, i.e. never actually chosen. The
146
+ # host-RAM prompt cache holds KV prefixes so a follow-up turn re-uses its prompt
147
+ # instead of re-prefilling it; undersize it and every eviction turns the next
148
+ # turn on that prefix into a full reprocess. Measured on this box under the Qwen
149
+ # profile at 16384: 87% of all prefill time went on re-doing evicted work. This
150
+ # model is smaller, but the working set is the SESSION's, not the model's, so
151
+ # the same 32 GiB applies. See the Qwen profile for the measurement method.
152
+ LLAMA_EXTRA_ARGS=--metrics --jinja --mlock --prio 2 --temp 1.0 --top-k 64 --top-p 0.95 --min-p 0.0 --ctx-checkpoints 32 --checkpoint-min-step 2048 --cache-ram 32768
@@ -61,9 +61,28 @@ LLAMA_N_PREDICT=16384
61
61
  # are built around exactly this template. Do NOT switch it to "embedded".
62
62
  LLAMA_CHAT_TEMPLATE_FILE=/home/cogtek/dev/miller-tech/universal-agent-protocol/tools/agents/config/qwen3.5-enhanced.jinja
63
63
 
64
+ # --cache-ram sizing — measured, not guessed
65
+ # The host-RAM prompt cache holds KV prefixes so a follow-up turn re-uses its
66
+ # prompt instead of re-prefilling it. Undersize it and it thrashes: every
67
+ # eviction turns the next turn on that prefix into a full reprocess.
68
+ #
69
+ # Measured on this box at 16384 (2026-07-29), one hour of a live agent session:
70
+ # 27 evictions, ~23.5 GB churned (avg entry 869 MiB)
71
+ # 30 large reprocesses >5k tokens, 829,587 tokens re-prefilled
72
+ # 418s of the 482s total prefill time — 87% — spent re-doing work
73
+ # worst single stall 44.4s
74
+ # The eviction count and the large-reprocess count track ~1:1, which is the
75
+ # causal link: the cache was holding a working set 1.5x its size.
76
+ #
77
+ # 32768 (32 GiB) clears that ~23.5 GB working set with margin. Host has 121 GB
78
+ # with ~50 GB available and 0 swap in use, so this leaves ~18 GB free — sizing
79
+ # to the measured working set rather than to all free RAM, because this cache
80
+ # competes with the page cache and with whatever else the operator runs.
81
+ # Re-measure with the eviction grep above before raising it further.
82
+ #
64
83
  # FLAG DRIFT: upstream renamed --checkpoint-every-n-tokens (old b8780 spelling,
65
84
  # which this profile used until 2026-07-28) to --checkpoint-min-step. An unknown
66
85
  # flag makes llama-server exit 1, and systemd then burns its restart budget
67
86
  # looping on it. Re-check every flag here against `llama-server --help` whenever
68
87
  # LLAMA_BIN moves.
69
- LLAMA_EXTRA_ARGS=--metrics --jinja --mlock --prio 2 --reasoning auto --reasoning-format deepseek --reasoning-budget 8000 --ctx-checkpoints 64 --checkpoint-min-step 2048 --cache-ram 16384
88
+ LLAMA_EXTRA_ARGS=--metrics --jinja --mlock --prio 2 --reasoning auto --reasoning-format deepseek --reasoning-budget 8000 --ctx-checkpoints 64 --checkpoint-min-step 2048 --cache-ram 32768
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miller-tech/uap",
3
- "version": "1.172.9",
3
+ "version": "1.172.10",
4
4
  "description": "Autonomous AI agent memory system with CLAUDE.md protocol enforcement",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",