Three v5 runs, each capped at 130,000 tokens (near the full 131,072 served slot). All three finished with review, module and tests. However, none of them runs as filed.
Retrieval is perfect: thirty hits in thirty tries across the ten context-depth rungs. Prefill decays smoothly from 1011 to 465 tok/s as the window fills, and so does decode, from 57.5 to 42.8 tok/s; no cliff or flat-lining of either pp or tg at the edge.
Decode at 57.9 tok/s sits about 4% under the card’s own recorded 60.5 tok/s for this profile, so nothing regressed on this box. It also trails every CUDA-side row on the board, which measure 74.9 to 151 tok/s. Read the rate as this card’s working ceiling.
Methodology, disclosed: the GPU serves other models around the clock, and live traffic interleaved with this benchmark. Runs 1 and 2, plus most of the 10–70 % needle repeats suffered under model-swapping, but this impacts only wall-clock time. The rest of the benchmark parts ran undisturbed by model-swapping.
The catch
The delivered-pipeline gate is 0/3 as filed, with three separate wound shapes:
- run 1
kv_1.ex:25—start_link([{name: name} | opts]): a single-pair brace inside a list is not a keyword list. One line to{:name, name}and the module compiles. - run 2
kv_2.ex:111,117—putstores{:value, expires_at}andgethands the private tag back to the caller; behind it a 2-arityMap.filter/2that raises on the first sweep (:157–161) and:erlang.memory()returned against an integer spec (:150). - run 3
kv_3.ex:70,98,111,133—System.time/1three times andMap.reduce/3once, neither of which exists;stats/1on an unregistered name exits instead of raising theArgumentErrorits own test asserts (:53).
The test files carry their own two: run 2’s suite uses an undefined assigns six times (test_2.exs:12,18,23,30,63,94), and run 3’s helper returns {:ok, pid} to every caller (test_3.exs:5).
After targeted repair, the suites pass 7/7, 9/9 and 14/14. Run 1 is a one-line fix, whereas runs 2 and 3 take a handful of sites each, and run 2’s payload-tag break is semantic rather than cosmetic.
Run 1’s review is the cleanest of the three: eight gap-to-resolution lines, each pinning one decision (signatures, the start_link/2 delegation, TTL units and expiry semantics, timer-driven eviction, validation policy, the memory estimate, O(1) lookups and named instances) with no filler. Run 2 grounds one decision with a search on :erlang.memory/0 before writing. Run 3 repeats its duplicate-start policy across two of its ten lines.
Representative output
Run 1’s TTLStore — the start_link surface and the eviction loop, trimmed. Line 25 is the defect:
defmodule TTLStore do
use GenServer
def start_link(opts) when is_list(opts) do
GenServer.start_link(__MODULE__, opts, registration(opts))
end
def start_link(name, opts) when is_atom(name) and is_list(opts) do
start_link([{name: name} | opts])
end
@impl true
def handle_info(:evict, state) do
now = now_ms()
entries =
state.entries
|> Enum.reject(fn {_key, %{expires_at: exp}} -> now >= exp end)
|> Map.new()
{:noreply, %{state | entries: entries} |> schedule_evict()}
end
defp registration(opts) do
case Keyword.get(opts, :name) do
nil -> []
name when is_atom(name) -> [{:name, name}]
other -> raise ArgumentError, "name must be an atom, got: #{inspect(other)}"
end
end
end
Route
Use it as a long-context general driver and a drafting partner on that GPU. Keep a compile gate between it and any Elixir repo: every run needs a repair pass before it builds, and one of the three runs here contained a real semantic break. The 131072-token context window is the whole window for this GPU’s 16 GB of VRAM, in order to offload only 2 expert layers to system RAM, and thus not drag tg down. The native 262144-tokens context window will be benchmarked separately.