{
  "_comment": [
    "Qwen3-ASR 0.6B per-tensor tolerances for compare_tensors.py.",
    "",
    "Reference: Alibaba qwen_asr v0.0.6 (author repo, transformers host)",
    "running BF16 inference on CPU.",
    "C++: ggml compute (CPU/Metal/Vulkan), weights stored as BF16 in the",
    "accuracy GGUF.",
    "",
    "Budgets are calibrated to ~1.5-2x the max observed across CPU,",
    "Metal, and Vulkan on JFK. Vulkan dominates most encoder tensors",
    "due to F16 intermediate precision in its matmul path; tightening",
    "further would regress Vulkan runs. Dump points follow the audio-",
    "llm pattern:",
    "  enc.mel.in            - input log-mel after frontend normalization",
    "  enc.subsample.out     - after 3x Conv2d downsampler + flatten + linear",
    "  enc.pos_add.out       - after sinusoidal position add",
    "  enc.block.0.out       - first encoder block output",
    "  enc.block.17.out      - final encoder block output",
    "  enc.ln_post.out       - after final LayerNorm",
    "  enc.proj.out          - after proj1 + GELU + proj2 (d=output_dim)",
    "  dec.token_emb         - LM input embedding pre-injection",
    "  dec.audio_injected    - embedding after audio feature scatter",
    "  dec.block.0.out       - first LM block output",
    "  dec.block.27.out      - final LM block output",
    "  dec.out_before_head   - after final LM RMSNorm, before lm_head",
    "  dec.logits_raw        - pre-softmax next-token logits",
    "  dec.logits            - post-log-softmax (use inf tolerance)"
  ],

  "enc.mel.in":           {"max_abs": 0.01,   "mean_abs": 0.001},
  "enc.subsample.out":    {"max_abs": 0.15,   "mean_abs": 0.01},
  "enc.pos_add.out":      {"max_abs": 0.15,   "mean_abs": 0.01},
  "enc.block.0.out":      {"max_abs": 1.0,    "mean_abs": 0.05},
  "enc.block.17.out":     {"max_abs": 25.0,   "mean_abs": 0.2},
  "enc.ln_post.out":      {"max_abs": 3.0,    "mean_abs": 0.1},
  "enc.proj.out":         {"max_abs": 0.2,    "mean_abs": 0.01},

  "dec.token_emb":        {"max_abs": 1e-6,   "mean_abs": 1e-7},
  "dec.audio_injected":   {"max_abs": 0.2,    "mean_abs": 0.01},
  "dec.block.0.out":      {"max_abs": 3.0,    "mean_abs": 0.05},
  "dec.block.27.out":     {"max_abs": 128.0,  "mean_abs": 2.0},
  "dec.out_before_head":  {"max_abs": 140.0,  "mean_abs": 1.0},
  "dec.logits_raw":       {"max_abs": 2.5,    "mean_abs": 0.5},
  "dec.logits":           {"max_abs": "inf",  "mean_abs": "inf"}
}
