# Method ## 1. Memory need (estimate) `total_gb = weights_gb + kv_gb + overhead_gb` - `weights_gb = params_b × bytes_per_param`, with bytes per parameter Q4 (Q4_K_M) 0.60, Q5 0.71, Q8 1.07, FP16 2.0. Not measured GGUF file sizes. Reference point: a bartowski Llama-3.3-70B Q4_K_M file is 42.52 GB; 70.6 × 0.60 = 42.36 GB. - `kv_gb` = FP16 KV cache at 8,192 tokens: `2 × kv_heads × head_dim × 2 bytes × layers × tokens / 1e9`, adjusted on the site for sliding-window layers (Gemma 2). Architecture values link to each model's `config.json` (`architectureSourceUrl`). - `overhead_gb` = 0.8 GB fixed. ## 2. Usable memory (assumption) - Discrete GPUs: card VRAM − 0.6 GB per GPU. - Apple unified memory: total − macOS reserve (6 GB at ≤16 GB, 7 at ≤24, 8 at ≤36, 10 at ≤64, 12 above). - Laptops whose GPU-addressable memory is not published: `unscored`. No fit or speed is given. ## 3. Fit - `full`: total need ≤ usable memory. - `offload`: discrete-GPU PC where the model fits in usable VRAM + (system RAM − 8 GB). Speed drops sharply. - `no`: does not fit. ## 4. Decode speed (estimate) Decode is treated as memory-bandwidth-bound: `tok/s = 1 / (streamed_gb / effective_bw + 0.0002 s)` with `streamed_gb = weights_gb + kv_gb`. - `effective_bw = spec_bandwidth × utilization × multi_gpu_factor` - Utilization assumptions: NVIDIA 0.78, AMD 0.40, Apple 0.48. Multi-GPU layer split: 0.55 × summed bandwidth. - Offload: GPU part at effective GPU bandwidth, the rest at system-RAM bandwidth × 0.45. These are engineering assumptions, not benchmarks. Real speed depends on runtime, drivers, batch size, context fill, prompt length and quant format. Prompt processing (prefill) speed is not modelled. ## 5. Prices EUR including VAT, one figure per hardware row, labelled by type: `used (median of sold listings)`, `new (lowest in-stock EU)`, `new (out of stock)`, an Apple Store BE price, or an estimate. `price_verified` is true only when a source URL is stored. PC build totals are GPU + a RAM line + a €500 rest-of-system estimate and are not checked system prices. USD = EUR × the stored FX rate and is an estimate. `eur_per_gb_vram = price_eur_incl_vat / memory_gb` for single cards with a price. ## 6. Showdown (measured, CPU only) - llama.cpp b11707 official CPU binary, `llama-server` OpenAI-compatible endpoint, chat template via `--jinja`. - Cloud VM: 8 vCPU Intel Xeon (AVX-512, AMX), 15 GB RAM, no GPU, shared with other workloads. - Q4_K_M GGUF per model (URL and sha256 in the data), temperature 0, seed 42, max 768 tokens, context 4,096, 8 threads, no system prompt, thinking off. - Speed = `timings.predicted_per_second` per prompt; median, min and max over 10 prompts. - One run per prompt, no retries, no cherry-picking. Outputs at the 768-token cap are flagged `truncated_at_cap`. - Greedy decoding on a multi-threaded CPU is not bit-for-bit reproducible: Llama 3.2 3B was run twice and 4 of 10 outputs were identical. - Only the 4 prompts with one right answer were checked by hand against reference answers; the check text is published verbatim. Writing, translation and summaries are not scored. ## 7. Reproducing `python3 scripts/build.py` regenerates every file in `data/` from `snapshot/`. `python3 scripts/validate.py` compares the fit/speed matrix with the live `/api/recommend` endpoint; on 17 Oct 2026, 168 picks matched on fit and agreed within 0.1 tok/s (the small gap comes from the API rounding KV size for sliding-window models).