Repository navigation
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.