Add Vulkan GPU deployment support for fertigungski
This commit is contained in:
1 parent
9ce4af69be
commit
63182ef32a
11 files changed
+269
No files matched your search
@@ -0,0 +1,99 @@
|
||||
# fertigungski GPU concurrency policy
|
||||
|
||||
Meeting Assistant on this host uses `qwen3.8:27b` only. The host launcher rejects
|
||||
an alternate `MKA_PROTOCOL_MODEL`; the reusable Meeting Lab engine remains
|
||||
configurable for other projects. Assistant protocol requests retain explicit
|
||||
`num_ctx=32768`, thinking disabled and the existing prompt budget. No model
|
||||
files, model quantization, KV-cache settings or GPU backend are changed.
|
||||
|
||||
The additive systemd drop-in at
|
||||
`deploy/fertigungski/20-meeting-concurrency.conf` contains exactly:
|
||||
|
||||
```ini
|
||||
[Service]
|
||||
Environment="OLLAMA_MAX_LOADED_MODELS=1"
|
||||
Environment="OLLAMA_NUM_PARALLEL=2"
|
||||
```
|
||||
|
||||
Deployment requires normal host access. Install it as
|
||||
`/etc/systemd/system/ollama.service.d/20-meeting-concurrency.conf`, preserving
|
||||
all existing drop-ins. Reload systemd and restart Ollama to activate these
|
||||
startup settings; this interrupts active requests, so perform it when idle.
|
||||
Check `systemctl show ollama.service --property=Environment`, service logs and
|
||||
`ollama ps` afterwards. Merely exporting these variables in the Assistant
|
||||
shell does not configure an already running Ollama service.
|
||||
|
||||
Ollama and whisper.cpp have independent execution and queueing. Two Ollama
|
||||
requests and Vulkan transcription are permitted to overlap. There is no
|
||||
shared GPU lock, scheduler, model unloading, admission controller or automatic
|
||||
context reduction. The resident-model limit applies to Ollama; it neither
|
||||
reserves VRAM for Whisper nor restricts which models other clients may request.
|
||||
Two parallel 32768-token context slots can consume more VRAM than the validated
|
||||
single-request workload. Measure the combined load rather than assuming it fits
|
||||
32 GB. See [Ollama concurrency guidance](https://docs.ollama.com/faq#how-does-ollama-handle-concurrent-requests).
|
||||
|
||||
Whisper's original CPU binary remains available. Explicit Vulkan reports device
|
||||
OOM and fails; Auto may retry once on CPU, reporting and retaining the OOM
|
||||
classification even when the retry succeeds. Ollama memory errors are reported
|
||||
without retries. Host OOM, unqualified memory errors and device allocation
|
||||
failures are distinguished from confirmed GPU OOM. Pipeline failure metadata
|
||||
and the existing Assistant failure display expose these errors. No additional
|
||||
coordination should be added unless controlled measurements demonstrate need.
|
||||
|
||||
## Controlled concurrent validation
|
||||
|
||||
The paired Lab checkout supplies `scripts/benchmark_gpu_concurrency.py`. Supply
|
||||
a representative, canonical audio clip (preferably long enough to overlap LLM
|
||||
processing) and full realistic protocol prompts, including context. Existing
|
||||
prompt files may be read without regenerating or altering historical meetings.
|
||||
Use estimated prompt sizes up to 29000 tokens. Two distinct prompts are
|
||||
preferable to measure realistic traffic rather than only prompt-cache reuse.
|
||||
|
||||
```bash
|
||||
python3 scripts/benchmark_gpu_concurrency.py /path/to/canonical-test.wav \
|
||||
--prompt-file /path/to/protocol-prompt-1.txt \
|
||||
--second-prompt-file /path/to/protocol-prompt-2.txt \
|
||||
--whisper-model /opt/whisper.cpp/models/ggml-large-v3-turbo.bin \
|
||||
--whisper-executable /opt/whisper.cpp/build-vulkan/bin/whisper-cli \
|
||||
--language de --threads auto \
|
||||
--output-dir /tmp/meeting-gpu-concurrency-001
|
||||
```
|
||||
|
||||
The benchmark makes **six qwen3.8:27b generation requests**, all with
|
||||
`num_ctx=32768`, and two strict Vulkan transcriptions. Outputs go only to the
|
||||
new specified directory, which must not already exist. Three cases compare:
|
||||
|
||||
1. Serial execution of both LLM requests and Whisper.
|
||||
2. Both LLM requests in parallel, without Whisper.
|
||||
3. Both LLM requests in parallel alongside Whisper.
|
||||
|
||||
The script never unloads the model: the serial baseline can retain the resident
|
||||
LLM during Whisper execution. It records per-job latency, request-window overlap,
|
||||
OOM/errors, inference outputs/provenance, sampled AMD sysfs VRAM/utilization,
|
||||
power (microwatts), temperature (millidegrees Celsius), and `/api/ps` snapshots.
|
||||
Unavailable telemetry is not invented. A failed case is recorded and stops later
|
||||
cases; there are no LLM retries or automatic CPU fallbacks in this benchmark.
|
||||
|
||||
Request-window overlap alone does not establish concurrent server-side GPU
|
||||
execution. Verify Ollama runner logs show two configured parallel slots, confirm
|
||||
both requests actually used the Radeon, and correlate timings with Whisper
|
||||
backend diagnostics and GPU monitoring. Repeat into fresh directories to
|
||||
separate startup and caching effects. Compare transcription/protocol quality,
|
||||
latency, peak VRAM and observed headroom before adopting the Vulkan host default.
|
||||
|
||||
## Rollback
|
||||
|
||||
Launch Assistant with `MKA_WHISPER_BACKEND=cpu` and the original
|
||||
`/opt/whisper.cpp/build/bin/whisper-cli`; keep the same model. To undo the Ollama
|
||||
policy, remove only the new concurrency drop-in, then reload systemd and restart
|
||||
Ollama when idle. Existing overrides, model files, GPU backend and power limits
|
||||
remain untouched.
|
||||
|
||||
## Validation status in this implementation environment
|
||||
|
||||
The Vulkan build compiled in an isolated `/tmp` source copy. CPU inference and
|
||||
strict unavailability handling were validated. Deployment under `/opt`, systemd
|
||||
configuration/restart, R9700 inference and realistic concurrent benchmarking are
|
||||
blocked by sandbox write/device/service/network restrictions. The host Vulkan
|
||||
default has therefore not been activated. Passing mocked concurrency tests does
|
||||
not establish VRAM capacity or performance.
|
||||
Reference in new issue
Block a user