Skip to content

Slice 250.2c: Adaptive Quantization Execution Matrix (hardware-aware router + fp16 parity) - #69512

Open
drussell23 wants to merge 1 commit into
topology/slice-250.2b-phase3-ecapa-matrixfrom
topology/slice-250.2c-adaptive-quant
Open

Slice 250.2c: Adaptive Quantization Execution Matrix (hardware-aware router + fp16 parity)#69512
drussell23 wants to merge 1 commit into
topology/slice-250.2b-phase3-ecapa-matrixfrom
topology/slice-250.2c-adaptive-quant

Conversation

@drussell23

@drussell23 drussell23 commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

Final sub-slice of the offline ML pipeline (stacked on #69511). A hardware-aware router that picks the ECAPA execution path from live host signals every call — no static model preference — with a proof the compressed path is decision-equivalent. tests/ml/ only; structural injection (no backend/unified_supervisor imports).

  • Context-aware router (AdaptiveQuantizationRouter): reads Power State (AC/Battery) + Memory Pressure (structurally aligned to MemoryPressureGate.PressureLevel, lazy-probed, injectable). Rule: AC AND NORMAL → HIGH_FIDELITY; battery OR elevated → COMPRESSED. Recomputed per call (dynamic re-evaluation proven).
  • fp16 quantizer: deterministic float16 round-trip + re-normalize (stand-in for fp16/ONNX-quantized encoder).
  • Parity proof: per-fixture cosine drift ≈ 2.8e-8TAU=1e-2; one threshold (0.6112) cleanly separates B(accept)/C(reject) on BOTH paths → identical Accept/Reject verdicts end-to-end through the Phase-3 BiometricExecutionMatrix.

Test Plan

  • 77 passed, 3 skipped (real-ECAPA seam); tests/ml/ only
  • Routing matrix (4 cases) + dynamic re-evaluation (power flip changes path)
  • Cosine drift ≤ τ with huge margin; HF-vs-compressed verdict equivalence (B accept / C reject on both)

🤖 Generated with Claude Code


Summary by cubic

Adds a hardware-aware ECAPA router that picks the execution path per call from live power and memory pressure, plus an fp16 quantizer with tests proving the compressed path is decision-equivalent to high fidelity. Tests live in tests/ml/ only and use structural injection (no backend imports).

  • New Features
    • Context-aware router: AC + normal pressure → HIGH_FIDELITY; battery or elevated → COMPRESSED. Recomputed every call with optional JARVIS_ECAPA_FORCE_PATH override. Probes are lazy, fail-soft, and structurally injected.
    • fp16 quantizer: float16 round-trip with L2 re-normalization; deterministic float32 outputs.
    • Parity: cosine drift ≪ 1e-2 with wide margin; a single threshold cleanly separates B(accept) and C(reject) on both paths via the Phase‑3 BiometricExecutionMatrix.

Written for commit 0056948. Summary will update on new commits.

Review in cubic

…-aware router (power+pressure) + fp16 parity proof (drift<=tau, verdict-equivalent)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

[integrity-verified: 7a33646017f3]
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

📊 PR Size Analysis

Size: L
Files Changed: 3
Lines Added: +572
Lines Deleted: -0
Total Changes: 572

💡 This PR is large. Ensure it focuses on a single feature or fix.

Review Checklist

  • All tests passing
  • Code follows project style guidelines
  • Documentation updated if needed
  • No sensitive data exposed
  • Breaking changes documented

@drussell23

Copy link
Copy Markdown
Owner Author

HELD (not merging this session) per operator review: same rationale as #69511 — hardware-aware quant router is production-shaped, no consumer yet, parity proven against an fp16 stand-in. Hold until the real ECAPA execution paths exist. Green + isolated; safe to land later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant