{
  "_comment": [
    "Voxtral Realtime (2602) FINALIZED tolerances. Correctness regime:",
    "  - reference: transformers VoxtralRealtimeForConditionalGeneration,",
    "    dtype=bfloat16, attn_implementation=eager; jfk offline whole-clip",
    "    teacher-forced decode; num_delay_tokens=6 (480 ms).",
    "  - C++: BF16 reference GGUF, backend cpu, KV cache f16 (AUTO). Encoder flash",
    "    attention is the DEFAULT since Stage 6; the gate is validated against it",
    "    (44/44 within tolerance, transcript exact) and the non-flash soft_max path",
    "    also passes. CPU thread count does not change the compared tensors.",
    "  - enc.mel.in is the PRODUCTION C++ frontend ('global' fixed-max log-mel)",
    "    vs the reference mel: validate.py runs the C++ mel end-to-end (no",
    "    injection), so this IS the frontend-parity gate and every downstream",
    "    encoder/decoder tensor is validated with the production mel feeding it.",
    "    Drift is a broad FFT/windowing f32-precision floor (~3.9e-3 over 73% of",
    "    audio frames, uniform; left-pad silence frames exact 0.0), not a",
    "    localized mask/boundary bug. Mid-range vs other families (whisper /",
    "    voxtral-2507 ~5e-5 tight; qwen3_asr 1e-2; cohere 5e-1; canary 1e1).",
    "  - dec.token_emb is a pure GGUF embedding read (bf16 -> f32): exact 0.0.",
    "",
    "DOMINANT DRIFT SOURCE (measured, not assumed): the reference runs a FULL",
    "bf16 forward (mel cast to bf16, every matmul/activation in bf16), while the",
    "C++ computes activations in f32 from the bf16 GGUF weights. The bf16",
    "rounding gap accumulates through 32 causal-RoPE encoder layers + the 4x",
    "projector + 26 Ministral decoder layers. The Ministral backbone has",
    "massive-activation outliers (max |x| ~1e1-1e2), so worst-ELEMENT (max_abs)",
    "budgets are large by design while mean_abs stays ~1-2% relative. The greedy",
    "argmax is UNCHANGED at every step: the jfk transcript is byte-exact vs the",
    "reference ('And so, my fellow Americans, ...').",
    "",
    "Every entry = max(1.5 x observed C++ drift, Stage-2 provisional budget).",
    "Observed realtime drift is SMALLER than the sibling voxtral (2507) accepted",
    "tolerances in every comparable tensor (same bf16-vs-f32 mechanism, same",
    "Ministral decoder) -- see tests/tolerances/voxtral.json. No entry was",
    "widened to absorb a localized (mask/position/shape) error: the drift grows",
    "smoothly with depth and the transcript is exact.",
    "",
    "stream.* entries gate the incremental streaming path (Stage 4 Step 2b)",
    "against the `stream` oracle; for jfk (T_enc=748 < sliding_window=750) the",
    "streaming logits equal the offline logits, so they mirror dec.logits_raw.*."
  ],

  "enc.mel.in":        { "max_abs": 6.0e-3,   "mean_abs": 5.0e-4,
    "_comment": "production C++ global log-mel vs reference; broad FFT-precision floor (max(1.5x observed 3.9e-3, ...)); NOT injected" },
  "enc.embedder.out":  { "max_abs": 4.0e-2,   "mean_abs": 3.0e-4 },
  "enc.block.0.out":   { "max_abs": 2.0e-1,   "mean_abs": 1.6e-3 },
  "enc.block.16.out":  { "max_abs": 9.0e-1,   "mean_abs": 1.7e-2 },
  "enc.block.31.out":  { "max_abs": 1.2e1,    "mean_abs": 3.0e-2 },
  "enc.out":           { "max_abs": 2.0e-1,   "mean_abs": 5.0e-3 },
  "proj.out":          { "max_abs": 2.2e-1,   "mean_abs": 8.5e-4 },

  "dec.token_emb":      { "max_abs": 0.0,     "mean_abs": 0.0,
    "_comment": "pure bf16 GGUF embedding read -> f32: exact 0.0" },
  "dec.audio_injected": { "max_abs": 2.1e-1,  "mean_abs": 8.5e-4,
    "_comment": "token_emb (0 drift) + audio overlay; drift == proj.out" },
  "dec.block.0.out":    { "max_abs": 7.0e-1,  "mean_abs": 1.3e-3 },
  "dec.block.13.out":   { "max_abs": 3.8,     "mean_abs": 8.1e-3 },
  "dec.block.25.out":   { "max_abs": 3.3e1,   "mean_abs": 7.6e-2,
    "_comment": "massive-activation outliers; mean ~1.5% relative, argmax unchanged" },
  "dec.out_before_head":{ "max_abs": 3.8,     "mean_abs": 2.8e-2 },
  "dec.logits_raw":     { "max_abs": 2.6e-1,  "mean_abs": 9.3e-2,
    "_comment": "first-token logits; greedy argmax matches reference (byte-exact transcript)" },
  "dec.logits_raw.gen8":{ "max_abs": 3.1e-1,  "mean_abs": 7.3e-2,
    "_comment": "logits after 8 greedy steps; argmax matches reference" },

  "stream.logits_raw":     { "max_abs": 2.6e-1, "mean_abs": 9.3e-2,
    "_comment": "streaming gen0 logits; mirrors dec.logits_raw (offline==stream for jfk)" },
  "stream.logits_raw.gen8":{ "max_abs": 3.1e-1, "mean_abs": 7.3e-2,
    "_comment": "streaming gen8 logits; mirrors dec.logits_raw.gen8" }
}
