Skip to content

Releases

interlock 1.0.11

Choose a tag to compare

@mcp-tool-shop mcp-tool-shop released this 27 Oct 17:12
351cd2c

Added

  • A cell whose projected anonymous host KV is over the VM's limit is refused before its model loads. Three T4 windows lost their kernel to a cgroup OOM kill after a llama-server SIGKILL (s1r, s2a, s2a2): 34 loads across seven windows were killed, every one a load whose KV spilled to host RAM past what the VM holds. Before a generate cell starts, interlock now scales the previous load's llama_kv_cache: size by the requested num_ctx times the slots (req_total; llama's padded n_ctx is not used), takes off the KV the GPU held (max(0, kv_total_prev x req_total_next / req_total_prev - kv_gpu_prev)), and refuses the cell when that projection times the factor is over the limit: Ollama's reported system memory less its 0.1 GiB rounding (12,953.6 MiB on a T4), or the cgroup's /sys/fs/cgroup/memory.max when that is readable, a number and lower (bound_by says which). The mapped weights (CPU_Mapped) are file-backed pages the kernel can evict and the cgroup kills on anonymous memory, so they are recorded (mapped_prev, proj_mapped_mib) and not tested: with them, completed loads would have been refused: at factor 1.0 two (s1b qwen3:8b Q8_0, projected 14,375 and 14,445 MiB), and at 1.05 four (those two plus Q6_K at 12,540 and 12,598 MiB).
  • The replay over the seven T4 windows (tests/test_host_ram_projection.py, from tests/fixtures/host_ram_replay.tsv): of 234 attributed generate-ladder loads, 12 are the first of their run and are never projected; of the other 222, 0 of 188 completed loads are refused and 34 of 34 killed loads are. The largest completed projection is 12,021.2 MiB (s1b load 45, qwen3:8b Q8_0 p16384 c8, partial offload; times 1.05 is 12,622.2) and the smallest killed one 14,804.2 MiB (s1a, s2a and s2a2 load 12, phi3.5 Q4_K_M p16384 c4; times 1.05 is 15,544.4). Any factor from 0.875 to 1.077 separates them; 1.05 is the default.
  • interlock run --host-ram-projection on|off (default on; off runs as 1.0.10 did and each row records only {"mode": "off"}) and --host-ram-safety FACTOR (default 1.05; a finite number above 0, otherwise refused with a structured host_ram_safety_invalid error, a hint and a non-zero exit). They are defined in cli.py, checked in harness/runner.py before any device contact, and handed to run_linux_spec.
  • settings.host_ram_projection, one dict on every generate-ladder row. A projected cell records mode, decision (allow or refuse), factor, limit_mib, bound_by, the source load (source_load, its requested num_ctx and slots, req_total_prev, n_ctx_prev, kv_total_prev, kv_gpu_prev, mapped_prev) and the next cell's (num_ctx_req_next, slots_req_next, req_total_next, kv_total_next, projkv_mib, proj_mapped_mib, host_projected_mib), and the system memory (system_total_mib, margin_mib, cgroup_max_mib). A cell that was not projected records {"mode": "on", "decision": "skipped", "skipped": "<why>", "factor": ...}: the run's first load, a pre-registered refusal row, or a cell run through a measure function that reported none.
  • A refused row is oom, with settings.failure_reason starting projected host RAM: and every number. It sends no request and restarts nothing, and carries no peak_mib (the VRAM sampled before a load is the previous cell's, 14,320 MiB on s1r2 row 13). A real kill keeps 1.0.10's host RAM: the load needed ... wording, so the two cannot be mistaken for each other.
  • parse_load_report returns three more keys, n_ctx, kv_total_mib (the llama_kv_cache: size line, absent from a killed load) and gpu_kv_mib (the CUDA<n> KV buffer size lines; 0 when a size line has none; None with no size line). The projection's state is per ladder run (each model and quant starts fresh), is kept across the server restarts that change the slot count, and is replaced only by a load that printed its size line: a refused cell or a killed one leaves the last load as it was, so the cell after a refusal still scales from the last load that happened.
  • GENERATE_LADDER_VERSION stays 4. Cell shapes, prompts and measured speeds are unchanged, only which cells are measured, as in 1.0.8, 1.0.9 and 1.0.10; a bump would make the router's newest-version filter split the sweep's repetitions. Rows with settings.host_ram_projection are 1.0.11 rows; the router does not read it.

Limits

  • False refusals are possible in the band between limit / factor and limit: on a T4, a projected anonymous KV of 12,337 to 12,954 MiB. The projection overstates a partial load, because Ollama hands the VRAM freed by offloading fewer weight layers to the KV (s1b load 45: projected 12,021 MiB, actual 10,184). The closest completed load on record is s1b qwen3:8b Q8_0 p16384 c8, projected 12,021, which clears the 12,337 line by 316 MiB (331 MiB under the limit once multiplied). The live check: any projected host RAM: row on a cell that loaded as a partial offload in rep s1 is a false refusal.
  • The first cell of each run is never projected, because there is no earlier load to scale from. The ladder starts at p512 c1, and no first load on record was killed (all 34 kills in the seven T4 windows had a projection). The C2 launcher's dead-harness halt (v4p) is the cover if one ever is.
  • A completed run records the factor it used. A row from an earlier version has no host_ram_projection; one with {"mode": "off"} was run with the projection off.

Docs

  • The handbook's experiments page describes the host-RAM projection: what it refuses, the limit and factor, the two flags, the first-cell gap and the false-refusal band. The README's version line, in all eight languages, reads 1.0.11.

Coverage

  • Measured 93.94% line coverage (full run, 1,299 passed); the enforced floor is 90 (--cov-fail-under=90 in pyproject.toml).

v1.0.10

Choose a tag to compare

@mcp-tool-shop mcp-tool-shop released this 27 Oct 05:20
376cfe8

Fixed

  • The TTFT scaling floor no longer gates a cell. T4 s1b (qwen3:8b Q4_K_M) lost 7 of 21 generate cells to it (c4 at 1024 to 8192 and c8 at 1024 to 4096), and T4 s1a lost 2 phi3.5 FP16 cells (c4 2048, c8 1024) the same way. Its baseline was noise, not warm-up: every cell already runs a warm-up pass, and at concurrency above 1 a single pass's mean prefill spikes by 2 to 4x, so the median of three repeats can still be a spike. Q4_K_M c4 512 had passes of 4,529 (warm-up), then 4,052, 1,099 and 3,747 ms (median 3,747; Q6_K and Q8_0 at the same shape: 1,109); c8 512 had 1,587, 3,306, 1,584 and 2,334 (median 2,334, against about 1,520 to 1,559); phi3.5 FP16 c4 1024 had 1,127, 2,542, 1,878 and 1,843. One spiked baseline made the next, correct cell fail the 60% floor, and because the baseline never moved on a failure every later cell at that concurrency failed too. The floor could not catch the event it was built for either: every call starts with its own prefix from character 0, llama-server reuses only the longest common token prefix, so a real cache hit is all or nothing and gives a prefill of a few milliseconds, which PREFILL_TOK_S_CEILING (250,000 tok/s, about 2 ms at 512 tokens) already catches and still does. TTFT_SCALING_FLOOR and _ttft_does_not_scale are deleted (the recorded spread below replaces them as the diagnostic).

Added

  • The noise is recorded, not gated. Every measured generate row's settings gains prefill_ms_passes (the repeat passes' prefill, in order, without the warm-up) and prefill_spread (max over min of those passes, 3 decimals; null with no passes or when a pass is at or below 0). Every generate row, measured or failed, gains settings.ttft_floor: "off", so a reader can tell 1.0.10 rows from 1.0.9 rows (which have no field).
  • GENERATE_LADDER_VERSION stays 4. Nothing measured changes, only which cells are labelled unmeasured, the same reasoning that kept 1.0.8 and 1.0.9 at 4; a bump would make the router's newest-version filter split the sweep's repetitions. The router does not filter on ttft_floor.

Docs

  • The handbook's experiments page no longer says a cell is unmeasured when its prefill does not grow with the prompt; it describes the prefill ceiling and the recorded spread.
  • README.fr.md's version line. Since 1.0.7 the French status line kept "Version 1.0.6" and its correction notice read "Correction dans la version 1.0.9" (the release script's pattern did not match French typography's non-breaking space before the colon, so it changed the wrong marker). Both are corrected: "Version 1.0.10" and "Correction dans la version 1.0.6".

v1.0.9

Choose a tag to compare

@mcp-tool-shop mcp-tool-shop released this 26 Oct 23:26
ad14035

Fixed

  • A cell epoch, and a server restart when a cell's outer deadline fires. When CELL_DEADLINE_S fires, run_linux_generate_ladder records an unmeasured row and moves on, but the abandoned cell's thread (or its pass workers) can still be inside an /api/generate call; when it returns, the thread carried on with the old cell's loop and sent requests during the next cell, with the old cell's num_ctx, through shared slots, KV and prefill. ensure_parallel returns early on an unchanged slot count and nothing tied a call to a cell. Now LinuxOllamaServer.begin_cell() increments an epoch; a cell's thread and its pass workers carry the epoch they began with; and post/get refuse a call from an older epoch with StaleCell, which is never recorded as a row. When a cell's deadline fires the ladder also restarts the harness's own server (restart_after_deadline) before the next cell, so no in-flight runner request survives, logs a phase marker, and the first row after the restart records settings.server_restarted_after_deadline: true. A normal run restarts nothing. On 1.0.8 the same scenario (a cell that outlives its deadline, then a second cell) accepted three requests from the abandoned cell after the second one began.
  • The big-card projection is an expected wall time, not a worst case. The projection was (1 warmup + repeats) x (ceil(3 x concurrency x t_verify) + 60), so at c8 it refused any cell whose verify call took more than 16.25 s, although a resident 30B-class c8 x 32k cell on an A100-80 or G4 (verify about 16 to 45 s, the Go-side overhead alone about 18.7 s at 32k on 2 vCPUs) finishes four passes in 10 to 22 minutes. It is now (1 + repeats) x (ceil(concurrency x t_verify) + 60): the Go side runs on 2 vCPUs and does not scale with the slots, so concurrency requests take about concurrency verify calls, and the 60 s covers decode. Chosen over a per-card CELL_WALL_S because it keeps one number the same on every card and the projection honest; the safety is elsewhere: each request keeps its 3x timeout (request_timeout_s), and CELL_DEADLINE_S (3600 s) is the real bound on a cell's wall time. GENERATE_LADDER_VERSION stays 4: no measured value changes, only which cells are refused (a T4-shaped c8 cell with a 100 s verify, or a c4 cell with a 250 s verify, is still refused).
  • The TTFT scaling floor compares each cell with the previous measured step. It compared every cell with the first one at its concurrency, so T4 r5 tripped it falsely at c8 2048: the 512 cell is dominated by fixed per-request cost (847.5 ms), and the floor for 2048 was 0.6 x 847.5 x 4 = 2034 ms against a measured 1960 ms. It is now TTFT_SCALING_FLOOR x previous_prefill x (prompt_len / previous_len) from the last measured cell at the same concurrency (a failed or unmeasured cell does not move it), so r5's 847.5, 1255.5, 1960.4 ms all measure (the 2048 floor is 1506.6 ms), while a cached cell after a measured one is still unmeasured with the same reason. The floor stays 0.6.
  • A direct caller is not told the server restarted. With no recover hook (a caller of run_linux_generate_ladder that does not manage a server), a cell deadline's phase marker now says no recover hook, server not restarted, and the next row is not stamped server_restarted_after_deadline (it used to claim a restart that did not happen).
  • The epoch advances at the restart, not only at the next cell. restart_after_deadline() increments the epoch before stopping the server, so a call from the abandoned cell made after the restart and before the next begin_cell() is refused (StaleCell) instead of matching the current epoch.
  • The nvidia-smi fallback bounds its answer. used must be at least 0, total over 0 and finite, and used at most total (20000, 15360 and -0.5, 15360 are unmeasured); more than one non-empty output line is unmeasured too (a multi-GPU answer is a reading of some other card). 0, 81920 and 15360, 15360 are still accepted.
  • The first VRAM sample of a window or batch cell has a deadline, as the generate cell's does (it was protected inside run_linux_spec, not when the function was called directly). Only the deadline is added: a sampler that raises still propagates as it did (a lost run keeps the cells it finished), where the generate cell turns it into a sampler_error row.
  • The nvidia-smi fallback parse is strict: exactly two columns, used >= 0, total > 0, and inf/nan and overflow are caught. Anything else is unmeasured with the text it got.

Docs

  • The handbook's experiments page notes the server restart when a cell's deadline fires, and that the projection is an expected wall time.

v1.0.8

Choose a tag to compare

@mcp-tool-shop mcp-tool-shop released this 26 Oct 21:05
4eb1488

Fixed

  • A per-cell wall cap. request_timeout_s is clamped to 120 to 900 s per request, so a slow, fully resident c4 or c8 cell could take four passes of 900 s (an hour) plus up to six calibration calls, and a few such cells in a 3-quant window on an 80 or 96 GB card could pass Colab's roughly 4 h VM-loss line. A cell now has CELL_WALL_S = 1800 (settings.cell_wall_s on every generate-ladder row). After calibration, a cell whose projected wall, (1 warmup + repeats) x (ceil(3 x concurrency x t_verify_s) + 60) from the real unclamped estimate, is over the cap is refused before any timed pass and recorded as timeout (projected N s > cell wall 1800 s; not run). CELL_DEADLINE_S (2 x the cap) is the outer bound over the whole cell: whatever call is blocked, the cell ends as an unmeasured row and the ladder carries on. The harness cannot see the window's wall; the launcher's wall stays the outer bound of the window.
  • CALIBRATION_TIMEOUT_S is 300 s (was 900). A calibration call is a single request with a one-token reply. The slowest fully resident one on record is T4 r3's p16384 verify at 25.1 s (Ollama's Go side costs about 0.57 ms per prompt token on 2 vCPUs, so p32768 projects to about 70 s); the rig's 33k prefill takes 3.7 s. 300 s is more than four times the slowest projection, and a stuck cell's calibration is now bounded at 30 minutes instead of 90.
  • The T4 r4 hang: a VRAM sample has a deadline. After the c4 16k cell's host-RAM oom row the run sent nothing for 56 minutes and its run record stayed closed: false; the likely place is the NVML sample at the start of the next cell, which has no timeout of its own and ran just after the kernel's OOM killer took a CUDA process (not proven; the r4 run printed no per-phase marker). Every VRAM sample now runs on a daemon thread with SAMPLER_TIMEOUT_S = 30; on expiry the cell is unmeasured (VRAM sampler did not answer within 30 s) and the ladder continues, so a wedged NVML costs 30 s a cell, not the window. A sampler that fails (rather than hangs) is still a sampler_error; the first sample of a cell used to propagate its exception raw and now follows the same rule.
  • After the first NVML timeout the run samples through nvidia-smi. An NVML call abandoned on a daemon thread can leave pynvml wedged inside the process, so every later cell could wait out the 30 s deadline again for the rest of the run. The run's sampler (GuardedSampler, one per run) now switches, after its first timeout, to nvidia-smi --query-gpu=memory.used,memory.total run as a subprocess with a NVIDIA_SMI_TIMEOUT_S = 10 timeout: a hung nvidia-smi is killed, so a wedged driver costs at most 10 s a sample and cannot pin the process. If nvidia-smi is missing, fails, answers nonsense or times out, the cell is unmeasured with the real reason and the ladder continues. Each generate row records settings.vram_sampler (nvml, nvidia-smi, or nvidia-smi-fallback) and settings.vram_sampler_reason (why the run switched).
  • Phase markers. The harness writes one line per phase to stderr ([interlock HH:MM:SSZ] cell p32768 c4: start, sampling VRAM, each probe and verify sent, calibrated, each pass sent and answered, VRAM sampled, cell end), so the next hang names its own call.
  • No "margin of 0.0 MiB" clause. When Ollama gave the system memory in MiB there is no GiB rounding margin, and the host-RAM reason no longer prints one.

Added

  • A rig-check identity. The Linux ladder only accepted Colab identities, so rig checks of the harness had to pass a placeholder colab:L4 and their rows were labelled as L4 data. RemoteDeviceIdentity.rig(card, vram_mib, driver_version, cuda_version) is provider rig with a free-text card (RTX 5090), pool rig-local, and device rig:RTX5090. Every row built with it carries not_for_import: true. The routing-row schema allows the rig form only with not_for_import: true (a rig: row without it fails validation); Colab identities and rows are unchanged. interlock import refuses a rig row or a rig-provider envelope, naming not_for_import, and route excludes one that reaches a table with the new code rig_check (in the route-decision schema) and never ranks it.

  • route --concurrency N (default 1). A generate row is the pass aggregate across its N requests, so a c8 row and a c1 row answer different questions; before this, route ranked every shape of a model against every other and picked the c8 aggregate for a single caller (T4 r3: p512 c8, decode bound 115.67, where a c1 request gets about 67 tok/s). Generate rows are now ranked and floored only at the requested concurrency (a row with no settings.concurrency, the rig's single-stream harnesses, counts as 1). When no row matches, the refusal names the concurrencies that exist (Rows exist at concurrency 1, 4, 8; none at 2.). The decision, text and --json, records concurrency and ranked_field (decode_tok_s) and says so in notes. Other tasks ignore the flag. --concurrency below 1 (or not a whole number) is rejected at the flag with a usage error, not turned into a table refusal.

Changed

  • The margin is between distinct candidates. A candidate is a device, a model with its revision, and its quant. The margin is the winner's bound against the best row of the best other candidate, never against another shape of the same model (r3's "delta 18.343 over 97.325" was phi's c8 row against phi's own c4 row). With one candidate there is no margin: next_bound, delta and next_id are null and notes says no other candidate.
  • Fill-card rows never rank in generate. A fill-card row (max_resident_ctx, or the fill-card spec) is a load probe, not a generate shape. It is listed under excluded with the new code fill_card and takes no part in the ranking or the floors. The route-decision schema gains the fill_card code and the optional concurrency and ranked_field fields.
  • Another shape of the winner's own candidate is no longer listed under runners_up for generate (it is not an alternative to it), and a refusal gives each measured failure reason once with a count ((x20)) instead of repeating it for every row.
  • The pre-v3 guard is unchanged: a pre-v3 row's concurrency-above-1 throughput and ttft are still never used.

Docs

  • The handbook describes route --concurrency, the fill_card and rig_check exclusions, the per-cell wall cap, the nvidia-smi sampler fallback, the phase markers and the rig-check identity.

v1.0.7

Choose a tag to compare

@mcp-tool-shop mcp-tool-shop released this 26 Oct 17:28
c1d9558

Fixed

T4 rung r3 (the log of its Ollama and the VM's free -m) showed that version 3 labelled some cells wrongly. GENERATE_LADDER_VERSION is now 4. The timeout and unmeasured labels that v3 gave to a partially offloaded cell or to a cell killed for host RAM are superseded by v4's oom (the T4 r3 rows stay as data under their v3 labels). The router guard stays keyed on version 3 (LADDER_MEASURED_FROM): a v3 row's measured ttft and throughput are still valid.

  • A partial offload is oom, found before any timed call. In r3 three cells (p32768 c1, p8192 c4, p4096 c8) loaded 27 to 29 of 33 layers on the GPU with 1.6 to 2.6 GB of KV in host RAM, then ran on the CPU until the 120 s request timeout, and were recorded as timeout because the calibration's verify call timed out before the residency check ran. The first calibration probe now loads the model at the cell's window and slots and the harness checks it is fully on the GPU: /api/ps size_vram < size, the load's offloaded N/M layers with N < M, or a CPU KV buffer size line. Any one of them raises oom with the evidence in the reason (partial offload at num_ctx 34816 x 4 slots: 28/33 layers on the GPU, 2040 MiB of KV in host RAM, size_vram ... < size ...; only what was read is named), before the second probe, the verify calls or any timed call, and the row records settings.offload (layers, host KV, sizes, and where each was read). The log is read by LinuxOllamaServer.load_report() / parse_load_report from the process's part of the server log (latest load; every value is None when absent), and an older server without the method still works.
  • A SIGKILL during a load is oom (host RAM) only on the log's numbers. In r3 five cells logged 14 to 95 GB of host KV on a VM with 12,975 MiB of RAM and no swap, then llama-server process has terminated: signal: killed, recorded as unmeasured. When a call fails with signal: killed, the harness reads the same load report; if CPU KV + CPU_Mapped weights is greater than Ollama's system memory total it records oom (host RAM: the load needed X MiB in host RAM (CPU KV K + mapped weights W); the VM has Y MiB (Ollama system memory)). With no numbers, or numbers that fit, it stays unmeasured with Ollama's message: host RAM is never inferred without them.
  • The request timeout is scaled from the cell's own verify call and recorded. Every call used a fixed 120 s timeout. Calibration calls now get CALIBRATION_TIMEOUT_S = 900 (single requests). Timed calls get clamp(ceil(3 x concurrency x t_verify_s) + 60, 120, 900) (REQUEST_TIMEOUT_FACTOR, REQUEST_TIMEOUT_DECODE_ALLOWANCE_S, REQUEST_TIMEOUT_FLOOR_S, REQUEST_TIMEOUT_CEILING_S), where t_verify_s is the accepted verify call's (total_duration - load_duration). On 2 vCPUs Ollama's Go side costs about 0.57 ms per prompt token at c8, so a fully resident c8 cell at a big card's 32k could pass 120 s and be wrongly marked unable. settings.request_timeout_s is on every generate-ladder row, measured or failed (LinuxOllamaServer.post takes a timeout), and a timeout row reads did not finish within X s (scaled from a T s verify call at concurrency C).
  • Host RAM needs all three numbers and the rounding margin. The oom (host RAM) reading requires the CPU KV, the CPU_Mapped weights and the system-memory total to have all been read (a missing one makes the cell unmeasured, and the reason never prints a value that was not read; it used to count missing mapped weights as 0). Ollama prints the total in GiB to one decimal, so the host buffers must exceed the total by 51.2 MiB (half of 0.1 GiB), and the reason states the margin.
  • A cell reads only its own load from the server log. The log offset is snapshotted at the start of every cell (LinuxOllamaServer.begin_cell), not only when the server restarts, and a system memory line with no load_tensors block after it is a load that was killed before its block, so it has no layers or buffers (it used to inherit the previous load's block and could be called host RAM with another cell's numbers).
  • A missing total_duration or eval_duration is unmeasured. v3 fell back to load + prefill + decode, which hides the queue wait and the overhead and would bring back the concurrency inflation. The verify call's total_duration is required too.
  • route --max-ttft-ms no longer refuses on rows that have no measured ttft. The unversioned fill-card rows (prefix_caching unset) made _ttft_refusal answer prefix_caching_unknown even beside v3 generate rows (reproduced in r3). When at least one row has a measured ttft, the rows without one are dropped before the comparison, and notes says how many.

Changed

  • A failure row records the window that was sent, as a measured row does. settings.num_ctx is the num_ctx the request sent and settings.cell_tokens the nominal cell, on every failure path of the generate ladder (oom from a partial offload or host RAM, timeout, unmeasured, load_refused, ctx_exceeded); an oom row's num_ctx now equals the window its own reason names (it used to say the nominal 16384 beside a reason that said 16903 was sent). A failure before any request was sent (a pre-registered refusal, a failure outside the measurement) never had a window: it keeps the nominal size in num_ctx, and settings.num_ctx_source says nominal: no request was sent (it is sent otherwise).
  • _ttft_does_not_scale names the prefill, not the ttft, in its parameter and message (it has read prefill_ms since v3).
  • tests/fake_ollama.py now reports a partial offload (/api/ps, and the offloaded N/M layers and CPU KV buffer size log lines), simulates the SIGKILL when host buffers exceed the VM's RAM, raises TimeoutError past the timeout a call was sent with, and gives a slow fully resident cell. The parser tests read lines from T4 r3's own log (tests/fixtures/ollama_logs/0.40.11/).

Docs

  • The handbook's experiments page describes ladder version 4: partial offload and host-RAM oom found before any timed call, the scaled request timeout (settings.request_timeout_s), and the window every failure row records.

v1.0.6

Choose a tag to compare

@mcp-tool-shop mcp-tool-shop released this 26 Oct 14:06
37eafad

Fixed

T4 rung r2 showed three defects in the generate ladder (GENERATE_LADDER_VERSION 2 and 1). All three are in Ollama v0.40.11's source and in r2's llama-server log.

  • The prompt could overshoot its window, and 16k and 32k came back unmeasured. The window was target + num_predict + 64, the calibration accepted a prompt within 2% of the target and landed about 1.2% high, so at 16k and 32k the prompt reached num_ctx - 1 and Ollama truncated it to about half (limit=8290 prompt=16577). The window is now target + 2% + num_predict + 64, the largest prompt the tolerance accepts, so nothing the calibration accepts can reach the truncation line. A verify reading that shows truncation while the prompt is above its estimate is cut back and tried again, up to four verify calls. settings.num_ctx is what the request sent; settings.cell_tokens is the nominal cell.
  • Every ttft in the ladder was a prompt-cache hit, not a prefill. Ollama sets cache_prompt: true on every completion with no per-request switch, llama-server reuses the longest common token prefix, and the ladder resent one identical prompt for the verify call, the warmup and every repeat, so each timed pass evaluated about one token (15 ms at 512 tokens and 33 ms at 8,287 on a T4). prompt_eval_count still reported the full length, so the row looked right. Every timed call now starts with a prefix of its own (the call number and a per-cell nonce, from the first character), the calibration includes the prefix, and the verify call has its own. Two guards turn a cached cell into unmeasured: a prefill faster than 250,000 tok/s (PREFILL_TOK_S_CEILING), and, within a concurrency, a longer cell whose ttft is under 60% of the proportional growth from the first measured cell (TTFT_SCALING_FLOOR). Rows record prefix_caching: off.
  • The concurrency cells ran through one slot, and their throughput read about the concurrency times too high. OLLAMA_NUM_PARALLEL defaults to 1, so the c4 and c8 requests queued, and the aggregate was sum(eval_count) / max(eval_duration), where each request's own eval_duration leaves out the queue wait. The harness's Ollama now runs exactly concurrency slots (it restarts to change the count, and the ladder loops concurrency outermost so each count is set once; exact, not a floor, because KV memory is num_ctx times the slots). The slot count is read from llama-server's n_slots in the server log and recorded with its source (parallel_slots, parallel_slots_source); a server that logged fewer slots than the concurrency makes the cell unmeasured. The aggregate decode rate is the generated tokens over the pass's decode window, taken from Ollama's own per-request durations and not the client's clock: from the earliest decode start (total_duration - eval_duration) to the latest end (max total_duration); at one request it is exactly eval_count / eval_duration (throughput_method: ollama_durations_decode_window), and route ranks on it. Between the request and the first token there is time that is neither prefill nor decode (the rig measured 0.11 s at 512 tokens, 1.36 s at 8k, 2.27 s at 16k, non-monotonic), so a client wall clock cannot give a clean decode rate. ttft_ms is now the time to the first token (total_duration - eval_duration - load_duration), which is what --max-ttft-ms floors on; prefill_ms is prompt_eval_duration on its own, and the cache check reads that one; overhead_ms records the rest per row. The tokens over the client's whole pass are end_to_end_tok_s, and the per-request rate is per_request_decode_tok_s. A high-context, high-concurrency cell can honestly fail to load or run out of memory on a small card; it is recorded as that failure.

Changed

  • Each readiness poll of the harness's Ollama has a 2 s timeout inside the ready_timeout_s budget (it was a 30 s urlopen inside a 30 s budget, so one hung request used it all).
  • GENERATE_LADDER_VERSION is 3. The newest-version filter keeps version 1 and 2 rows out of version 3 decisions.
  • route never reads what earlier ladders could not measure. A ttft from a row that did not come from a version 3 ladder is never used for --max-ttft-ms (the floor cannot pass), and the throughput of a row with a concurrency above 1 from before version 3 is never used (it cannot rank or pass a decode floor). route says so in notes ("N pre-v3 row(s) with concurrency > 1 not used", "ttft of N pre-v3 row(s) not used"). table shows ttft: not measured and throughput: not measured on those rows. A decode figure at concurrency 1 is unaffected.
  • Rig harnesses, audited. No row in table/routing.jsonl carries a ttft in its slots or settings, and the rig's generate rows (E3 OpenVINO, E3-REF and E4 Ollama) record end-to-end latency, not a ttft; none has a concurrency above 1. Read, not run: harness/runner.py generate steps repeat one prompt across warmups and repeats, and harness/fill.py resends its prompt in the confirm call after the load call, so a ttft from them would be a cache hit as well; harness/e4b.py takes its figures from the adapter and was not traced further. A row cannot be told which harness made it, so the router reads no ttft from a row without a version 3 stamp, whatever its harness.
  • tests/fake_ollama.py: a fake that caches by longest common prefix, queues unless it has the slots, truncates by contextShiftPromptLimit, and keeps virtual time. The tests for each fix fail against 1.0.5.

Docs

  • README and handbook carry a correction notice: the generate ladder's time to first token and concurrency-above-1 throughput in 1.0.5 and earlier were not valid measures, and interlock no longer uses them. The handbook describes ladder version 3.

v1.0.5

Choose a tag to compare

@mcp-tool-shop mcp-tool-shop released this 26 Oct 08:12
4a85b14

Fixed

  • A looped generation and a request timeout were recorded as load_refused. classify_linux_error sent every error it did not recognise to load_refused (and still did, until this change), so Ollama's "prediction aborted, token repeat limit reached" and a Go-style "HTTP 500 after 2m0s" became rows saying the card refused to load the model (T4 rung r1: 10 phi3.5 cells and 3 ctx-32768 cells). A looped generation is now generation_aborted and a request timeout is timeout (the existing kind; not a new timed_out). load_refused is left for real load and VRAM refusals.
  • The generate ladder's prompt made some models loop, and it timed a shorter prompt than it recorded. Version 1 sent "token " repeated; phi3.5 repeated it until Ollama aborted, so those cells timed a loop, not decode. Version 2 sends varied, deterministic text that ends in an instruction (ladder_prompt). num_ctx is now prompt + num_predict + 64 (it was the prompt length, so Ollama truncated the prompt to about half: prompt_eval_count 1,026 for a "2048" cell), and the word count is calibrated per cell: two small prompts that cannot overflow the window give the tokens-per-word ratio and the instruction's tokens (real Ollama truncates an overflowing prompt to about num_ctx / 2 and reports that, so a reading from an overflowing prompt is never scaled up), then the real prompt is verified against the target within 2%, and a reading well under what the ratio predicts is reported as truncation. The row records the evaluated length (settings.prompt_tokens, prompt_token_method: ollama_prompt_eval_count); a prompt that cannot be brought to the target, or a reply with no prompt_eval_count, is unmeasured, never a row with a length it did not time. Ollama's "the prompt is longer than the context length" refusal (context shift off) is ctx_exceeded. Version 2 has not run on Colab, so this is its definition.
  • load_refused is only for a recognised load or VRAM refusal ("unable to load", "error loading model", "failed to load model", "insufficient memory", "too large for system memory"; checked against Ollama 0.40.9 and 0.40.11). The runner-crash message ("... may be due to resource limitations") and "failed to load manifest" are unmeasured. Any other unrecognised error is unmeasured. The oom match is a word ("room" and "bloom" no longer match).

Added

  • generation_aborted, a failure kind for a cell that was not measured. It sits beside sampler_error: it says nothing about what the card can load, so a spec cannot pre-register it, the receipt reads it as untimed and never as a speed or a capability, and the router lists it under excluded and never ranks it. It is in the routing-row and route-decision schemas.
  • The table copy of every unmeasured row (sampler_error, generation_aborted, unmeasured) no longer says "this device can't do this setting".
  • unmeasured, a second kind for a cell that was not measured, with the same rules as generation_aborted (schemas, receipt, router excluded). It is what an unrecognised error and an un-calibratable prompt become.
  • settings.ladder_version on every generate-ladder row, success or failure (GENERATE_LADDER_VERSION, now 2). A row without the field is version 1 (a Colab generate row; the rig's own harness rows have no version). interlock route considers only the newest version present for a device and model, ranks only within the newest version across devices, and says so in notes ("N older-ladder row(s) not compared", "ranked on ladder version 2 only; version(s) 1 not compared"); a device that has only version 1 still routes when asked for with --device. interlock table groups ladder rows by device, model and version and shows ladder vN. Only ladder cells (rows with a concurrency) carry a version: a fill-card row has none and keeps routing beside v2 rows. The newest-version filter runs right after the task, model and device steps, before any floor (within a device and model, and across devices), so a v1 row cannot win or be listed because a v2 row failed a floor. settings.num_ctx on a ladder row is the nominal prompt length; the request sent prompt + num_predict + 64. settings.prompt_tokens_target is the requested length; a failure row that has only a request says prompt_token_method: requested_not_verified. The legacy envelope importer keeps ladder_version, prompt_tokens_target and prompt_token_method.

Docs

  • README and handbook describe the unmeasured kinds (generation_aborted, unmeasured), generate ladder version 2 and its calibrated prompt length, and ranking within the newest ladder_version.
  • test_a_floored_v1_row_on_another_device_is_not_a_runner_up_beside_a_v2_winner: the L4 v1 row is at 90 tok/s, under the 100 floor, so it is actually floored.

v1.0.4

Choose a tag to compare

@mcp-tool-shop mcp-tool-shop released this 26 Oct 03:37
a8fef21

Fixed

  • The wheel now carries the model family table. interlock.families read table/model-families.json relative to the source tree (parents[2]), which is not in the wheel, so family_of and stamp_family raised FamilyError on every installed copy (1.0.3 and earlier). The file ships as package data (interlock/data/model-families.json, a hatch force-include) and is read through importlib.resources; a source checkout still reads table/.
  • families_path() raises FamilyError naming both places it tried (the packaged copy and table/) when neither exists.

Added

  • tests/test_packaging.py: the wheel's copy is byte-equal to table/model-families.json; a wheel installed into a clean venv, run from outside the repository with -I, answers family_of and stamp_family (it runs on every CI Python leg and fails on 1.0.3 with FamilyError); a sweep fails on any __file__-relative read that climbs out of the package in a module with no importlib.resources packaged copy; every workflow action is pinned by commit SHA with a version comment (the SLSA generator is a reusable workflow that must be called by tag).
  • The __file__ sweep names its exceptions exactly, as (file, line) pairs, and fails if a listed line stops escaping. It also flags os.path.dirname(__file__), parents[<variable>], / ".." climbs and a bound path climbed later; each form has a planted example.
  • The clean-venv wheel test also runs run_linux_throughput_ladder with a stub backend, so the packaged throughput inputs are exercised from the wheel; it installs the wheel with its dependencies.

Changed

  • CI actions moved to current majors, SHA-pinned (setup-uv v10.3.2, setup-node v7.1.0, upload-pages-artifact v5.0.0, deploy-pages v5.0.1; read 2026-10-25).

v1.0.3

Choose a tag to compare

@mcp-tool-shop mcp-tool-shop released this 26 Oct 00:59
132aa3c

Changed

  • Python: requires-python is >=3.13 (was >=3.12,<3.13). 3.13 is what Colab's default image runs, so outside users there can now install interlock; 3.14 and 3.15 are supported, 3.15 is the main target (.python-version). Python 3.12 is dropped. The rig's own switchyard environment is on 3.12 and has to move (to 3.14 for the NPU lane, see the intel extra below).
  • On 3.15 PyYAML 6.0.3 installs from its source distribution, because it publishes no cp315 wheel yet. Measured on Windows with uv: it installs and builds pure Python (yaml.__with_libyaml__ is False, no C extension), and the full suite passes (see the PR).
  • The intel extra's openvino, openvino-tokenizers and openvino-genai carry the environment marker python_version < "3.15": OpenVINO 2026.4.1 has cp313 and cp314 wheels and none for 3.15 (PyPI, read 2026-10-25). On 3.15 the extra installs transformers but no OpenVINO; the Intel lane needs 3.13 or 3.14.
  • On Python 3.15, where the intel extra installs no OpenVINO, a run that needs it says "the Intel extra needs Python 3.13 or 3.14 (OpenVINO has no 3.15 wheels yet)" instead of "not installed"; the openvino-genai step message does the same.
  • uv.lock is regenerated for the new range with no version changes.
  • CI: the required check test now runs on Python 3.15 (lint, tests with the 90% coverage floor, the audit, the Atlas check, the Codecov upload, the wheel install). Two more jobs, test-py313 and test-py314, run lint, the tests and the wheel install; the fuzz step runs on test-py314, because atheris has no cp315 wheel yet (it carries a python_version < "3.15" marker). release.yml builds on 3.15.

v1.0.2

Choose a tag to compare

@mcp-tool-shop mcp-tool-shop released this 25 Oct 19:33
04c4b11

Added

  • interlock import --remote-window <file> takes the routing-row JSONL that interlock run writes on Linux (one row per line, or one row object) as well as the {run_id, date, remote_device, records} envelope. The rows keep their provenance, settings and notes as written. A row that is not a colab: device, or is descriptive or aborted, or has a missing or malformed id or model, or fails the schema, is refused with the file name and the row (file[1]); a line that is not JSON is refused with the file and line (file:2).
  • With --remote-window and no --offers, the window rows are merged into the existing table/routing.jsonl: duplicates are refused (duplicate row id ...), the table is sorted by id and replaced atomically. import_receipts is not called, so no sibling repo is needed.
  • interlock import --allow-shrink: lets a full rebuild drop the rows it owns but no longer produces. Every dropped id is printed and written to table/import-dropped.txt before the table is written.
  • interlock run --no-watchdog: runs a 5090 step with no VRAM watchdog heartbeat. It is never implied by an unset variable. The choice is written into the receipt's notes (and the watchdog field of an E4b pilot document), and the empty-card check still runs.
  • Three paths are now settings, each read from an environment variable, then from [paths] in interlock.toml in the working directory, and recorded as given: INTERLOCK_SCRATCH_ROOT / scratch_root (offrig's scratch project, default interlock-scratch under the system temp directory), INTERLOCK_WEIGHTS_HOT / weights_hot (the cache an hf_cache: hot arm reads, default hot/ under HF_HOME or the user's Hugging Face cache) and WATCHDOG_HEARTBEAT / heartbeat (the heartbeat file, no default). A malformed interlock.toml is a structured error.
  • A test (tests/test_portable_defaults.py) scans src/ for drive-letter, /home/ and /Users/ paths and fails on any. Its allow-list is empty.

Changed

  • A full interlock import rebuild replaces only the rows its own sources produce (the pinned imports and the E1 rerun) and leaves every other row in table/routing.jsonl as it is (E2-E4, remote windows, any other harness row). A rebuild that no longer produces a row it owns is refused (exit 1, the first missing ids, the table untouched) unless --allow-shrink is passed.
  • A table that holds a duplicate row id is refused, naming the ids, by both the rebuild and the --remote-window merge.
  • A missing or unreadable file, a non-UTF-8 table, or a bad JSON file in interlock import is a message on stderr and exit 1, not a traceback.
  • A full rebuild reads candidates.json and renders gaps.md before it writes anything, then replaces import-dropped.txt, routing.jsonl and gaps.md atomically; a missing or invalid candidates.json exits 1 with the table and import-dropped.txt byte-identical.
  • The full interlock import rebuild reads its three source repositories from configuration: --source rnd|npu|aspire=<path> (repeatable) or [import.sources] in <root>/interlock.toml; the flag wins. There is no default path in interlock.importers. Each source's pinned commit is unchanged and require_pin still runs; a clone that lacks it is refused, naming the commit. Each source's name, pin and path (as given) are written at the end of table/gaps.md, not into any row.
  • With a source missing, the rebuild exits 1 naming each missing source, its pinned commit, and the flag and key that set it. --remote-window alone (the merge) needs no source.
  • The NPU pin's comment names the rnd tag data/npu-buildout-275e511.
  • With WATCHDOG_HEARTBEAT (or [paths] heartbeat) unset, a run that uses the 5090 refuses before any device is touched, with a message that names WATCHDOG_HEARTBEAT and --no-watchdog. The same holds for the E4b block and pilot, and for an Ollama restart between steps. Before, an unset variable fell back to a heartbeat file at a fixed path on the author's rig.
  • The --dry-run line for an hf_cache: hot arm names the setting instead of a drive path.
  • A key under [paths] in interlock.toml that interlock does not know is refused, naming the valid keys, like [import.sources].
  • --no-watchdog is also written into the header of an E4b block receipt (finished or aborted), and into a fill-card receipt row written when its preflight fails.
  • heartbeat_age_s(None, now) is infinity (stale) instead of an error, so scripts/relay_s1.py refuses with WATCHDOG_HEARTBEAT unset instead of crashing.
  • A heartbeat that is unset or has no file is refused with REFUSED: no watchdog heartbeat: set WATCHDOG_HEARTBEAT (or [paths] heartbeat) to the watchdog's heartbeat file, or pass --no-watchdog if you run no watchdog, in the guard and in scripts/relay_s1.py; the old "missing old" wording is gone.

Removed

  • The constants SCRATCH_ROOT, HEARTBEAT_DEFAULT, HOT_ROOT and ARCHIVE_ROOT, which held paths on the author's rig. ARCHIVE_ROOT had no callers.

Fixed

  • A VRAM sampler (or nvidia-smi) that fails after a cell's model call is now a sampler_error row, where it was written as load_refused (a claim that the card cannot load the quant). sampler_error is an untimed outcome that is not a capability outcome: it validates against the routing-row and route-decision schemas, is not a speed row, is listed under excluded by interlock route with the code sampler_error and no "measured failure reason", keeps its note unchanged in the table copy, and imports from a window receipt. A fill-card cell stops at it and does not bisect to a ceiling. A spec still cannot pre-register it.