{
  "protocol_id": "ATR-B001-P1",
  "status": "proposed_not_executed",
  "purpose": "Compare a declared deployed model stack and service objective, not claim a hardware-independent engine ranking.",
  "results_present": false,
  "hardware_tracks": [
    {"track": "single_nvidia_gpu", "proposed_gpu": "RTX 4090 24GB", "must_record": ["CPU", "RAM", "OS", "kernel", "GPU PCI ID", "driver", "CUDA/runtime", "power limit", "GPU memory", "clock/thermal state"]},
    {"track": "apple_silicon", "proposed_soc": "M4 Max", "proposed_unified_memory_gb": 128, "must_record": ["CPU/GPU core configuration", "macOS build", "available unified memory", "power mode", "thermal state", "Metal/backend version"], "comparability": "Separate platform track; not a same-hardware three-engine comparison."}
  ],
  "artifacts": {"must_record": ["engine exact version/commit", "container digest if used", "model repository/tag", "model revision", "all weight file hashes", "parameter count", "format", "quantization method", "weight dtype", "KV dtype", "tokenizer hash", "chat template", "context limit", "generation options", "launch command", "offload/layer placement"]},
  "workload": {
    "input_token_targets": [512, 2048, 8192],
    "output_token_target": 256,
    "concurrency_limits": [1, 4, 16, 32],
    "load_model": "closed_loop_fixed_in_flight_count",
    "request_count_per_cell": 200,
    "independent_repetitions": 3,
    "warmup_requests_per_cell": 10,
    "prompts": "Save the exact prompt fixture and final post-template input token counts; do not estimate by characters.",
    "generation": "Record temperature/seed/stop conditions and actual output token counts; preserve early EOS and errors.",
    "primary_mode": "Streaming; one client, same network path, same parsing rules and measured interval."
  },
  "cache_experiment": {
    "prefix_token_target": 2000,
    "conditions": ["cache_disabled_if_supported", "cache_enabled_cold", "cache_enabled_warm_shared_prefix", "cache_enabled_unrelated_prefix"],
    "rule": "Isolate each engine/condition; restart or use a documented cache reset; loading/warmup must not accidentally preload cold prompts.",
    "suffixes": "Different saved suffixes; identical prefix token IDs only where shared caching is intended.",
    "context": "Record full post-template token counts and cache-hit counters when exposed; identical text is not proof of identical tokenized prefixes."
  },
  "metrics": [
    {"name": "client_ttft_ms", "definition": "Monotonic interval from request dispatch to first non-empty generated content. Role-only SSE and HTTP headers do not count.", "summary": ["p50", "p95", "sample_count"]},
    {"name": "end_to_end_ms", "definition": "Request dispatch to completed response including queued time.", "summary": ["p50", "p95"]},
    {"name": "aggregate_output_tokens_per_second", "definition": "Sum actual successfully generated output tokens divided by whole measurement-window seconds; report failures and partial results separately."},
    {"name": "per_request_decode_tokens_per_second", "definition": "Report server-defined eval token/time ratio separately; do not substitute it for aggregate wall-clock throughput."},
    {"name": "inter_token_latency_ms", "definition": "Only if actual token timestamps are observable; chunk-arrival intervals are not automatically token intervals."},
    {"name": "failure_rate", "definition": "Failed requests / all attempted requests, with HTTP errors, timeouts, OOM and cancellations separated."},
    {"name": "memory", "definition": "Idle, loaded and peak observed device memory or unified-memory pressure. Separate allocated/reserved memory, process resident memory and KV allocation when measurable."}
  ],
  "raw_record_fields": ["run_id", "track", "engine", "engine_version", "model_artifact_hash", "prompt_fixture_hash", "cache_condition", "concurrency", "request_id", "started_at_utc", "input_tokens", "output_tokens", "client_ttft_ms", "end_to_end_ms", "http_status", "error", "server_usage", "server_timings"],
  "release_rule": "Publish numbers only with actual raw records, environment manifest and analysis; leave unexecuted cells unmeasured. Never convert briefing numbers into measured results."
}
