Repository navigation
Command Reference Part 2
node out/mcp/localModelLoop.js runs the whole #134 loop in one command on the machine that holds the
screen: it starts a capture, prompts a local Ollama model through the MCP bridge, marks the GPU rise and
exports a clip around it. VS Code is not needed while it runs.
- Checks that ffmpeg is found (
--ffmpeg,LBA_FFMPEG_PATH, PATH, WinGet), that Ollama answers at--ollama(defaulthttp://127.0.0.1:11434) and that--model(defaultqwen2.5vl:3b) is pulled. - Creates
run-<uuid>/under--captures-dirand records frames at--fps(default 4):gdigrabon Windows,x11grabon an Xorg session, or ffmpeg's lavfitestsrcwith--source test. The CPU/RAM/disk sampler and the nvidia-smi GPU sampler run alongside. - Waits
--lead-ms(default 2000), adds the cue "prompt sent", streams--prompt(and--image <png>for a vision model) to the model, and adds "first token" (the first streamed token of any kind: thinking, content or a tool call), "answer started" (the first content or tool-call token) and "response done" from the stream. Tools are offered as the bridge does: its read-only defaults plus each--allow-tool <name>, and only when the model reports thetoolscapability.--no-toolsoffers none: the Ollama request then carries notoolskey and the receipt'stoolsOfferedis[].--no-toolswith--allow-toolis a usage error (exit 2). - Keeps recording
--tail-ms(default 3000), stops, adds the automatic GPU cues (memory rise = model load, utilization through--gpu-threshold-pct, default 10% = compute, with the platform lag) and writescapture.jsonwith all markers in time order. - Exports
clips/clip-<from>-<to>.mp4from the earliest of prompt sent and the first GPU cue minus 1 s to response done plus 1 s, and writesclips/loop-<from>-<to>.json, the receipt it prints.
The receipt is metadata only: capture id and directory, model name, digest, size and capabilities, prompt and answer SHA-256 with at most 200 characters of the answer, first-token and first-answer latency, each cue's instantMs, offset from prompt sent and imageGrab (deltaMs, admitted, toleranceMs), the GPU edges, the GPU series availability or reason, the frame count and the clip's SHA-256, size and duration. Frames and clips stay on the machine.
Use --cold to unload the model first, so that the capture also shows the model load. Without nvidia-smi the
loop still completes and the receipt marks the GPU unavailable with the reason.
| Exit | Meaning |
|---|---|
| 0 | Loop done; the receipt is on stdout and in clips/. |
| 2 | Bad arguments (the usage is printed). |
| 3 | Missing prerequisite: ffmpeg, Ollama unreachable, model not pulled, no desktop to record, --cold unload failed. No capture is created. |
| 4 | The capture yielded no frames; the run is marked failed in capture-status.json and active-capture-session.json. |
| 5 | The model failed or gave no complete answer; the capture is kept and loop-receipt.json is written. |
| 6 | The clip failed; the capture is kept and loop-receipt.json is written. |
| 7 | Reference mode: the reference run failed (HTTP error, invalid or incomplete stream, endpoint unreachable during the run); the capture is kept and loop-receipt.json is written. The local phase is skipped. |
| 8 | Reference mode: the reference timed out (--reference-timeout-ms); as for 7. |
Default captures folder (the installed extension's globalStorage, so Open Benchmark Frame Correlator
can open the run):
- Windows:
%APPDATA%\Code\User\globalStorage\svelderrainruiz.labview-benchmark-actor\captures - Linux:
${XDG_CONFIG_HOME:-~/.config}/Code/User/globalStorage/svelderrainruiz.labview-benchmark-actor/captures - macOS (
--source testonly):~/Library/Application Support/Code/User/globalStorage/svelderrainruiz.labview-benchmark-actor/captures
Open Benchmark Frame Correlator opens the run whose folder name sorts last, which is not necessarily the newest. Extensions released before this loop (1.6.7 and older) show the frames and CPU/RAM curves but not the GPU curves or agent cues.
The CLI is not in the 1.6.7 package, so run it from a built checkout of the repository. In PowerShell, from
the checkout, with Ollama serving qwen2.5vl:3b on 127.0.0.1:11434, ffmpeg on PATH (WinGet Links) and
the NVIDIA driver's nvidia-smi:
npm.cmd ci
npm.cmd run compile
C:\nvm4w\nodejs\node.exe out\mcp\localModelLoop.js --model qwen2.5vl:3b --cold
$LASTEXITCODEAdd --source test for a dry run that records ffmpeg's test pattern instead of the screen, and
--prompt "...", --image C:\path\shot.png, --fps 8, --lead-ms 3000 or --tail-ms 5000 as needed.
The run is written to
%APPDATA%\Code\User\globalStorage\svelderrainruiz.labview-benchmark-actor\captures\run-<uuid>\:
frame-*.png, resources.jsonl, gpu.json, gpu.jsonl, capture.json, capture-status.json,
active-capture-session.json, capture-meta.json, and in clips\ the MP4, its clip receipt and the loop
receipt. Progress goes to stderr; stdout holds only the receipt, so
... | Out-File -Encoding utf8 loop-receipt.json keeps it.
--reference openwebui --endpoint <https url> --token-file <path> --reference-model <id> adds a reference
phase before the local phase in the same capture (#139). The same prompt is streamed through the Open WebUI
chat-completions API (<endpoint>/api/chat/completions, OpenAI-compatible SSE) to the model id
--reference-model (a base tag such as gemma4:e4b, gemma4:26b or qwen3.6:35b). --model stays the
local Ollama model, so the two may differ when a lower local model is documented.
- Before the capture: the token file is read once, then
<endpoint>/api/modelsmust accept the token and list the model id (otherwise exit 3, no capture). If the entry is an Open WebUI alias (a workspace model withinfo.base_model_id), one warning line on stderr names the base id and the--reference-modelto use; the exit code does not change. - After
--lead-ms: the cues "reference sent", "reference first token", "reference answer started" and "reference done" are added on the capture's time axis. The GPU sampler keeps running: the local GPU should stay idle, which is the control. - After another
--lead-ms: the local phase runs as without--reference(with--coldif given).
Both sides use temperature 0, --seed (default 42) and --max-tokens (default 256; Ollama num_predict,
OpenAI max_tokens). --seed or --max-tokens alone also fixes the local decoding; without any of these
flags, the Ollama request is unchanged. The clip starts 1 s before "reference sent".
For a like-for-like comparison use the base tag as --reference-model (not an alias), add --no-tools,
and give thinking models room with --max-tokens 512 or more. An Open WebUI alias can carry built-in tools
and default features that the server adds to the prompt (and that can switch on thinking), and the local
side otherwise gets the bridge's tool schemas in its prompt; either way the prompt-token counts and the
timings are not comparable.
The receipt gets decoding, reference (model id, endpoint scheme and SHA-256 rather than the host, answer
SHA-256 and a 200-character excerpt, usage, and alias, baseModelId, hasTools, hasDefaultFeatures from
the /api/models entry; booleans only, never tool or feature names) and one comparison block.
comparison.referenceModel repeats those four fields. For each side, comparison holds firstTokenMs (to
the first token of any kind, thinking or reasoning included), firstAnswerMs (to the first content or
tool-call token), total time, output count, tokens per second (output count over first token to done; the
output count includes thinking tokens) and promptTokens (reference: usage.promptTokens; local: Ollama
prompt_eval_count of the final turn, whose prompt holds the whole conversation; with --no-tools there is
one turn). The reference side also holds reasoningChars; the local side thinkingChars (Ollama
message.thinking) and toolsOffered. The
reference side also holds gpuControl: the local GPU utilization and VRAM during the reference window, and
idle (below --gpu-threshold-pct, with less than --gpu-memory-rise-mb of memory rise). The local side
also holds the VRAM peak. gpuEdges lists the GPU edges and whether each fell inside the reference window.
The output count is in tokens (the stream's usage, or Ollama eval_count) or, when no count was
reported, in chunks (non-empty stream deltas), and outputUnit says which.
Token rules: the token is sent only as the Authorization: Bearer header. It never appears in argv, output,
logs, the receipt or capture.json, and is redacted from the reference excerpt if the endpoint echoes it.
The file must be non-empty, hold one token of visible ASCII and, on Linux and macOS, be readable by its owner
only (chmod 600); otherwise exit 2 with a message that never shows the content. --endpoint must be
https; plain http is accepted only for 127.0.0.1 or localhost (tests). --reference-timeout-ms (default
300000) bounds each reference request.
C:\nvm4w\nodejs\node.exe out\mcp\localModelLoop.js --model <local model> --cold `
--reference openwebui --endpoint https://owui.example.invalid --token-file C:\path\owui.key `
--reference-model gemma4:e4b --no-tools --max-tokens 512Every panel command above is also openable by an agent through the
lba-open-benchmark-panel language-model tool (panel = run | trend | frameCorrelator | crossPlaneTrend | resourceProfile | crossPlaneResource | meshCalibration | meshBoard), and the actor's core tools are exposed over the
Model Context Protocol server. See AGENTS.md
and Delivery Profile (Delivery-Profile).
Generated from docs/information-for-users/command-reference.md on develop. Edit the source in the repository, not this page.