docs: FORK.md/runbook/AGENTS.md for the 2026-11-22 rebase onto 5bacb7c86 - carries, #32807 vs F13, --fit for Inkling, F14 refinement, phase 1 results, window plan

- AGENTS.md: one-line pointer to FORK.md and the runbook at the top.
- FORK.md: candidate status; commit map rows for the new commits; F12
  state after the rebase (#32735 merged and dropped; #32740 split down to
  the GGML contract, the 808fd1c4e carry kept, owner decision; #32777
  carried) and how to use --fit for Inkling, with the F13 interaction read
  (fit measures F13's compute buffer; the visit count is taken on the
  all-device probe, so the views do not hide the loop); F13 section on
  upstream #32807, the LLAMA_LOOP_FULL_COPY knob and the window A/B; F14
  refinement (system-prompt checkpoint, disk cache read, lifetime) and
  validation plan items 5-7.
- Runbook: a rebase is not done until fork-validate phases 1 and 2 pass;
  ssh access and the persistent rootfs; gdb persists; the shrinking-PR
  case for carries; the 2026-11-22 rebase record; the overlayfs lock_id
  issue; phase 1 results and the ordered list of what the window must run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZz44SLQvTXMyWGio6t9DZ
This commit is contained in:
LumpiastyandClaude Opus 5.5 committed 2026-11-22 21:06:33 +01:00
1 parent 70d39bdbca
commit 27c23d20fe
3 files changed
+229 -7

No files matched your search

+2
View File
@@ -1,5 +1,7 @@
# Instructions for llama.cpp
> **Private fork: read [FORK.md](FORK.md) and [docs/fork-rebase-runbook.md](docs/fork-rebase-runbook.md) before any work.**
> [!IMPORTANT]
>
> AI-generated code is allowed. What is **not** allowed is submitting code you do not understand. You are 100% responsible for every line, however it was produced.
+157 -1
View File
@@ -6,6 +6,12 @@ which also holds the operations reference (pod access, files, recovery).
Status at the time of writing (2026-11-22):
- Candidate, not deployed: branch `fable5/vram-ondemand-rebase-20261122` on upstream `5bacb7c86`
(19 upstream commits past `e6d624b9a`, including upstream's #32755 fix #32807 and the merge of
#32735), with the F14 first-user-message break, the `LLAMA_LOOP_FULL_COPY` knob (F13) and the
carry of #32777 (F12). Pod build `/root/arms/reb20261122/build`. Its validation and the Inkling
A/Bs are in runbook section 3 ("2026-11-22") and in F12, F13 and F14 below; production stays on
`f3397cded` until they pass.
- Production runs `f3397cded` on branch `fable5/vram-ondemand-rebase-20261121` (upstream `e6d624b9a`,
757 upstream commits, plus the temporary upstream carries #32735 and #32740, F12, F13, the
per-pass loop views for Inkling, and F14, the user-message batch-break merge), deployed 2026-11-22
@@ -141,6 +147,13 @@ Oldest first. "Feature" points at the section below.
| 72da62cea | upstream-carry #32740: ggml: compact bias on the existing FLASH_ATTN_EXT for CUDA, ROCm and Vulkan (open upstream PR, temporary) | F12 |
| 312c29c2b | llama: inkling2_loop - per-pass views of host weights for the later loop passes (deployed 2026-11-22 as `b13c41355`) | F13 |
| 510aa6e09 | server: merge user-message batch breaks when the rest of the prompt fits in one ubatch (deployed 2026-11-22 as `f3397cded`) | F14 |
| e7e907b7c | server: F14 - keep the batch break at the first user message (system-prompt checkpoint) (branch `-20261122` only) | F14 |
| 5f88124b3 | llama: env knob LLAMA_LOOP_FULL_COPY=0 to skip upstream's inkling2_loop full-copy guard (#32807) (branch `-20261122` only) | F13 |
| 6c895a491 | upstream-carry #32777: fit : prioritize looped MoE layers in device memory (branch `-20261122` only) | F12 |
| 70d39bdbc | scripts: fork-validate.sh - scratch arenas on /dev/shm, lock_id failed on overlayfs (branch `-20261122` only) | F9 |
On `fable5/vram-ondemand-rebase-20261122` the #32735 carry (d2396e4e3) is gone (merged upstream) and
the other hashes in this table differ; the last four rows are hashes of that branch.
Later documentation-only commits (FORK.md, README, runbook) are not listed; they carry no code.
Everything down to `cce0ac1f0` is in production (`2fc9f9c35`, the documentation commit after it);
@@ -1120,6 +1133,69 @@ Carried since 2026-11-22 (both on upstream `e6d624b9a`, for Inkling-2-Mini, sect
`!bias` (F2). Vulkan supports it only for F16 K/V, head size 64 or 128, with subgroup shuffle and
vote (RX 580 RADV has both; Inkling is f16 KV, head size 128).
State after the 2026-11-22 rebase onto `5bacb7c86` (branch `fable5/vram-ondemand-rebase-20261122`):
- #32735: merged upstream as `8a97fa98a`, patch identical to the carried head. Carry dropped.
- #32740: still open, but the PR was split on maintainer request (one backend per PR). Its head
`8c6f0c0ca` (8 commits) is now only the GGML contract: `ggml_flash_attn_ext_add_indexed_bias`,
a CPU reference (the CPU backend now accepts indexed bias) and test-backend-ops cases (the
standalone `test-flash-attn-indexed-bias` is gone). `be0bf1fbd` removed the Vulkan support
(supports_op returns false for `src[5]` or indexed bias), `9cd195304` moved the CUDA/HIP kernels
and the Inkling graph changes (`llama-graph.cpp`, `llama-kv-cache.cpp`, `inkling2.cpp`) out of
it. No open PR carries the Vulkan part (Metal is #32808). The contract also changed in wording:
the bias is added "in F32" (before: "before its F16 rounding"); the API and the `src[6]`/`src[7]`
layout are the same. **Decision: the carry of head `808fd1c4e` is kept unchanged.** Carrying the
new head would remove the Vulkan kernel and the graph use, so Inkling would fall back to the
dense mask: compute buffer about 15.8 GiB at ctx 65536 instead of 7 GiB, and the k=4 placement of
F13 would no longer fit. Owner: decide whether to keep carrying `808fd1c4e` until a Vulkan
follow-up PR appears, or to port the Vulkan part onto the new contract. Once the contract merges
upstream, the carry will conflict with it in `ggml.h`, `ggml.c`, `ggml-cpu/ops.cpp` and every
backend's supports_op, and has to be reduced to the Vulkan and graph parts by hand.
- #32777 (new carry, owner's wish): `fit : prioritize looped MoE layers in device memory`, head
`01945dcb0`, one commit, applied cleanly. See "#32777 and `--fit` for Inkling" below.
**#32777 and `--fit` for Inkling.** `llama_model_layer_visits()` counts how many slots share each
layer's tensors (by pointer: `ffn_up_exps`, else the next present weight), so inkling2_loop gets 3
for the loop layers 6..17, 1 for the others, 0 for the 24 repeat slots. `--fit` then (a) probes
"only the non-loop experts on the CPU" against "all experts on the CPU" and keeps the loop experts
on the GPU if that leaves more free memory, and (b) when it moves experts back to the GPU layer by
layer, ranks the layers by visit count, so loop layers go first (the order of the F13 placement
guide).
- F13 interaction, checked by reading: fit's first probe, the only one that computes the visits,
runs with fit's own defaults (fit refuses to run with a user `-ngl`, `-ot`, `-ncmoe` or `-ts`), so
every weight is in a device (dummy) buffer, no F13 view exists, and the pointer sharing is
intact. Views appear only in the later probes with CPU experts, which do not recompute the
visits. If the visits were ever computed with the loop experts on the host, the views would make
every slot count 1 and the loop ranking would silently turn off (fix then: key on
`t->view_src ? t->view_src : t`); not reachable through `--fit` today, so not changed.
- Memory estimate: fit does not model the per-pass copies; it measures every candidate placement
with a no_alloc load and a graph reserve (`common_get_device_memory_data_impl`). The reserve sees
the F13 views, so its compute buffer is the F13 one (about 1.4 GiB at ctx 16384, not 7 GiB). The
estimate therefore already accounts for F13, and the PR's comment ("CPU-offloading repeated core
layers can inflate the compute buffer") describes the build without views; with views step (a)
will usually pick "all experts on the CPU" as the base and let step (b) add loop layers back.
Not changed.
- The mmproj: llama-server adds the mmproj estimate (about 0.8 GiB) to the fit margin of its
device before fitting, on top of `--fit-target` (default 1024 MiB). F5 releases the backbone
while the encoder runs, so that headroom is conservative.
- Fit plans against the VRAM free when it runs. Under llama-swap it runs inside
`common_init_from_params`, after `vram_acquire_for_load()` took the GPU token, so the previous
holder has released its VRAM; a process outside the arbiter still counts against it.
How to use it for Inkling (production command line `inkling_args` in `/root/config.yaml`):
- Remove `-ngl 99` and the `-ot blk[.](...)[.]ffn_.*_exps=CPU` pattern (either makes fit abort with
"already set by user"), keep `--ctx-size 65536` (a user context is not changed by fit), and add
`--fit on` (the default, but explicit) and `-lv 4` (fit's log and the memory breakdown are info
level). Optionally `--fit-target 512` to give back part of the 1024 MiB margin (the mmproj
estimate is still added).
- Dry run without serving: `build/bin/llama-fit-params` with the same arguments prints the chosen
`-c ... -ngl ... -ot "..."` line on stdout. Compare its `-ot` list with production's k=4 (CPU
experts for layers 0-5 and 10-23, GPU for 6-9).
- A/B in the window (GPU to itself): the k=4 `-ot` line against the `--fit` line, with F13's
drivers (`/root/arms/overnight/sweep.sh` for llama-bench pp2048 @ d8192/d16384 and tg256 @
d4096; give llama-bench the explicit `-ot` that fit-params printed rather than its own `-fitt`,
which is off by default and fits for the bench context, not 65536), plus the process VRAM/GTT after load and the `-lv 4` breakdown (the free column must keep
about 0.8 GiB for the mmproj).
Measured on the RX 580 (2026-11-21, the previous PR head: `1fa93f902`, `d29f9d489`, `ff91e4f84`,
without `808fd1c4e`; base `3bf6b55b3` vs base + both PRs; logs `/root/arms/pr-out/` on the pod):
- Inkling pp2048 at ub1024: 91.6 -> 110.5 t/s. pp2048 at depth 16384 (ub512): 48.4 -> 73.0 t/s.
@@ -1361,6 +1437,35 @@ only for the first split; not investigated.
- Model saving is not supported for `inkling2_loop` (`llama_arch_supports_save`), so duplicate data
in a saved file cannot happen.
**Upstream #32807 (in `5bacb7c86`, branch `-20261122`).** Upstream's fix for #32755: in
`sched_copy_experts`, after the first-node check and before F1's logic, `if (arch ==
LLM_ARCH_INKLING2_LOOP) return false;`, so the scheduler copies every expert of a shared host
weight (a TODO points at per-pass copies; the scheduler-side alternative #32809, "copy host experts
again for each split that reads them", was closed unmerged). That fixes correctness but keeps one
device copy per (host tensor, backend) per graph, alive until the last pass: the 6.5 GiB of held
copies and the ~7 GiB compute buffer stay. So F13 is still needed for memory; for correctness
it is now redundant with upstream's guard.
- With both, each pass uploads its own copy (F13) and every copy is a whole tensor (the guard):
in the 32-63-token window the readback path, which would upload only the selected experts, no
longer runs. Ubatches of 64+ tokens are unchanged (F1 copies every expert anyway), below 32 the
experts run on the CPU.
- Knob (fork, commit "env knob LLAMA_LOOP_FULL_COPY=0"): `LLAMA_LOOP_FULL_COPY=0` skips upstream's
guard. Only correct with the views on: with `LLAMA_LOOP_HOST_VIEWS=0` it brings #32755 back.
- On this branch, "upstream's fix alone" is `LLAMA_LOOP_HOST_VIEWS=0` (shared tensors plus the
guard), "F13 plus upstream" is the default, "F13 alone" is `LLAMA_LOOP_FULL_COPY=0`.
Window A/B to run (GPU to itself, candidate build, Inkling production command line):
1. Memory: process VRAM/GTT after load and the `-lv 4` breakdown at ctx 65536 with production's
k=4 `-ot`, default vs `LLAMA_LOOP_HOST_VIEWS=0`. Expected: upstream-only spills (compute about
7 GiB, as before F13); F13 fits with about 0.8 GiB free.
2. Correctness: `/root/arms/overnight/kld48.sh` (48-token ubatches, KLD against the knob-64 base)
for default, `LLAMA_LOOP_HOST_VIEWS=0` and `LLAMA_LOOP_FULL_COPY=0`. Expected: all three at the
GPU-vs-CPU noise level (mean KLD about 0.003); before #32807 views off gave 0.032.
3. Speed: llama-bench pp2048 @ d8192 and tg256 @ d4096 (`sweep.sh` settings) and a 48-token-tail
server prompt (the window where the guard costs uploads), default vs `LLAMA_LOOP_FULL_COPY=0`,
arms interleaved in one invocation (section 6). Keep the guard unless the knob wins clearly.
Then decide whether F13 stays (expected: yes, for memory).
**How to drop it.** If upstream fixes #32755 (for example per-reader copies or a copy-callback call for
every reader in the scheduler, or real per-pass tensors in the loader), revert 312c29c2b; the hook has
no other user. Check that upstream's fix also bounds the copy lifetime, otherwise the 6.5 GiB comes back.
@@ -1422,7 +1527,8 @@ which splits off the system prompt. Tool results count as user messages (Qwen op
**Where.** `tools/server/server-context.cpp`, `update_slots`, the prompt-batch loop:
`merge_user_starts` before the loop and the `!merge_user_starts` term of the user-start break.
Commit 510aa6e09.
Commit 510aa6e09. On branch `-20261122` the refinement adds `first_user_pos` before the loop, and the
user-start break checks `merge_user_starts` first (merged: break only at `first_user_pos`).
**How it works.** When the rest of the prompt from the current batch start fits in one ubatch
(`task.n_tokens() - prompt.n_tokens() <= n_ubatch`) and no media chunk was processed in this
@@ -1437,6 +1543,38 @@ whose rest is longer than one ubatch keep the upstream breaks (there the break d
whole of a ubatch, and the fallback would not be bounded). `LLAMA_USERSTART_MERGE=0` restores the
upstream behaviour everywhere.
**Refinement: the system-prompt checkpoint (owner's wish, commit "F14 - keep the batch break at the
first user message", branch `-20261122`, not deployed).** The merged path keeps one user-start
break: the one at the first user message, which is the end of the system prompt. Upstream breaks
there on a fresh prompt (no checkpoints yet), and the plain F14 had dropped it, so a new chat with
the same system prompt found no checkpoint at the system-prompt end and re-processed the system
prompt (a hybrid/recurrent state cannot be cut back without one). Now, merged or not, a prompt
processed from before its first user message ends a batch there; the next batch starts at the
user message and gets a checkpoint (user-start batch, near-end rule). A later new chat with the same
system prompt diverges inside the first user message, restores that checkpoint and processes only
its own user message and the generation prompt.
- Only fresh prompts are affected: checkpoints past the restore point are erased on reuse, so the
batch reaches the first user message only when the prompt is processed from before it (a new
chat, or a changed system prompt). Follow-up turns start past it and keep the full merge,
including no break at the last user message (the edit cost below is unchanged).
- First user messages below 8 tokens are skipped (no system prompt, only a BOS before it).
- Cost: turn 1 of every new chat runs the system prompt as its own batch again. That was part of
the U arm's turn-1 layout below (TTFT 6.08 vs 3.99 s for M, which also merged the last-user
break; the system-prompt split alone was not measured). A system prompt of 32+ tokens runs on the
GPU with one extra expert upload, below 32 tokens on the CPU.
- Lifetime of that checkpoint: it is the oldest one of the slot. When the list is full
(`--ctx-checkpoints`, default 32), the min-step thinning keeps the oldest checkpoint and erases
later ones within `--checkpoint-min-step` (8192) of it, and only then the FIFO drops the oldest. A
very long chat can still lose it; the RAM prompt cache (and F11 on disk) keeps the earlier
conversation's copy.
- Disk cache (F11), read: `disk_cache_load` replaces the slot prompt only with an entry that
reuses at least `DISK_CACHE_MIN_TOKENS` (256) more of the new prompt, and `n_reuse` counts a
saved prompt that diverges inside it as its newest checkpoint at or below the divergence. A saved
chat therefore offers the system-prompt checkpoint to a new chat after a restart, but only for a
system prompt of 256+ tokens; it never replaces a better slot prompt. The checkpoints are saved in
the file appendix and trimmed to `--ctx-checkpoints` from the front on load (only if the file has
more). Nothing in it removes the break; check it in the window anyway (validation plan item 5).
**Invariants that must hold.**
- The merge only applies when the rest fits in one ubatch: that bounds the extra re-processing on a
divergence inside the last user message to less than `n_ubatch` tokens.
@@ -1533,6 +1671,24 @@ measured above.
restore after a restart, `prompt_n` and output identical to the reference built from the same
commit.
Additions for the refinement (branch `-20261122`, to run in the window with the 35B think entry's
exact command line plus `-lv 4`, scratch port, arena and cache dir):
5. New chat #2 with the same system prompt. Chat 1: a system prompt of about 300 tokens (above the
256-token disk-cache minimum), then 3 turns as in item 2. Expected at trace level on chat 1 turn
1: a batch `[0, first user start)`, then a `created context checkpoint ... n_tokens = <first
user start>`, then the merged batch to end minus 4. Then chat 2: the same system prompt, a new
first user message. Expected: `restored context checkpoint ... n_tokens = <first user start>`
and `timings.prompt_n` = chat 2's user message plus the generation prompt only (not the system
prompt); no `forcing full prompt re-processing`. Follow-up turns of chat 1 must still run as one
batch (no break at the last user message): the M layout of the table above.
6. The same after a restart (disk cache): run chat 1, stop the server with SIGTERM (`disk cache:
saved the prompt`), start it again, send chat 2. Expected: `disk cache: restored`, then the
restore of the system-prompt checkpoint and the same `prompt_n` as in item 5. Also once with a
system prompt below 256 tokens: no disk restore is expected there (the minimum), only a fresh
prompt; that is the known limit, not a failure.
7. The 6-turn TTFT table of item 2 with the candidate, M only: turn 1 may be slower than 3.99 s
(the system-prompt split is back), turns 2-6 must match the M column within noise.
---
## 4. Dead ends
+70 -6
View File
@@ -61,7 +61,9 @@ git log --oneline "$OLD_BASE"..origin/master -- \
**Temporary upstream carries (FORK.md F12)** come first: `git log --oneline --grep '^upstream-carry'
"$OLD_BASE"..HEAD`. For each: merged into the new upstream -> do not cherry-pick it (check that the
merged version is the carried head or newer); still open -> re-fetch the PR head and re-carry it if
it moved; closed -> ask the owner. To carry a PR (2026-11-22: #32735, #32740):
it moved; closed -> ask the owner. A PR head can also shrink: on 2026-11-22 #32740 dropped the Vulkan part the fork needs, so the old
head stayed carried (FORK.md F12). Compare `git diff --stat` of the old and new head before re-carrying.
To carry a PR (2026-11-21: #32735, #32740; 2026-11-22: #32777):
```sh
git fetch https://github.com/ggml-org/llama.cpp pull/<N>/head:pr-<N>
git cherry-pick $(git merge-base pr-<N> HEAD)..pr-<N> # the PR's commits, oldest first; resolve by hand
@@ -106,6 +108,10 @@ git switch -c "$NEW" origin/master
git cherry-pick <first-fork-commit> # one at a time, in the original order
```
**A rebase is not done until `fork-validate.sh` phases 1 and 2 (section 6) pass on a pod build of
the new branch.** A rebased branch that is only picked, checked by reading, or built is unfinished
work, whatever the cherry-picks looked like. Report it as unfinished until both phases pass.
Rules:
- Cherry-pick in the original order, keep authors and messages. New commits you author get the
fork's trailer (`Co-Authored-By: Claude ...` for agent-written commits, FORK.md status block),
@@ -175,7 +181,28 @@ built or run locally; every item below is by reading only and needs the pod buil
`llama_kv_cache_dsa`, `_dsa_iswa`, `_dsv4`, `_msa`, `llama_memory_hybrid_iswa`. The KV rotation
tensors (`attn_rot_bufs`, #31073) are small and are not released either.
Open questions from that rebase:
**What the 2026-11-22 rebase (upstream `5bacb7c86`, 19 commits past `e6d624b9a`) changed.** Branch
`fable5/vram-ondemand-rebase-20261122`. The 64 picks (65 fork commits minus the #32735 carry) all
applied cleanly; the range-diff against the old branch is identical except for that dropped carry and
the new commits at the end. Reading checks:
- #32735 merged as `8a97fa98a`, patch identical to the carried head `0ea4ffd00`: carry dropped.
- #32740 is still open but was split: its head `8c6f0c0ca` is now only the GGML contract (op API,
CPU reference, test-backend-ops cases); the Vulkan kernel, the `kv_rows` support and the Inkling
graph use were removed from it and are in no open PR (Metal is #32808). Carrying that head would
drop Inkling's in-kernel bias (back to the 15.8 GiB compute buffer at ctx 65536, FORK.md F12). The
validated carry of head `808fd1c4e` is kept as is (FORK.md F12 has the owner decision).
- #32807 (`5bacb7c86`) adds an `LLM_ARCH_INKLING2_LOOP` guard to `sched_copy_experts` (whole-tensor
copies), upstream's fix for #32755. It sits beside F1 in the same function; no conflict. It does
not remove the held per-pass copies, so F13 stays (FORK.md F13, "Upstream #32807").
- #32713 (non-causal prompts fit in one ubatch) touches `update_slots` near the F14 loop but not
the user-start break; F14 unchanged by it.
- #32799 (`ignore_merges` for inkling2) changes Inkling's tokenization: Inkling prompts cached by
the previous build no longer match. The disk cache key holds the build commit, so nothing stale is
restored.
- New commits: the F14 first-user-message break (FORK.md F14), the `LLAMA_LOOP_FULL_COPY` knob
(F13) and the carry of #32777 (F12).
Open questions from the 2026-11-21 rebase:
- Is the fork's own concat fast path (F3) now redundant with upstream's tiled concat (#30591)?
Benchmark `GGML_VK_CONCAT_FASTPATH=0` against the default on pp and decode before deciding.
- Does `n_inflight` blocking the want-lock yield delay handoffs? Validation says no: handoff median
@@ -348,6 +375,35 @@ setsid nohup sh /root/bench/moe/swapdown.sh /root/arms/fv-perf.sh > /root/arms/f
`<scratch>/perf.tsv`, and `fork-validate.sh --perf-report <file>` re-aggregates them offline. A pod
restart empties `/tmp`, so copy a scratch dir you want to keep to `/root/arms/` (the 2026-10-24
scratch dirs were lost that way).
- Overlayfs (since the persistent rootfs, 2026-11-22): `/tmp` is on overlayfs, where `stat`
reports another device than `/proc/locks` prints, so a scratch arena under `/tmp` made every
token check fail (`arbiter/start: A serves but does not hold token.lock` while A held the lock).
`fork-validate.sh` from `70d39bdbc` on keeps its arenas on `/dev/shm`. Use the script of that
commit or later, also for a `--ref` run of an older build.
- Phase 1 of the 2026-11-22 rebase (candidate build `/root/arms/reb20261122/build`, code
`6c895a491`, scripts `70d39bdbc`, vs production `f3397cded`, beside production with 3579 MiB
free; logs `/root/arms/reb20261122-p1.log`, `-p1b.log`): `--ops --concat --diskcache` 23 PASS
(ops 5/5 with FLASH_ATTN_EXT 5693/5693, concat off/cand 5.3x, diskcache 15/15 including the GPU
legs), `--arbiter` 16 PASS on the rerun with the fixed script (handoff median cand 789.5 / ref
768 ms; the first run's single FAIL was the overlayfs mismatch above). F12: test-backend-ops
SCALE and FLASH_ATTN_EXT OK, `test-flash-attn-indexed-bias` 16 Vulkan0 cases, max error 1.3e-4.
Still to run in the window: phase 2 (`--arbiter --perf --moe-exact --moecache`, the runbook
command with this build path) and the Inkling/F14 items below.
- What the 2026-11-22 window must run, in this order (GPU to itself under swapdown; about 75-90
minutes in all):
1. Phase 2 as written above with `W=/root/arms/reb20261122` (about 32 minutes).
2. F13 vs upstream's #32807 (FORK.md F13, "Window A/B to run": memory, `kld48.sh`, speed with
`LLAMA_LOOP_HOST_VIEWS=0` and `LLAMA_LOOP_FULL_COPY=0`).
3. `--fit` vs the k=4 `-ot` for Inkling (FORK.md F12, "How to use it for Inkling"). Smoke run
beside production (3.5 GiB free, so not a placement result; `/root/arms/reb20261122-fit-smoke.log`):
fit's loop path runs on Inkling; the probing took 27.8 s, which every Inkling cold start would
pay with `--fit` in the config (freeze the printed `-ot` instead); the projected memory is not
monotonic in `n_layer` (5173 MiB at 44, 6736 at 43) and fit still reported success with -3116
MiB free. Check both with the full card.
4. F14 refinement (FORK.md F14, validation plan items 5-7): the new-chat checkpoint, its disk-cache
variant and the M-only TTFT table, with the 35B think entry's exact command line.
5. The Inkling post-deploy items of section 8 step 8 against a scratch server of the candidate:
#32799 changed Inkling's tokenization, so judge the answer text.
- F14 run (2026-11-22, candidate `f3397cded` = `166ec22e2` (docs on `b13c41355`) + F14, server-only change; one
swapdown window, `/root/arms/usw-window.sh`, log `/root/arms/usw-window.log`, about 15 minutes):
the 35B TTFT A/B with and without `LLAMA_USERSTART_MERGE=0` (FORK.md F14, M U U M, production 35B
@@ -578,8 +634,8 @@ A wedged arbiter looks like this: requests hang while `/health` still returns 20
shows a process holding WRITE on `token.lock` that is not generating. llama-swap restarts a child
that exits (on the next request for its model, FORK.md F7) but never one that wedges. Inspect it with
`gdb -p <pid> -batch -ex 'thread apply all bt'` before killing it. gdb is not in
the pod image: it was installed by hand and was gone after the 2026-10-24 pod restart, so check
`command -v gdb` and reinstall it first if needed.
the pod image; it was lost in the 2026-10-24 pod restart, but the rootfs persists since 2026-11-22 (section 11), so
an apt install now stays. Check `command -v gdb` and install it first if needed.
## 9. Rollback
@@ -670,6 +726,14 @@ kubectl -n llama exec -i deploy/supervisord -- sh -c '<command>'
kubectl get pods -n llama -l app=llama-swap -o name # the pod name changes across restarts
```
Alternative (since 2026-11-22): the pod runs sshd, so `ssh root@2001:470:61a3:400::7` works instead
of `kubectl exec` (`scp 'root@[2001:470:61a3:400::7]:/path' .` for files). The same rules apply:
detach long runs with `setsid nohup ... </dev/null &` and never `pkill -f`.
The pod's root filesystem now persists across pod restarts: packages installed with apt (gdb,
for example) stay installed. `/tmp` and `/run` are still wiped on every boot, so copy a scratch dir
you want to keep (fork-validate's `/tmp/fork-validate.*`) to `/root/arms/`.
Wiring: k8s service `llama:11434` -> pod port 8080 (selector `app=llama-swap`) -> llama-swap `:8080`;
a Caddy proxy fronts `llama.lumpiasty.xyz`. llama-swap must listen on `:8080`.
@@ -704,8 +768,8 @@ Useful commands:
- Token holder and waiters: `/proc/locks` filtered by the inode of `token.lock` / `want.lock`
(WRITE = holder on token.lock, READ = registered waiters on want.lock).
- 120 W cap active: `cat /sys/class/drm/card*/device/hwmon/hwmon*/power1_cap` = `120000000`.
- The pod has `curl`, `python3`, `flock`; no `jq`, and no `gdb` unless reinstalled by hand since the
last pod restart (`fork-validate.sh` then runs its SIGTERM-in-release case by polling the log).
- The pod has `curl`, `python3`, `flock`; no `jq`, and `gdb` only if installed with apt (it persists
since 2026-11-22; without it `fork-validate.sh` runs its SIGTERM-in-release case by polling the log).
Second test box (optional): `ssh user@gaming-pc`, the owner's NixOS desktop with an RX 6600 (RDNA2).
Pod-built binaries can run there through the host glibc loader without compiling. Numbers from it do