swarmxq-model-orchestrator

Governs model routing, eviction, and RAM pressure management for the SwarmXQ multi-agent platform.

1|Updated May 4, 2026
One-click install
npx skills add https://github.com/Scardubu/SwarmXQ --skill swarmxq-model-orchestrator-scardubu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swarmxq-model-orchestrator
Source: https://github.com/Scardubu/SwarmXQ/tree/main/.ai/skills/swarmxq-model-orchestrator
Command: npx skills add https://github.com/Scardubu/SwarmXQ --skill swarmxq-model-orchestrator-scardubu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running multiple local LLMs on CPU-only hardware risks out-of-memory crashes and concurrent inference conflicts. This Skill enforces the SwarmXQ platform's SINGLE-7B LOCK, canonical tag resolution, and RAM pressure gating so model orchestration changes never violate memory or inference safety invariants. ## Core Features & Use Cases - SINGLE-7B LOCK Enforcement: Ensures only one 7B-class model is inference-active at any time, requiring evictIncompatible() before every 7B load. - Canonical Tag Resolution: Routes all external and legacy model tags through resolveCanonicalTag() so deprecated aliases never enter the model registry or logs. - RAM Pressure Gating: Implements readPressure() and getRamSnapshot() with protected thresholds (RAM_CRITICAL_MB = 800) to back off or fail safely under memory pressure. - Use Case: When modifying model-orchestrator.ts or video-runtime-config.ts to add a new pipeline stage, use this Skill to verify the stage resolves its model via resolveCanonicalTag(), calls evictIncompatible() before loading a 7B model, and degrades gracefully on 8 GB hosts. ## Quick Start Ask the AI to review your changes to model-orchestrator.ts for SINGLE-7B LOCK and canonical tag compliance using the swarmxq-model-orchestrator skill.

Frequently Asked Questions about swarmxq-model-orchestrator

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

FAQPage Schema
How do I safely load a 7B model in the SwarmXQ platform?

Always call ModelOrchestrator.evictIncompatible() before loading any 7B-class model such as Architect, Oracle, Forge, Auditor, or Lab. This guarantees only one 7B model is inference-active at a time, since CPU-only hardware supports exactly one inference thread.

What is the SINGLE-7B LOCK in model orchestration?

The SINGLE-7B LOCK is the platform's core invariant: only one 7B-class model may be actively inferencing at any moment. On 16 GB hosts a second model like Pilot may stay resident in RAM but must remain idle, never concurrently inferencing.

How does resolveCanonicalTag handle legacy model aliases?

resolveCanonicalTag() maps legacy aliases like phi4-fast, deepseek-reasoner, and qwen-worker to their canonical production tags via LEGACY_ALIAS_MAP. Unknown tags throw an error, so deprecated names never reach the model registry or logs.

Can two 7B models run simultaneously on a 16 GB host?

No. Even though 16 GB allows OLLAMA_MAX_LOADED_MODELS=2 for dual residency (Pilot warm plus one 7B), two 7B models must never be inference-active together regardless of available RAM. The lock is about serial CPU inference, not just memory.

Why does RAM pressure gating fail with PRESSURE_CRITICAL?

PRESSURE_CRITICAL fires when MemAvailable drops to or below RAM_CRITICAL_MB (800 MB), the minimum headroom before the Linux OOM killer activates. This constant is protected and must never be changed; high pressure instead triggers a backoff delay and re-check.

How does the platform degrade on 8 GB hosts?

shouldAutoEnableLowRamMode() switches the pipeline to the lite instruct-phi4-lite-q4km-prod model, sets maxLoadedModels to 1, disables Pilot keep-alive, and reduces frame budgets and resolution. Degradation skips must be logged at warn level, never silently ignored.