Tutorials and technical writing
Start with a runnable fixture or a local inference endpoint. The technical posts explain how those tests fit into a production system.
Can an 8 GB GPU run the model this feature needs?

Test plan. The target machine is a Windows 11 workstation with a Radeon RX 5700 XT, 8 GB of VRAM, and a Ryzen 9 3900X. Start with one model, one quantization, and a short receipt extraction workload.
- Check whether the installed runtime and driver support the GPU. Record the reported backend for each run. If the GPU path is unavailable, record that finding and test a supported CPU path.
- Run the receipt fixtures and verify the returned spans before measuring performance. Include a missing total and a receipt with both a subtotal and a total.
- Measure warm, sequential latency with the bundled measurement script. Record model settings, peak memory, and whether the runtime falls back to CPU.
- Compare the results against the feature’s latency and memory budget. Record whether to ship on this machine, choose a smaller model, or require a different backend.
Run the validation fixture · Run the measurement tutorial
Validate an extracted field

Build a check for one question: where is the total on this receipt? You need Python 3 and the extraction fixture.
python examples/extract.py
The script prints the accepted field value and its source span. The fixture reserves the exact Total line for the answer, then checks that the returned substring starts and ends at the amount. It rejects the subtotal, a missing total, multiple totals, and malformed spans. This fixture accepts a specific two-decimal Total line; it is not a general receipt parser.
{"field": "total", "value": "19.44", "span": [34, 39]}
Change the proposed value to 18.00 and run it again. The assertion should fail. In a model-backed workflow, the same validation sits between the model and the consumer. Record missing or ambiguous evidence explicitly and keep rejected examples for regression tests.
Measure a local inference endpoint

Use the measurement script with Python 3 and a running local server that implements the OpenAI-compatible chat completions route. Substitute your actual URL and served model ID.
python examples/measure.py --base-url http://localhost:8000/v1 --model YOUR_MODEL_ID --runs 5
Save the individual request times and median alongside your hardware, backend, model artifact, quantization, driver version, and context settings. The script warms the server once and times sequential, non-streaming requests end to end.
When comparing backends, hold the prompt, model, and request limits steady. Record completion length if it differs across runs. For a streaming test, capture the first generated content separately and measure decode throughput from output token counts and generation time.
What happens between the API and the hardware?

A chat request starts at an HTTP API. The server validates its shape, resolves the model ID, and passes the request to the selected runtime. The runtime loads the model artifact and runs inference using a backend that can execute on the target hardware.
Measure at each boundary. An API error calls for checking the payload and contract. A model-load error calls for checking format, path, memory, and backend support. A slow first token calls for checking whether the model is already loaded, how much prompt data must be processed, and whether work is queued.
For a production handoff, capture one request fixture and one working configuration. Include the hardware and driver versions, the served model ID, and the logs that show which backend actually ran. The next engineer can then distinguish a broken API request from a changed runtime environment.
Where an inference release can fail

A dependency update can move the failure point without changing the HTTP route. A model may start loading through a slower backend, an accelerator may become unavailable, or the process may exhaust memory under concurrent requests.
Before release, record a known-good model, runtime, backend, driver, and request fixture. Run the fixture on the target hardware, then repeat with realistic concurrency. Compare response quality, latency, peak memory, and backend selection. Set acceptable bounds from your workload and operating budget.
Rehearse returning traffic to the previous configuration. Preserve the model artifacts and runtime configuration needed to bring it back. Track fallback usage, request failures, and queue time after the change so you can see whether production is behaving like the test.