← Back to Skills Marketplace
wbavon

Model Verify Flagos

by Flagos · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
78
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install model-verify-flagos
Description
Verify the serving stack with a user-specified target model. Runs twice: first with FlagGems/FlagCX disabled (isolate model-specific errors), then with full...
README (SKILL.md)

Target Model Verification

Same layer-peeling approach as env-verify, but with the real target model that may require multi-GPU tensor parallelism. Runs the model twice (without and with multi-chip stack) and diffs results to isolate failures.

Skill Components

model-verify/
├── SKILL.md                            # This file — execution flow
├── scripts/
│   └── diff_analysis.py                # Compare Run A vs Run B, classify errors (JSON)
└── references/
    └── multichip-errors.md             # Multi-chip error patterns and diff truth table

Reused from env-verify:

  • env-verify/scripts/run_offline_inference.py — Phase A test (parameterized)
  • env-verify/scripts/test_serve_mode.py — Phase B test (parameterized)
  • env-verify/references/error-classification.md — Layer-based error rules

Prerequisites

  • Running container with software stack installed (from install-stack)
  • env-verify completed (at least Phase A passed)
  • User must provide model path

If invoked standalone, ask for container name, vendor, and model path. If invoked from /flagrelease, these are passed as context.

Execution Flow

Step 1: Get Model Info from User

Ask the user for (use AskUserQuestion if not provided):

  1. Model path (required) — local path inside container OR ModelScope/HuggingFace ID
  2. --tensor-parallel-size (optional) — default to GPU count
  3. Additional vllm args (optional)

Get default TP size:

docker exec \x3CCONTAINER> python3 -c "
import torch; print(torch.cuda.device_count() if torch.cuda.is_available() else 1)
"

If user does not provide model path → ask and wait. Do not guess.

Step 2: Download Model (if needed)

If model path is a remote ID (not starting with /):

docker exec \x3CCONTAINER> python3 -c "
from modelscope import snapshot_download
snapshot_download('\x3CMODEL_ID>', local_dir='/data/models/\x3CMODEL_NAME>')
"

If local directory, verify config.json exists:

docker exec \x3CCONTAINER> test -f \x3CMODEL_PATH>/config.json

Timeout: 600s for large model downloads.

Step 3: Run A — WITHOUT Multi-Chip Stack

Copy the test scripts from env-verify into the container (if not already there):

docker cp \x3CENV_VERIFY_DIR>/scripts/run_offline_inference.py \x3CCONTAINER>:/tmp/
docker cp \x3CENV_VERIFY_DIR>/scripts/test_serve_mode.py \x3CCONTAINER>:/tmp/

Phase A (offline):

docker exec \x3CCONTAINER> bash -c '
export USE_FLAGGEMS=0
unset FLAGCX_PATH
timeout 300 python3 /tmp/run_offline_inference.py \
    --model \x3CMODEL_PATH> \
    --tp \x3CTP_SIZE> \
    --trust-remote-code
' > /tmp/run_a_offline.json

Phase B (serve):

docker exec \x3CCONTAINER> bash -c '
export USE_FLAGGEMS=0
unset FLAGCX_PATH
timeout 360 python3 /tmp/test_serve_mode.py \
    --model \x3CMODEL_PATH> \
    --tp \x3CTP_SIZE> \
    --trust-remote-code \
    --health-timeout 300
' > /tmp/run_a_serve.json

Step 4: Run B — WITH Full Multi-Chip Stack

Skip logic: If ALL of FlagGems, FlagTree, FlagCX failed install → skip Run B. Report: "Run B skipped: no multi-chip packages installed." Check install-stack results to decide.

Phase A (offline):

docker exec \x3CCONTAINER> bash -c '
export USE_FLAGGEMS=1
export FLAGCX_PATH=/tmp/FlagCX
export VLLM_PLUGINS=fl
timeout 300 python3 /tmp/run_offline_inference.py \
    --model \x3CMODEL_PATH> \
    --tp \x3CTP_SIZE> \
    --trust-remote-code
' > /tmp/run_b_offline.json

Phase B (serve):

docker exec \x3CCONTAINER> bash -c '
export USE_FLAGGEMS=1
export FLAGCX_PATH=/tmp/FlagCX
export VLLM_PLUGINS=fl
timeout 360 python3 /tmp/test_serve_mode.py \
    --model \x3CMODEL_PATH> \
    --tp \x3CTP_SIZE> \
    --trust-remote-code \
    --health-timeout 300
' > /tmp/run_b_serve.json

Step 5: Diff Analysis

Copy and run scripts/diff_analysis.py to compare the two runs:

docker cp \x3CSKILL_DIR>/scripts/diff_analysis.py \x3CCONTAINER>:/tmp/
docker exec \x3CCONTAINER> python3 /tmp/diff_analysis.py \
    --run-a /tmp/run_a_offline.json \
    --run-b /tmp/run_b_offline.json

Read references/multichip-errors.md to interpret the diff and classify errors.

Step 6: Produce Report

{
  "status": "PASS | PARTIAL | FAIL",
  "stage": "model-verify",
  "model": "\x3CMODEL_PATH>",
  "tensor_parallel_size": 8,
  "run_a_without_multichip": {
    "flags": {"USE_FLAGGEMS": "0", "FLAGCX_PATH": "unset"},
    "phase_a_offline": "PASS | FAIL",
    "phase_b_serve": "PASS | FAIL",
    "output_sample": "...",
    "errors": []
  },
  "run_b_with_multichip": {
    "flags": {"USE_FLAGGEMS": "1", "FLAGCX_PATH": "/tmp/FlagCX"},
    "skipped": false,
    "phase_a_offline": "PASS | FAIL",
    "phase_b_serve": "PASS | FAIL",
    "output_sample": "...",
    "errors": []
  },
  "diff_analysis": {
    "conclusion": "BOTH_PASS | MULTICHIP_ERROR | SAME_ERROR | DIFFERENT_ERRORS",
    "detail": "...",
    "multichip_component": "FlagGems | FlagTree | FlagCX | plugin | null",
    "recommended_stack": "full | base | none"
  }
}

recommended_stack — tells downstream skills which stack to use:

  • full — Run B passed (USE_FLAGGEMS=1, FLAGCX_PATH set)
  • base — only Run A passed (USE_FLAGGEMS=0, FLAGCX_PATH unset)
  • none — Run A also failed (model can't serve)

Status logic:

  • PASS — both Run A and Run B succeed
  • PARTIAL — Run A passes, Run B fails
  • FAIL — Run A fails

Error Handling

Failure Behavior
Model path not provided Ask user, wait
Model path not found Report exact path, exit with error
Model too large for memory Report OOM, suggest reducing TP or dtype
TP > available GPUs Report "requested TP=X but only Y available"
Server hangs Kill after timeout, capture last logs
Run A and Run B both fail Report both errors separately

Rule: Run BOTH runs regardless of individual failures. Maximize error coverage.

Timeout Rules

Operation Timeout
Model download 600s
Phase A (offline) 300s
Phase B (serve + test) 360s
Usage Guidance
The review could not validate the skill contents from the workspace in this run, so treat this as an incomplete low-confidence result rather than a substantive approval.
Capability Assessment
Purpose & Capability
No purpose or capability mismatch was evidenced in the supplied message artifacts.
Instruction Scope
No unsafe instruction scope was evidenced in the supplied message artifacts.
Install Mechanism
No risky install mechanism was evidenced in the supplied message artifacts.
Credentials
No disproportionate environment access was evidenced in the supplied message artifacts.
Persistence & Privilege
No persistence or privilege issue was evidenced in the supplied message artifacts.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install model-verify-flagos
  3. After installation, invoke the skill by name or use /model-verify-flagos
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
model-verify-flagos 1.0.0 – Initial release - New skill to verify model serving stack with and without multi-chip features (FlagGems/FlagCX), isolating model-specific and stack-specific errors. - Runs target model in two phases (offline/serve mode), with and without multi-chip stack enabled. - Automatically handles model download if given a remote ID; checks prerequisites and asks user for any missing info. - Produces a structured JSON report summarizing results, error analysis, and recommended stack to use. - Includes robust error handling, dynamic timeouts, and integration with components reused from env-verify.
Metadata
Slug model-verify-flagos
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Model Verify Flagos?

Verify the serving stack with a user-specified target model. Runs twice: first with FlagGems/FlagCX disabled (isolate model-specific errors), then with full... It is an AI Agent Skill for Claude Code / OpenClaw, with 78 downloads so far.

How do I install Model Verify Flagos?

Run "/install model-verify-flagos" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Model Verify Flagos free?

Yes, Model Verify Flagos is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Model Verify Flagos support?

Model Verify Flagos is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Model Verify Flagos?

It is built and maintained by Flagos (@wbavon); the current version is v1.0.0.

💬 Comments