Run a local LLM on the CPU when it finishes useful work before your deadline. For 600 records due in ten hours, your complete processing budget is 10 × 60 ÷ 600 = one minute per record, including input handling and saving the result.
Turn the hardware question into a time budget
A slow chat and a successful overnight job can use the same model. Decide whether you need an answer while someone waits, a report by morning, or several agents working together. Each creates a different acceptance test.
For the 600-record example, reserve two of the ten hours for retries and review. That leaves 8 × 3,600 ÷ 600 = 48 seconds per record for the first pass. In this illustrative plan, if twenty representative records take twelve minutes end to end, the observed average is 720 ÷ 20 = 36 seconds. Extrapolated linearly, 600 × 36 = 21,600 seconds, or six hours. Verify that projection with a longer run before depending on it.
| Workload | Useful target | First experiment |
|---|---|---|
| Overnight extraction | Accepted records before the deadline | CPU run on twenty representative records |
| Interactive chat | First response and completed answer within your waiting limit | Short question and document-heavy question |
| Several coding agents | Completion time for the entire task set | One worker, then the expected concurrent workers |
| Occasional large analysis | Useful result without a permanent capacity purchase | Local baseline and approved hosted comparison |
Include human correction in the result. A configuration that saves ten minutes of generation but adds an hour of checking is a worse tool for the job. Establish the quality threshold before trying to improve speed.
Check the backend before blaming the hardware
llama.cpp documents CPU builds and GPU backends, including Metal and CUDA. On macOS, its source build enables Metal by default. On an NVIDIA Linux machine, a CUDA build uses -DGGML_CUDA=ON. A GPU comparison needs a build that supports the device, enough memory for the chosen configuration and confirmation that offload actually happened.
For a controlled CPU run with an existing llama.cpp build, use the explicit device setting and zero GPU layers. Replace model.gguf and record.txt with your artifact and prompt:
./build/bin/llama-cli -m model.gguf --device none -ngl 0 -c 4096 -n 256 --single-turn -f record.txt
For a GPU trial, remove --device none and request automatic placement with -ngl auto. Add --log-verbosity 3 to the CPU command and its GPU variant, then inspect the startup output. Confirm that the model layers actually loaded on the accelerator before recording full GPU placement. If some layers remain on the CPU, you are testing partial offload.
Ollama also supports Apple GPU acceleration through Metal. On Linux, its hardware page lists supported devices and driver requirements. Check that page for the exact card you own before planning an upgrade. Use ollama ps during the request to distinguish CPU, GPU and mixed placement.
Measure prompt processing separately from generation
Use llama.cpp's benchmark tool to establish a repeatable baseline. Its pp test measures prompt processing, while tg measures token generation. The following CPU benchmark processes a 512-token prompt and tests 128-token generation, repeating each test five times:
./build/bin/llama-bench -m model.gguf -dev none -ngl 0 -p 512 -n 128 -r 5
Save the output with the model filename and build information. Run the same test on a supported GPU configuration, keeping the artifact fixed. These tests help identify a bottleneck; your real records still decide whether the change is useful.
For an illustrative calculation, suppose your measured prompt processing takes 12 seconds and generation takes 18 seconds. The model work totals 30 seconds. Halving generation would save nine seconds; halving prompt processing would save six. This explains why optimizing the slower stage is more useful than choosing hardware from one headline tokens-per-second figure.
For multiple agents, record both aggregate completion time and the slowest agent's wait. Four agents on one local GPU share its throughput, and requests beyond its serving capacity wait in line. Batching may improve total utilization; check the wait for each interactive user as well.
Try it on your workload
Select twenty records spanning the shortest and longest expected inputs. Include at least two awkward cases, such as contradictory quantities or an absent deadline. Run the complete application, including reading each record and writing its result, first on the CPU and then with supported acceleration.
Repeat with your editor, browser and normal desktop applications open. Record end-to-end seconds per record, first-response delay for interactive use, accepted outputs, memory and actual processor placement. Keep model, quantization, context and prompt fixed. When evaluating a laptop, use the same power setup for both runs.
Finally submit the expected number of simultaneous agent tasks. Compare the finish time of the whole group with the sequential run. Use the 48-second first-pass budget from the opening example only if it matches your own deadline; otherwise recalculate it from available seconds divided by records.
How to decide
- Stay with the CPU when accepted work finishes with a useful deadline margin and does not disrupt the desktop.
- Use acceleration when the same task misses its interactive or batch target and the GPU trial fixes that shortfall.
- For infrequent bursts, compare a hosted run before buying hardware that will spend most of its time idle.
Run ten batch workers together before buying a GPU
Ten record-processing agents working at once on openai/gpt-oss-20b cost about 2 cents in tokens on TrustedRouter for this batch. Divide the approved records into independent groups and apply the same correctness checks as in your CPU trial.
On 2026-11-22, the live catalog listed $0.01 per million input tokens and approximately $0.0475 per million output tokens. Suppose each agent uses 100,000 input and 20,000 output tokens across its records. Input = 10 × 100,000 = 1,000,000; output = 10 × 20,000 = 200,000. At those rounded rates, cost = 1 × $0.01 + 0.2 × $0.0475 = $0.0195, about 2 cents.
On one local GPU, those workers share throughput, and requests beyond its parallel capacity wait in line; through a per-token API, they can run at the same time for the same token bill as running sequentially. Price occasional daytime bursts separately from your recurring overnight work. Prices change; check current rates and agent setup. For approved off-device data, encrypted inference and zero data retention depend on model and provider. Keep CPU inference when it meets the deadline, particularly for work that must remain offline.
Sources
- llama.cpp: CPU, Metal and CUDA builds
- llama.cpp: device selection and generation controls
- llama.cpp: prompt-processing and generation benchmarks
- Ollama: supported acceleration backends
- Ollama: processor placement and concurrency