swarmxq-startup-ops-architect

Configures Ollama CPU startup tuning, RAM profile detection, and model warmup for SwarmXQ.

1|Updated Sep 3, 2026
One-click install
npx skills add https://github.com/sabiscore/the-yap-engine --skill swarmxq-startup-ops-architect-sabiscore
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: swarmxq-startup-ops-architect
Source: https://github.com/sabiscore/the-yap-engine/tree/main/.ai/skills/swarmxq-startup-ops-architect
Command: npx skills add https://github.com/sabiscore/the-yap-engine --skill swarmxq-startup-ops-architect-sabiscore

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Misconfigured Ollama CPU environment variables silently degrade every pipeline job's throughput, and a missing warmup sequence adds 2-4 minutes of cold-start latency to the first video generation job. This Skill governs the entire SwarmXQ boot path from startup-enhanced.sh through the first accepted pipeline request. ## Core Features & Use Cases - Startup Sequence Governance: Enforces the canonical 9-step boot order covering /proc/meminfo reads, CPU safety variables, profile detection, Pilot pre-warm, and post-warmup RAM verification. - Ollama CPU Performance Tuning: Documents and validates OLLAMA_NUM_PARALLEL, OLLAMA_FLASH_ATTENTION, OLLAMA_KV_CACHE_TYPE, and OLLAMA_NUM_THREADS settings for CPU-only WSL2 hosts. - RAM Profile Auto-Detection: Switches between 8 GB and 16 GB profiles based on MemAvailable thresholds and enforces the FULL_PIPELINE_MIN_AVAILABLE_MB floor. - Warmup Health Endpoint Integration: Surfaces warmup status and cold-start ETA through /api/system/health so the dashboard never shows stale hard-coded values. - Use Case: When modifying server.ts boot logic or the warmup-status endpoint, load this Skill to get the exact startup-enhanced.sh implementation, Zod env schema additions, and a violation checklist for autonomous scanning. ## Quick Start Ask the AI to review or modify the SwarmXQ startup sequence, Ollama warmup behavior, or the /api/system/health endpoint using this skill.

Frequently Asked Questions about swarmxq-startup-ops-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Ollama environment variables for CPU-only inference?▼

Set OLLAMA_NUM_PARALLEL=1, OLLAMA_FLASH_ATTENTION=0, OLLAMA_KV_CACHE_TYPE=f16, and OLLAMA_NUM_THREADS=3 before Ollama loads any model, since these are not hot-reloadable. On bare-metal Linux instead of WSL2, use OLLAMA_NUM_THREADS=4.

How to reduce Ollama cold-start latency for the first request?▼

Run a zero-token probe with a scoped keep-alive, such as OLLAMA_KEEP_ALIVE=5m ollama run instruct-phi4-pro-q8-prod "", to force the model into RAM before the first job. This reduces cold-start ETA from about 140 seconds to 45 seconds on the 16 GB profile.

Why should OLLAMA_NUM_PARALLEL stay at 1 on CPU?▼

A CPU has a single effective inference thread, so NUM_PARALLEL=2 makes Ollama context-switch between queued requests and halves throughput with no latency benefit. More RAM does not create more inference threads, so the value stays 1 even on 16 GB hosts.

Does Ollama flash attention work safely on CPU-only hosts?▼

Flash attention with Q8 Phi-4 has shown host-specific segfault risk on the tested HP EliteBook CPU profile, so the production default is OLLAMA_FLASH_ATTENTION=0 paired with KV cache type f16. Only enable it after a measured compatibility pass on the exact Ollama version and model set.

How do I detect 8 GB vs 16 GB RAM profiles at startup?▼

Read MemAvailable from /proc/meminfo and compare it against a 12288 MB threshold; below that activates the 8 GB safe profile with one loaded model and no pre-warm. Above it enables the 16 GB profile with OLLAMA_MAX_LOADED_MODELS=2 and Pilot pre-warming.

Why does the dashboard show a wrong cold-start ETA?▼

The ETA is wrong when the dashboard hard-codes 140 or 45 seconds instead of reading warmup.coldStartEtaSecs from /api/system/health. The API reads the warmup status file written by startup-enhanced.sh and falls back to a conservative 140 seconds when the file is absent.