Repository navigation
Releases
interlock 1.0.11
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-serverSIGKILL (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'sllama_kv_cache: sizeby the requestednum_ctxtimes the slots (req_total; llama's paddedn_ctxis 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.maxwhen that is readable, a number and lower (bound_bysays 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, fromtests/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;offruns 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 structuredhost_ram_safety_invaliderror, a hint and a non-zero exit). They are defined incli.py, checked inharness/runner.pybefore any device contact, and handed torun_linux_spec.settings.host_ram_projection, one dict on every generate-ladder row. A projected cell recordsmode,decision(alloworrefuse),factor,limit_mib,bound_by, the source load (source_load, its requestednum_ctxand 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, withsettings.failure_reasonstartingprojected host RAM:and every number. It sends no request and restarts nothing, and carries nopeak_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'shost RAM: the load needed ...wording, so the two cannot be mistaken for each other. parse_load_reportreturns three more keys,n_ctx,kv_total_mib(thellama_kv_cache: sizeline, absent from a killed load) andgpu_kv_mib(theCUDA<n> KV buffer sizelines; 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_VERSIONstays 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 withsettings.host_ram_projectionare 1.0.11 rows; the router does not read it.
Limits
- False refusals are possible in the band between
limit / factorandlimit: 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: anyprojected 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=90inpyproject.toml).
v1.0.10
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_FLOORand_ttft_does_not_scaleare deleted (the recorded spread below replaces them as the diagnostic).
Added
- The noise is recorded, not gated. Every measured generate row's
settingsgainsprefill_ms_passes(the repeat passes' prefill, in order, without the warm-up) andprefill_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, gainssettings.ttft_floor: "off", so a reader can tell 1.0.10 rows from 1.0.9 rows (which have no field). GENERATE_LADDER_VERSIONstays 4. Nothing measured changes, only which cells are labelledunmeasured, 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 onttft_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
Fixed
- A cell epoch, and a server restart when a cell's outer deadline fires. When
CELL_DEADLINE_Sfires,run_linux_generate_ladderrecords anunmeasuredrow and moves on, but the abandoned cell's thread (or its pass workers) can still be inside an/api/generatecall; when it returns, the thread carried on with the old cell's loop and sent requests during the next cell, with the old cell'snum_ctx, through shared slots, KV and prefill.ensure_parallelreturns early on an unchanged slot count and nothing tied a call to a cell. NowLinuxOllamaServer.begin_cell()increments an epoch; a cell's thread and its pass workers carry the epoch they began with; andpost/getrefuse a call from an older epoch withStaleCell, 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 recordssettings.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, soconcurrencyrequests take aboutconcurrencyverify calls, and the 60 s covers decode. Chosen over a per-cardCELL_WALL_Sbecause 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), andCELL_DEADLINE_S(3600 s) is the real bound on a cell's wall time.GENERATE_LADDER_VERSIONstays 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 stillunmeasuredwith the same reason. The floor stays 0.6. - A direct caller is not told the server restarted. With no
recoverhook (a caller ofrun_linux_generate_ladderthat does not manage a server), a cell deadline's phase marker now saysno recover hook, server not restarted, and the next row is not stampedserver_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 nextbegin_cell()is refused (StaleCell) instead of matching the current epoch. - The
nvidia-smifallback bounds its answer.usedmust be at least 0,totalover 0 and finite, andusedat mosttotal(20000, 15360and-0.5, 15360areunmeasured); more than one non-empty output line isunmeasuredtoo (a multi-GPU answer is a reading of some other card).0, 81920and15360, 15360are 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 asampler_errorrow. - The
nvidia-smifallback parse is strict: exactly two columns,used >= 0,total > 0, andinf/nanand overflow are caught. Anything else isunmeasuredwith 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
Fixed
- A per-cell wall cap.
request_timeout_sis 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 hasCELL_WALL_S = 1800(settings.cell_wall_son 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 astimeout(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 anunmeasuredrow 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_Sis 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
oomrow the run sent nothing for 56 minutes and its run record stayedclosed: 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 withSAMPLER_TIMEOUT_S = 30; on expiry the cell isunmeasured(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 asampler_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, tonvidia-smi --query-gpu=memory.used,memory.totalrun as a subprocess with aNVIDIA_SMI_TIMEOUT_S = 10timeout: a hungnvidia-smiis killed, so a wedged driver costs at most 10 s a sample and cannot pin the process. Ifnvidia-smiis missing, fails, answers nonsense or times out, the cell isunmeasuredwith the real reason and the ladder continues. Each generate row recordssettings.vram_sampler(nvml,nvidia-smi, ornvidia-smi-fallback) andsettings.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:L4and their rows were labelled as L4 data.RemoteDeviceIdentity.rig(card, vram_mib, driver_version, cuda_version)is providerrigwith a free-text card (RTX 5090), poolrig-local, and devicerig:RTX5090. Every row built with it carriesnot_for_import: true. The routing-row schema allows the rig form only withnot_for_import: true(arig:row without it fails validation); Colab identities and rows are unchanged.interlock importrefuses a rig row or a rig-provider envelope, namingnot_for_import, androuteexcludes one that reaches a table with the new coderig_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,routeranked 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 nosettings.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, recordsconcurrencyandranked_field(decode_tok_s) and says so innotes. Other tasks ignore the flag.--concurrencybelow 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,deltaandnext_idare null andnotessaysno 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 underexcludedwith the new codefill_cardand takes no part in the ranking or the floors. The route-decision schema gains thefill_cardcode and the optionalconcurrencyandranked_fieldfields. - Another shape of the winner's own candidate is no longer listed under
runners_upfor 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, thefill_cardandrig_checkexclusions, the per-cell wall cap, thenvidia-smisampler fallback, the phase markers and the rig-check identity.
v1.0.7
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 astimeoutbecause 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/pssize_vram < size, the load'soffloaded N/M layerswith N < M, or aCPU KV buffer sizeline. Any one of them raisesoomwith 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 recordssettings.offload(layers, host KV, sizes, and where each was read). The log is read byLinuxOllamaServer.load_report()/parse_load_reportfrom the process's part of the server log (latest load; every value isNonewhen 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, thenllama-server process has terminated: signal: killed, recorded asunmeasured. When a call fails withsignal: killed, the harness reads the same load report; ifCPU KV + CPU_Mapped weightsis greater than Ollama'ssystem memorytotal it recordsoom(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 staysunmeasuredwith 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 getclamp(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), wheret_verify_sis 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_sis on every generate-ladder row, measured or failed (LinuxOllamaServer.posttakes atimeout), and atimeoutrow readsdid 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 cellunmeasured, 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 asystem memoryline with noload_tensorsblock 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_durationoreval_durationisunmeasured. 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'stotal_durationis required too. route --max-ttft-msno longer refuses on rows that have no measured ttft. The unversioned fill-card rows (prefix_cachingunset) made_ttft_refusalanswerprefix_caching_unknowneven 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, andnotessays how many.
Changed
- A failure row records the window that was sent, as a measured row does.
settings.num_ctxis thenum_ctxthe request sent andsettings.cell_tokensthe nominal cell, on every failure path of the generate ladder (oomfrom a partial offload or host RAM,timeout,unmeasured,load_refused,ctx_exceeded); anoomrow'snum_ctxnow 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 innum_ctx, andsettings.num_ctx_sourcesaysnominal: no request was sent(it issentotherwise). _ttft_does_not_scalenames the prefill, not the ttft, in its parameter and message (it has readprefill_mssince v3).tests/fake_ollama.pynow reports a partial offload (/api/ps, and theoffloaded N/M layersandCPU KV buffer sizelog lines), simulates the SIGKILL when host buffers exceed the VM's RAM, raisesTimeoutErrorpast 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
oomfound before any timed call, the scaled request timeout (settings.request_timeout_s), and the window every failure row records.
v1.0.6
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 reachednum_ctx - 1and Ollama truncated it to about half (limit=8290 prompt=16577). The window is nowtarget + 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_ctxis what the request sent;settings.cell_tokensis the nominal cell. - Every ttft in the ladder was a prompt-cache hit, not a prefill. Ollama sets
cache_prompt: trueon 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_countstill 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 intounmeasured: 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 recordprefix_caching: off. - The concurrency cells ran through one slot, and their throughput read about the concurrency times too high.
OLLAMA_NUM_PARALLELdefaults to 1, so the c4 and c8 requests queued, and the aggregate wassum(eval_count) / max(eval_duration), where each request's owneval_durationleaves out the queue wait. The harness's Ollama now runs exactlyconcurrencyslots (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 isnum_ctxtimes the slots). The slot count is read from llama-server'sn_slotsin the server log and recorded with its source (parallel_slots,parallel_slots_source); a server that logged fewer slots than the concurrency makes the cellunmeasured. 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 exactlyeval_count / eval_duration(throughput_method: ollama_durations_decode_window), androuteranks 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_msis now the time to the first token (total_duration - eval_duration - load_duration), which is what--max-ttft-msfloors on;prefill_msisprompt_eval_durationon its own, and the cache check reads that one;overhead_msrecords the rest per row. The tokens over the client's whole pass areend_to_end_tok_s, and the per-request rate isper_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_sbudget (it was a 30 surlopeninside a 30 s budget, so one hung request used it all). GENERATE_LADDER_VERSIONis 3. The newest-version filter keeps version 1 and 2 rows out of version 3 decisions.routenever 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).routesays so innotes("N pre-v3 row(s) with concurrency > 1 not used", "ttft of N pre-v3 row(s) not used").tableshowsttft: not measuredandthroughput: not measuredon those rows. A decode figure at concurrency 1 is unaffected.- Rig harnesses, audited. No row in
table/routing.jsonlcarries 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.pygenerate steps repeat one prompt across warmups and repeats, andharness/fill.pyresends its prompt in the confirm call after the load call, so a ttft from them would be a cache hit as well;harness/e4b.pytakes 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 bycontextShiftPromptLimit, 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
Fixed
- A looped generation and a request timeout were recorded as
load_refused.classify_linux_errorsent every error it did not recognise toload_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 nowgeneration_abortedand a request timeout istimeout(the existing kind; not a newtimed_out).load_refusedis 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_ctxis now prompt +num_predict+ 64 (it was the prompt length, so Ollama truncated the prompt to about half:prompt_eval_count1,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 aboutnum_ctx / 2and 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 noprompt_eval_count, isunmeasured, never a row with a length it did not time. Ollama's "the prompt is longer than the context length" refusal (context shift off) isctx_exceeded. Version 2 has not run on Colab, so this is its definition. load_refusedis 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" areunmeasured. Any other unrecognised error isunmeasured. Theoommatch is a word ("room"and"bloom"no longer match).
Added
generation_aborted, a failure kind for a cell that was not measured. It sits besidesampler_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 underexcludedand 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 asgeneration_aborted(schemas, receipt, routerexcluded). It is what an unrecognised error and an un-calibratable prompt become.settings.ladder_versionon 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 routeconsiders only the newest version present for a device and model, ranks only within the newest version across devices, and says so innotes("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 tablegroups ladder rows by device, model and version and showsladder vN. Only ladder cells (rows with aconcurrency) 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_ctxon a ladder row is the nominal prompt length; the request sent prompt +num_predict+ 64.settings.prompt_tokens_targetis the requested length; a failure row that has only a request saysprompt_token_method: requested_not_verified. The legacy envelope importer keepsladder_version,prompt_tokens_targetandprompt_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 newestladder_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
Fixed
- The wheel now carries the model family table.
interlock.familiesreadtable/model-families.jsonrelative to the source tree (parents[2]), which is not in the wheel, sofamily_ofandstamp_familyraisedFamilyErroron 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 throughimportlib.resources; a source checkout still readstable/. families_path()raisesFamilyErrornaming both places it tried (the packaged copy andtable/) when neither exists.
Added
tests/test_packaging.py: the wheel's copy is byte-equal totable/model-families.json; a wheel installed into a clean venv, run from outside the repository with-I, answersfamily_ofandstamp_family(it runs on every CI Python leg and fails on 1.0.3 withFamilyError); a sweep fails on any__file__-relative read that climbs out of the package in a module with noimportlib.resourcespackaged 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 flagsos.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_ladderwith 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
Changed
- Python:
requires-pythonis>=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 theintelextra 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__isFalse, no C extension), and the full suite passes (see the PR). - The
intelextra'sopenvino,openvino-tokenizersandopenvino-genaicarry the environment markerpython_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 installstransformersbut no OpenVINO; the Intel lane needs 3.13 or 3.14. - On Python 3.15, where the
intelextra 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"; theopenvino-genaistep message does the same. uv.lockis regenerated for the new range with no version changes.- CI: the required check
testnow 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-py313andtest-py314, run lint, the tests and the wheel install; the fuzz step runs ontest-py314, because atheris has no cp315 wheel yet (it carries apython_version < "3.15"marker).release.ymlbuilds on 3.15.
v1.0.2
Added
interlock import --remote-window <file>takes the routing-row JSONL thatinterlock runwrites on Linux (one row per line, or one row object) as well as the{run_id, date, remote_device, records}envelope. The rows keep theirprovenance,settingsandnotesas written. A row that is not acolab:device, or isdescriptiveoraborted, or has a missing or malformedidormodel, 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-windowand no--offers, the window rows are merged into the existingtable/routing.jsonl: duplicates are refused (duplicate row id ...), the table is sorted by id and replaced atomically.import_receiptsis 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 totable/import-dropped.txtbefore 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'snotes(and thewatchdogfield 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]ininterlock.tomlin the working directory, and recorded as given:INTERLOCK_SCRATCH_ROOT/scratch_root(offrig's scratch project, defaultinterlock-scratchunder the system temp directory),INTERLOCK_WEIGHTS_HOT/weights_hot(the cache anhf_cache: hotarm reads, defaulthot/underHF_HOMEor the user's Hugging Face cache) andWATCHDOG_HEARTBEAT/heartbeat(the heartbeat file, no default). A malformedinterlock.tomlis a structured error. - A test (
tests/test_portable_defaults.py) scanssrc/for drive-letter,/home/and/Users/paths and fails on any. Its allow-list is empty.
Changed
- A full
interlock importrebuild replaces only the rows its own sources produce (the pinned imports and the E1 rerun) and leaves every other row intable/routing.jsonlas 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-shrinkis passed. - A table that holds a duplicate row id is refused, naming the ids, by both the rebuild and the
--remote-windowmerge. - A missing or unreadable file, a non-UTF-8 table, or a bad JSON file in
interlock importis a message on stderr and exit 1, not a traceback. - A full rebuild reads
candidates.jsonand rendersgaps.mdbefore it writes anything, then replacesimport-dropped.txt,routing.jsonlandgaps.mdatomically; a missing or invalidcandidates.jsonexits 1 with the table andimport-dropped.txtbyte-identical. - The full
interlock importrebuild 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 ininterlock.importers. Each source's pinned commit is unchanged andrequire_pinstill 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 oftable/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-windowalone (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 namesWATCHDOG_HEARTBEATand--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-runline for anhf_cache: hotarm names the setting instead of a drive path. - A key under
[paths]ininterlock.tomlthat interlock does not know is refused, naming the valid keys, like[import.sources]. --no-watchdogis 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, soscripts/relay_s1.pyrefuses withWATCHDOG_HEARTBEATunset 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 inscripts/relay_s1.py; the old "missing old" wording is gone.
Removed
- The constants
SCRATCH_ROOT,HEARTBEAT_DEFAULT,HOT_ROOTandARCHIVE_ROOT, which held paths on the author's rig.ARCHIVE_ROOThad no callers.
Fixed
- A VRAM sampler (or nvidia-smi) that fails after a cell's model call is now a
sampler_errorrow, where it was written asload_refused(a claim that the card cannot load the quant).sampler_erroris 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 underexcludedbyinterlock routewith the codesampler_errorand 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.